|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jodd.madvoc.MadvocController
public class MadvocController
Madvoc controller invokes actions for action path and renders action results. It also builds action and result paths.
Field Summary | |
---|---|
protected WebApplication |
webapp
|
Constructor Summary | |
---|---|
MadvocController(WebApplication webapp)
|
Method Summary | |
---|---|
protected java.lang.Object |
createAction(java.lang.Class actionClass)
Creates a new action object from ActionConfig . |
protected ActionRequest |
createActionRequest(ActionConfig cfg,
java.lang.Object action,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse)
Creates new ActionRequest . |
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 next action request. |
protected java.lang.String |
prepareActionPath(java.lang.String actionPath,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns action path that will be used in lookup for action configuration . |
void |
render(ActionRequest req,
java.lang.String resultValue)
Invokes a result after the action invocation. |
java.lang.String |
resolveActionPath(ActionConfig cfg)
Resolves action path from action configuration.By default, action path is build upon the following formula: prefix + classActionPath + methodSeparator + methodActionPath + extension. |
java.lang.String |
resolveAlias(java.lang.String resultValue)
Returns resolved alias result value or passed on, if alias doesn't exist. |
java.lang.String |
resolveResultPath(ActionConfig cfg,
java.lang.String resultValue)
Resolves result path from action configuration and result value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final WebApplication webapp
Constructor Detail |
---|
public MadvocController(WebApplication webapp)
Method Detail |
---|
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 has been invoked by this controller, otherwise, string
with an action path is returned.
java.lang.Exception
protected java.lang.String prepareActionPath(java.lang.String actionPath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
action configuration
.
public void render(ActionRequest req, java.lang.String resultValue) throws java.lang.Exception
null
nothing is rendered -
than the action explicitly should take care about the result.
Result value consist of two parts: type and value. Type is optional and, if exists, it is separated
by semi-colon from the value. If type is not specified, the default result type is used. 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.execute(ActionRequest, String)
public java.lang.String resolveActionPath(ActionConfig cfg)
prefix + classActionPath + methodSeparator + methodActionPath + extension.If method action path is empty, it will be omitted.
When method action path starts with prefix, class action path is ignored.
public java.lang.String resolveAlias(java.lang.String resultValue)
public java.lang.String resolveResultPath(ActionConfig cfg, java.lang.String resultValue)
protected ActionRequest createActionRequest(ActionConfig cfg, java.lang.Object action, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
ActionRequest
.
protected java.lang.Object createAction(java.lang.Class actionClass)
ActionConfig
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |