01: /*
02: * Copyright 2006-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.module.labor.service.impl;
17:
18: import org.kuali.core.bo.user.PersonPayrollId;
19: import org.kuali.core.bo.user.UniversalUser;
20: import org.kuali.core.exceptions.UserNotFoundException;
21: import org.kuali.core.service.UniversalUserService;
22: import org.kuali.core.service.impl.KualiModuleUserServiceBaseImpl;
23: import org.kuali.module.chart.bo.ChartUser;
24: import org.kuali.module.labor.bo.LaborUser;
25: import org.kuali.module.labor.service.LaborUserService;
26: import org.springframework.transaction.annotation.Transactional;
27:
28: /**
29: * The class implements a set of methods that can access the universal user service
30: *
31: * @see org.kuali.core.service.UniversalUserService
32: */
33: @Transactional
34: public class LaborUserServiceImpl extends
35: KualiModuleUserServiceBaseImpl<LaborUser> implements
36: LaborUserService {
37: UniversalUserService userService;
38:
39: /**
40: * @see org.kuali.core.service.KualiModuleUserService#getModuleUser(org.kuali.core.bo.user.UniversalUser)
41: */
42: public LaborUser getModuleUser(UniversalUser universalUser)
43: throws UserNotFoundException {
44: LaborUser financialUser = new LaborUser(universalUser);
45: return financialUser;
46: }
47:
48: public Object getUserActiveCriteria() {
49: return kualiModuleUserDao
50: .getActiveUserQueryCriteria(ChartUser.MODULE_ID);
51: }
52:
53: /**
54: * @see LaborUserService#getLaborUserByPersonPayrollIdentifier(String)
55: */
56: public LaborUser getLaborUserByPersonPayrollIdentifier(
57: String personPayrollIdentifier)
58: throws UserNotFoundException {
59: return new LaborUser(getUniversalUserService()
60: .getUniversalUser(
61: new PersonPayrollId(personPayrollIdentifier)));
62: }
63:
64: /**
65: * @see LaborUserService#getUniversalUserService()
66: */
67: public UniversalUserService getUniversalUserService() {
68: return userService;
69: }
70:
71: /**
72: * @see LaborUserService#setUniversalUserService(UniversalUserService)
73: */
74: public void setUniversalUserService(UniversalUserService userService) {
75: this.userService = userService;
76: }
77: }
|