View Javadoc

1   /*
2   Copyright 2010 James Pether Sörling Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 
3   	$Id
4   */
5   package com.hack23.cia.service.impl.user;
6   
7   import com.hack23.cia.model.application.impl.common.UserSession;
8   import com.hack23.cia.service.api.common.AbstractServiceRequest;
9   import com.hack23.cia.service.api.user.AbstractUserRequest;
10  import com.hack23.cia.service.impl.common.AbstractGenericService;
11  import com.hack23.cia.service.impl.common.UserSessionService;
12  
13  /***
14   * The Class AbstractUserRequestService.
15   *
16   * @param <REQUEST> the generic type
17   */
18  public abstract class AbstractUserRequestService<REQUEST extends AbstractUserRequest>
19          extends AbstractGenericService<REQUEST> {
20  
21      /***
22       * Instantiates a new abstract user request service.
23       *
24       * @param userSessionService the user session service
25       */
26      public AbstractUserRequestService(
27              final UserSessionService userSessionService) {
28          super(userSessionService);
29      }
30  
31      /*
32       * (non-Javadoc)
33       * 
34       * @see
35       * com.hack23.cia.service.common.AbstractGenericService#lookupUserSession
36       * (com.hack23.cia.service.api.AbstractServiceRequest)
37       */
38      @Override
39      public final UserSession lookupUserSession(
40              final AbstractServiceRequest request) {
41          final UserSession userSession = getUserSessionService().loadUserSessionById(
42                  request.getUserSessionId());
43          return userSession;
44      }
45  }