public class MadvocController extends java.lang.Object implements MadvocComponentLifecycle.Ready
| Modifier and Type | Field and Description |
|---|---|
protected ActionPathRewriter |
actionPathRewriter |
protected ActionsManager |
actionsManager |
protected AsyncActionExecutor |
asyncActionExecutor |
protected MadvocConfig |
madvocConfig |
protected ResultsManager |
resultsManager |
protected ServletContextProvider |
servletContextProvider |
| 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 |
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.
|
void |
ready() |
void |
render(ActionRequest actionRequest,
java.lang.Object resultObject)
Invokes a result after the action invocation.
|
@PetiteInject protected MadvocConfig madvocConfig
@PetiteInject protected ActionsManager actionsManager
@PetiteInject protected ActionPathRewriter actionPathRewriter
@PetiteInject protected ResultsManager resultsManager
@PetiteInject protected ServletContextProvider servletContextProvider
@PetiteInject protected AsyncActionExecutor asyncActionExecutor
public void ready()
ready in interface MadvocComponentLifecycle.Readypublic 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.Exceptionpublic 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.ExceptionActionResult.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 responseCopyright © 2003-present Jodd Team