|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.madvoc.component.MadvocController
public class MadvocController
Madvoc controller invokes actions for action path and renders action results. It also builds action objects and result paths. It handles intialization of interceptors and results.
| Field Summary | |
|---|---|
protected ActionPathMapper |
actionPathMapper
|
protected ActionPathRewriter |
actionPathRewriter
|
protected javax.servlet.ServletContext |
applicationContext
|
protected ContextInjector |
contextInjector
|
protected InterceptorsManager |
interceptorsManager
|
protected MadvocConfig |
madvocConfig
|
protected ResultMapper |
resultMapper
|
protected ResultsManager |
resultsManager
|
| Constructor Summary | |
|---|---|
MadvocController()
|
|
| Method Summary | |
|---|---|
protected java.lang.Object |
createAction(java.lang.Class actionClass)
Creates new action object from ActionConfig using default contructor. |
protected ActionRequest |
createActionRequest(ActionConfig actionConfig,
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. |
void |
init(javax.servlet.ServletContext servletContext)
Initializes controller by providing application context. |
protected void |
initializeActionConfig(ActionConfig cfg)
Initializes action configuration on first use. |
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. |
protected void |
invokeAndRender(ActionRequest request)
Invokes action request (interceptors and action method) and renders result. |
void |
render(ActionRequest req,
java.lang.Object resultObject)
Invokes a result after the action invocation. |
protected ActionConfig |
resolveActionConfig(java.lang.String actionPath,
java.lang.String httpMethod)
Resolves action config from action path and http method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@PetiteInject protected MadvocConfig madvocConfig
@PetiteInject protected ActionPathMapper actionPathMapper
@PetiteInject protected ActionPathRewriter actionPathRewriter
@PetiteInject protected InterceptorsManager interceptorsManager
@PetiteInject protected ContextInjector contextInjector
@PetiteInject protected ResultsManager resultsManager
@PetiteInject protected ResultMapper resultMapper
protected javax.servlet.ServletContext applicationContext
| Constructor Detail |
|---|
public MadvocController()
| Method Detail |
|---|
public void init(javax.servlet.ServletContext servletContext)
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 configuration before further proceeding.
java.lang.ExceptionActionMethodParser.buildActionPath(String, String, String, String, String)
protected void invokeAndRender(ActionRequest request)
throws java.lang.Exception
java.lang.Exception
public void render(ActionRequest req,
java.lang.Object resultObject)
throws java.lang.Exception
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.ExceptionActionResult.render(jodd.madvoc.ActionRequest, Object, String, String)
protected ActionConfig resolveActionConfig(java.lang.String actionPath,
java.lang.String httpMethod)
null
if action config not found. Performs initialization of founded action configig,
if necessary.
protected void initializeActionConfig(ActionConfig cfg)
protected java.lang.Object createAction(java.lang.Class actionClass)
ActionConfig using default contructor.
protected ActionRequest createActionRequest(ActionConfig actionConfig,
java.lang.Object action,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse)
actionConfig - action configurationaction - action objectservletRequest - http requestservletResponse - http response
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||