public class MadvocController extends java.lang.Object implements MadvocComponentLifecycle.Ready
Modifier and Type | Field and Description |
---|---|
protected ActionPathRewriter |
actionPathRewriter |
protected ActionsManager |
actionsManager |
protected boolean |
applyCharacterEncoding |
protected AsyncActionExecutor |
asyncActionExecutor |
protected MadvocEncoding |
madvocEncoding |
protected boolean |
preventCaching |
protected ResultsManager |
resultsManager |
protected ServletContextProvider |
servletContextProvider |
protected java.lang.String |
welcomeFile |
Constructor and Description |
---|
MadvocController() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
createAction(java.lang.Class actionClass)
Creates new action object from
ActionRuntime using default constructor. |
protected ActionRequest |
createActionRequest(java.lang.String actionPath,
java.lang.String[] actionPathChunks,
ActionRuntime actionRuntime,
java.lang.Object action,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse)
Creates new action request.
|
javax.servlet.ServletContext |
getApplicationContext()
Returns application context set during the initialization.
|
java.lang.String |
getWelcomeFile() |
java.lang.String |
invoke(java.lang.String actionPath,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse)
Invokes action registered to provided action path, Provides action chaining, by invoking the next action request.
|
boolean |
isApplyCharacterEncoding() |
boolean |
isPreventCaching() |
void |
ready() |
void |
render(ActionRequest actionRequest,
java.lang.Object resultObject)
Invokes a result after the action invocation.
|
void |
setApplyCharacterEncoding(boolean applyCharacterEncoding)
Defines is character encoding has to be set by Madvoc into the request and response.
|
void |
setPreventCaching(boolean preventCaching)
Specifies if Madvoc should add response params to prevent browser caching.
|
void |
setWelcomeFile(java.lang.String welcomeFile)
Sets the welcome file as defined by servlet container.
|
@PetiteInject protected MadvocEncoding madvocEncoding
@PetiteInject protected ActionsManager actionsManager
@PetiteInject protected ActionPathRewriter actionPathRewriter
@PetiteInject protected ResultsManager resultsManager
@PetiteInject protected ServletContextProvider servletContextProvider
@PetiteInject protected AsyncActionExecutor asyncActionExecutor
protected boolean applyCharacterEncoding
protected boolean preventCaching
protected java.lang.String welcomeFile
public void ready()
ready
in interface MadvocComponentLifecycle.Ready
public javax.servlet.ServletContext getApplicationContext()
public java.lang.String invoke(java.lang.String actionPath, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws java.lang.Exception
null
if action path is consumed and has been invoked by this controller; otherwise
the action path string is returned (it might be different than original one, provided in arguments).
On first invoke, initializes the action runtime before further proceeding.java.lang.Exception
public void render(ActionRequest actionRequest, java.lang.Object resultObject) throws java.lang.Exception
Results may be objects that specify which action result will be used to render the result.
Result value may consist of two parts: type and value. Result type is optional and, if exists, it is separated
by semi-colon from the value. If type is not specified
then the default result type if still not defined. Result type defines which
ActionResult
should be used for rendering the value.
Result value is first checked against aliased values. Then, it is resolved and then passed
to the founded ActionResult
.
java.lang.Exception
ActionResult.render(jodd.madvoc.ActionRequest, Object)
protected java.lang.Object createAction(java.lang.Class actionClass)
ActionRuntime
using default constructor.protected ActionRequest createActionRequest(java.lang.String actionPath, java.lang.String[] actionPathChunks, ActionRuntime actionRuntime, java.lang.Object action, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
actionPath
- action pathactionRuntime
- action runtimeaction
- action objectservletRequest
- http requestservletResponse
- http responsepublic boolean isApplyCharacterEncoding()
public void setApplyCharacterEncoding(boolean applyCharacterEncoding)
public boolean isPreventCaching()
public void setPreventCaching(boolean preventCaching)
public java.lang.String getWelcomeFile()
public void setWelcomeFile(java.lang.String welcomeFile)
Copyright © 2003-present Jodd Team