com.hack23.cia.web.controller.common
Class AbstractGenericHandler<ACTION extends AbstractAction,REQUEST extends AbstractServiceRequest,RESPONSE extends AbstractServiceResponse>

Package class diagram package AbstractGenericHandler
java.lang.Object
  extended by com.hack23.cia.web.controller.common.AbstractGenericHandler<ACTION,REQUEST,RESPONSE>
All Implemented Interfaces:
ActionHandler
Direct Known Subclasses:
AbstractAdminActionHandler, AbstractUserActionHandler, ApplicationActionHandler, ApplicationErrorActionHandler, DefaultActionHandler

@Transactional(propagation=REQUIRED)
public abstract class AbstractGenericHandler<ACTION extends AbstractAction,REQUEST extends AbstractServiceRequest,RESPONSE extends AbstractServiceResponse>
extends Object
implements ActionHandler

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

AbstractGenericHandler

public AbstractGenericHandler(ViewFactoryService viewFactoryService,
                              ApplicationManager applicationManager)
Instantiates a new abstract generic handler.

Parameters:
viewFactoryService - the view factory service
applicationManager - the application manager
Method Detail

createServiceRequest

public abstract REQUEST createServiceRequest(ACTION action)
Creates the service request.

Parameters:
action - the action
Returns:
the rEQUEST

getApplicationManager

public final ApplicationManager getApplicationManager()
Gets the application manager.

Returns:
the application manager

getUserStateService

public final UserStateService getUserStateService()
Gets the user state service.

Returns:
the user state service

getViewFactoryService

public final ViewFactoryService getViewFactoryService()
Gets the view factory service.

Returns:
the view factory service

handleErrorResponse

protected final ModelAndView handleErrorResponse(ControllerAction action,
                                                 ErrorResponse errorResponse)
Handle error response.

Parameters:
action - the action
errorResponse - the error response
Returns:
the model and view

handleSuccessResponse

public abstract ModelAndView handleSuccessResponse(ACTION action,
                                                   RESPONSE response)
Handle success response.

Parameters:
action - the action
response - the response
Returns:
the model and view

processAction

public final void processAction(ControllerAction action)
Description copied from interface: ActionHandler
Process action.

Specified by:
processAction in interface ActionHandler
Parameters:
action - the action

processModelAndView

protected final void processModelAndView(ModelAndView modelAndView,
                                         ApplicationUserState userState)
Process model and view.

Parameters:
modelAndView - the model and view
userState - the user state

setUserStateService

public final void setUserStateService(UserStateService userStateService)
Description copied from interface: ActionHandler
Sets the user state service.

Specified by:
setUserStateService in interface ActionHandler
Parameters:
userStateService - the new user state service

setViewFactoryService

public final void setViewFactoryService(ViewFactoryService viewFactoryService)
Description copied from interface: ActionHandler
Sets the view factory service.

Specified by:
setViewFactoryService in interface ActionHandler
Parameters:
viewFactoryService - the new view factory service


Copyright © 2008-2009 www.hack23.com. All Rights Reserved.