|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hack23.cia.web.controller.common.AbstractGenericHandler<ACTION,REQUEST,RESPONSE>
@Transactional(propagation=REQUIRED) public abstract class AbstractGenericHandler<ACTION extends AbstractAction,REQUEST extends AbstractServiceRequest,RESPONSE extends AbstractServiceResponse>
The Class AbstractGenericHandler.
Constructor Summary | |
---|---|
AbstractGenericHandler(ViewFactoryService viewFactoryService,
ApplicationManager applicationManager)
Instantiates a new abstract generic handler. |
Method Summary | |
---|---|
abstract REQUEST |
createServiceRequest(ACTION action)
Creates the service request. |
ApplicationManager |
getApplicationManager()
Gets the application manager. |
UserStateService |
getUserStateService()
Gets the user state service. |
ViewFactoryService |
getViewFactoryService()
Gets the view factory service. |
protected ModelAndView |
handleErrorResponse(ControllerAction action,
ErrorResponse errorResponse)
Handle error response. |
abstract ModelAndView |
handleSuccessResponse(ACTION action,
RESPONSE response)
Handle success response. |
void |
processAction(ControllerAction action)
Process action. |
protected void |
processModelAndView(ModelAndView modelAndView,
ApplicationUserState userState)
Process model and view. |
void |
setUserStateService(UserStateService userStateService)
Sets the user state service. |
void |
setViewFactoryService(ViewFactoryService viewFactoryService)
Sets the view factory service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.hack23.cia.web.controller.common.ActionHandler |
---|
getSupportedAction |
Constructor Detail |
---|
public AbstractGenericHandler(ViewFactoryService viewFactoryService, ApplicationManager applicationManager)
viewFactoryService
- the view factory serviceapplicationManager
- the application managerMethod Detail |
---|
public abstract REQUEST createServiceRequest(ACTION action)
action
- the action
public final ApplicationManager getApplicationManager()
public final UserStateService getUserStateService()
public final ViewFactoryService getViewFactoryService()
protected final ModelAndView handleErrorResponse(ControllerAction action, ErrorResponse errorResponse)
action
- the actionerrorResponse
- the error response
public abstract ModelAndView handleSuccessResponse(ACTION action, RESPONSE response)
action
- the actionresponse
- the response
public final void processAction(ControllerAction action)
ActionHandler
processAction
in interface ActionHandler
action
- the actionprotected final void processModelAndView(ModelAndView modelAndView, ApplicationUserState userState)
modelAndView
- the model and viewuserState
- the user statepublic final void setUserStateService(UserStateService userStateService)
ActionHandler
setUserStateService
in interface ActionHandler
userStateService
- the new user state servicepublic final void setViewFactoryService(ViewFactoryService viewFactoryService)
ActionHandler
setViewFactoryService
in interface ActionHandler
viewFactoryService
- the new view factory service
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |