eu.clarin.cmdi.mdservice.action
Class GenericProxyAction

java.lang.Object
  extended by com.opensymphony.xwork2.ActionSupport
      extended by eu.clarin.cmdi.mdservice.action.GenericProxyAction
All Implemented Interfaces:
com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, java.io.Serializable
Direct Known Subclasses:
CompRegistryProxyAction, DCRProxyAction, MDRepoProxyAction

public class GenericProxyAction
extends com.opensymphony.xwork2.ActionSupport

main Struts 2 controller responds to requests (collections, model, recordset) by dispatching the requests to appropriate internal methods and filling the inputStream with the result

Author:
vronk
See Also:
Serialized Form

Field Summary
private  java.lang.String actionkey
          Properties to be filled by Struts with according request-parameters
private  java.net.URL base_url
           
private  java.lang.String collection
           
private  java.lang.String format
           
private  int maxdepth
           
private  java.lang.String q
           
private  java.io.InputStream resultStream
           
private static long serialVersionUID
           
private  java.io.InputStream sourceStream
           
private  java.lang.String userMsg
           
 
Fields inherited from class com.opensymphony.xwork2.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
GenericProxyAction()
           
 
Method Summary
 java.lang.String execute()
          default Action method
 java.lang.String getActionkey()
           
 java.net.URL getBaseURL()
           
 java.lang.String getCollection()
           
 java.lang.String getFormat()
           
 java.lang.String getFullFormat()
           
 int getMaxdepth()
           
 java.lang.String getProxyKey()
          primitive identification of the target-proxy base for finding the right base_url in the props subclass has to override with its specific proxykey
 java.lang.String getQ()
           
 java.lang.String getRequestKey()
           
 java.io.InputStream getResultStream()
          The stream holding the resulting data to be sent back to the user as response
 java.net.URL getTargetRequest()
           
 java.lang.String getUserMsg()
           
 void prepare()
           
 void setActionkey(java.lang.String actionKey)
           
 void setCollection(java.lang.String collection)
           
 void setFormat(java.lang.String format)
           
 void setMaxdepth(int maxdepth)
           
 void setQ(java.lang.String q)
           
 void setUserMsg(java.lang.String userMsg)
           
 
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

actionkey

private java.lang.String actionkey
Properties to be filled by Struts with according request-parameters


q

private java.lang.String q

collection

private java.lang.String collection

maxdepth

private int maxdepth

format

private java.lang.String format

userMsg

private java.lang.String userMsg

resultStream

private java.io.InputStream resultStream

sourceStream

private java.io.InputStream sourceStream

base_url

private java.net.URL base_url
Constructor Detail

GenericProxyAction

public GenericProxyAction()
Method Detail

getQ

public java.lang.String getQ()

setQ

public void setQ(java.lang.String q)

getCollection

public java.lang.String getCollection()

setCollection

public void setCollection(java.lang.String collection)

getMaxdepth

public int getMaxdepth()

setMaxdepth

public void setMaxdepth(int maxdepth)

getFormat

public java.lang.String getFormat()

setFormat

public void setFormat(java.lang.String format)

getActionkey

public java.lang.String getActionkey()

setActionkey

public void setActionkey(java.lang.String actionKey)

getFullFormat

public java.lang.String getFullFormat()

getProxyKey

public java.lang.String getProxyKey()
primitive identification of the target-proxy base for finding the right base_url in the props subclass has to override with its specific proxykey

Returns:

getUserMsg

public java.lang.String getUserMsg()

setUserMsg

public void setUserMsg(java.lang.String userMsg)

getResultStream

public java.io.InputStream getResultStream()
The stream holding the resulting data to be sent back to the user as response

Returns:

getBaseURL

public java.net.URL getBaseURL()
                        throws java.lang.Exception
Throws:
java.lang.Exception

getTargetRequest

public java.net.URL getTargetRequest()
                              throws java.lang.Exception
Throws:
java.lang.Exception

getRequestKey

public java.lang.String getRequestKey()

prepare

public void prepare()
             throws java.lang.Exception
Throws:
java.lang.Exception

execute

public java.lang.String execute()
                         throws java.lang.Exception
default Action method

Specified by:
execute in interface com.opensymphony.xwork2.Action
Overrides:
execute in class com.opensymphony.xwork2.ActionSupport
Throws:
java.lang.Exception