public class RestActionInvocation
extends com.opensymphony.xwork2.DefaultActionInvocation
ActionInvocation
to add support for processing the object returned
from the action execution. This allows us to support methods that return HttpHeaders
as well as apply content type-specific operations to the result.Modifier and Type | Field and Description |
---|---|
protected boolean |
hasErrors |
protected HttpHeaders |
httpHeaders |
protected boolean |
isFirstInterceptor |
protected Object |
target |
action, actionEventListener, container, executed, explicitResult, extraContext, interceptors, invocationContext, objectFactory, preResultListeners, proxy, pushAction, result, resultCode, stack, unknownHandlerManager, valueStackFactory
Modifier | Constructor and Description |
---|---|
protected |
RestActionInvocation(Map<String,Object> extraContext,
boolean pushAction) |
Modifier and Type | Method and Description |
---|---|
String |
invoke() |
protected void |
processResult() |
protected String |
saveResult(com.opensymphony.xwork2.config.entities.ActionConfig actionConfig,
Object methodResult)
Save the result to be used later.
|
protected void |
selectTarget() |
void |
setDefaultErrorResultName(String value) |
void |
setLogger(String value) |
void |
setMimeTypeHandlerSelector(ContentTypeHandlerManager sel) |
void |
setRestrictToGet(String value)
If set to true (by default) blocks returning content from any other methods than GET,
if set to false, the content can be returned for any kind of method
|
protected void |
updateStatusFromResult()
Get the status code from HttpHeaderResult and it is saved in the HttpHeaders object.
|
addPreResultListener, createAction, createContextMap, createResult, deserialize, getAction, getInvocationContext, getProxy, getResult, getResultCode, getStack, init, invokeAction, invokeActionOnly, isExecuted, serialize, setActionEventListener, setContainer, setObjectFactory, setResultCode, setUnknownHandlerManager, setValueStackFactory
protected HttpHeaders httpHeaders
protected Object target
protected boolean isFirstInterceptor
protected boolean hasErrors
public void setLogger(String value)
public void setDefaultErrorResultName(String value)
public void setRestrictToGet(String value)
value
- true or falsepublic void setMimeTypeHandlerSelector(ContentTypeHandlerManager sel)
protected String saveResult(com.opensymphony.xwork2.config.entities.ActionConfig actionConfig, Object methodResult)
saveResult
in class com.opensymphony.xwork2.DefaultActionInvocation
actionConfig
- current ActionConfigmethodResult
- the result of the action.com.opensymphony.xwork2.config.ConfigurationException
- If it is an incorrect result.public String invoke() throws Exception
invoke
in interface com.opensymphony.xwork2.ActionInvocation
invoke
in class com.opensymphony.xwork2.DefaultActionInvocation
Exception
protected void updateStatusFromResult()
protected void selectTarget()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.