01: /*
02: * Copyright 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 edu.sampleu.travel.rice;
17:
18: import java.util.ArrayList;
19: import java.util.List;
20:
21: import org.kuali.RicePropertyConstants;
22: import org.kuali.core.bo.user.KualiModuleUser;
23: import org.kuali.core.bo.user.UniversalUser;
24: import org.kuali.core.exceptions.UserNotFoundException;
25: import org.kuali.core.service.impl.KualiModuleUserServiceBaseImpl;
26: import org.kuali.rice.KNSServiceLocator;
27: import org.springframework.beans.factory.InitializingBean;
28:
29: public class TravelModuleUserService extends
30: KualiModuleUserServiceBaseImpl implements InitializingBean {
31:
32: public static final String MODULE_ID = "tv";
33:
34: public KualiModuleUser getModuleUser(
35: String personUniversalIdentifier)
36: throws UserNotFoundException {
37: return getModuleUser(KNSServiceLocator
38: .getUniversalUserService().getUniversalUser(
39: personUniversalIdentifier));
40: }
41:
42: public KualiModuleUser getModuleUser(UniversalUser universalUser)
43: throws UserNotFoundException {
44: TravelUser travUser = new TravelUser(MODULE_ID, universalUser);
45: travUser.setUniversalUser(universalUser);
46: travUser.setActive(true);
47: return travUser;
48: }
49:
50: public void save(KualiModuleUser moduleUser)
51: throws IllegalArgumentException {
52:
53: }
54:
55: public void afterPropertiesSet() throws Exception {
56: List<String> properties = new ArrayList<String>();
57: properties.add(RicePropertyConstants.ACTIVE);
58: super.setPropertyList(properties);
59: }
60:
61: }
|