com.hack23.cia.service.impl.common
Class AbstractGenericService<REQUEST extends AbstractServiceRequest>

Package class diagram package AbstractGenericService
java.lang.Object
  extended by com.hack23.cia.service.impl.common.AbstractGenericService<REQUEST>
Type Parameters:
REQUEST - the generic type
All Implemented Interfaces:
BusinessService
Direct Known Subclasses:
AgencyRequestService, AgentDeploymentRequestService, ApplicationErrorRequestService, ApplicationRequestService, BallotRequestService, CommitteeReportRequestService, CommitteeReportsRequestService, DefaultRequestService, ExternalUrlRequestService, LanguageContentRequestService, LanguageRequestService, LoginRequestService, LogoutRequestService, MonitorRequestService, ParliamentMemberRequestService, PartyRequestService, PortalRequestService, RegisterUserRequestService, SearchRequestService, TopListRequestService, UserRequestService

public abstract class AbstractGenericService<REQUEST extends AbstractServiceRequest>
extends Object
implements BusinessService

The Class AbstractGenericService.


Constructor Summary
Modifier Constructor and Description
protected AbstractGenericService(UserSessionService userSessionService)
          Instantiates a new abstract generic service.
 
Method Summary
Modifier and Type Method and Description
protected abstract  ActionEvent createActionEvent(REQUEST service, UserSessionData userSession)
          Creates the action event.
protected  ApplicationDtoFactory getApplicationDtoFactory()
          Gets the application dto factory.
protected  ApplicationModelFactoryFactory getApplicationModelFactory()
          Gets the application model factory.
protected  CommonModelFactory getCommonModelFactory()
          Gets the common model factory.
protected  SwedenModelFactory getSwedenModelFactory()
          Gets the sweden model factory.
protected  UserSessionService getUserSessionService()
          Gets the user session service.
protected abstract  ServiceResponse handleServiceRequest(REQUEST service, UserSessionDto userSession)
          Handle service request.
protected abstract  UserSessionData lookupUserSession(AbstractServiceRequest request)
          Lookup user session.
 ServiceResponse processService(ServiceRequest serviceRequest)
          Process service.
 void setApplicationDtoFactory(ApplicationDtoFactory applicationDtoFactory)
          Sets the application dto factory.
 void setApplicationModelFactoryFactory(ApplicationModelFactoryFactory applicationModelFactoryFactory)
          Sets the application model factory factory.
 void setCommonModelFactory(CommonModelFactory commonModelFactory)
          Sets the common model factory.
 void setSwedenModelFactory(SwedenModelFactory swedenModelFactory)
          Sets the sweden model factory.
 
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.service.api.common.BusinessService
getSupportedService
 

Constructor Detail

AbstractGenericService

protected AbstractGenericService(UserSessionService userSessionService)
Instantiates a new abstract generic service.

Parameters:
userSessionService - the user session service
Method Detail

createActionEvent

protected abstract ActionEvent createActionEvent(REQUEST service,
                                                 UserSessionData userSession)
Creates the action event.

Parameters:
service - the service
userSession - the user session
Returns:
the action event

getApplicationDtoFactory

protected final ApplicationDtoFactory getApplicationDtoFactory()
Gets the application dto factory.

Returns:
the application dto factory

getApplicationModelFactory

protected final ApplicationModelFactoryFactory getApplicationModelFactory()
Gets the application model factory.

Returns:
the application model factory

getCommonModelFactory

protected final CommonModelFactory getCommonModelFactory()
Gets the common model factory.

Returns:
the common model factory

getSwedenModelFactory

protected final SwedenModelFactory getSwedenModelFactory()
Gets the sweden model factory.

Returns:
the sweden model factory

getUserSessionService

protected final UserSessionService getUserSessionService()
Gets the user session service.

Returns:
the user session service

handleServiceRequest

protected abstract ServiceResponse handleServiceRequest(REQUEST service,
                                                        UserSessionDto userSession)
Handle service request.

Parameters:
service - the service
userSession - the user session
Returns:
the service response

lookupUserSession

protected abstract UserSessionData lookupUserSession(AbstractServiceRequest request)
Lookup user session.

Parameters:
request - the request
Returns:
the user session data

processService

public final ServiceResponse processService(ServiceRequest serviceRequest)
Description copied from interface: BusinessService
Process service.

Specified by:
processService in interface BusinessService
Parameters:
serviceRequest - the service request
Returns:
the service response

setApplicationDtoFactory

public final void setApplicationDtoFactory(ApplicationDtoFactory applicationDtoFactory)
Sets the application dto factory.

Parameters:
applicationDtoFactory - the new application dto factory

setApplicationModelFactoryFactory

public final void setApplicationModelFactoryFactory(ApplicationModelFactoryFactory applicationModelFactoryFactory)
Sets the application model factory factory.

Parameters:
applicationModelFactoryFactory - the new application model factory factory

setCommonModelFactory

public final void setCommonModelFactory(CommonModelFactory commonModelFactory)
Sets the common model factory.

Parameters:
commonModelFactory - the new common model factory

setSwedenModelFactory

public final void setSwedenModelFactory(SwedenModelFactory swedenModelFactory)
Sets the sweden model factory.

Parameters:
swedenModelFactory - the new sweden model factory


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