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 org.kuali.module.kra.service.impl;
17:
18: import java.util.ArrayList;
19: import java.util.Collection;
20: import java.util.List;
21:
22: import org.kuali.core.service.BusinessObjectService;
23: import org.kuali.module.kra.routingform.bo.ControlAttributeType;
24: import org.kuali.module.kra.service.ResearchDocumentControlAttributeTypeService;
25: import org.springframework.transaction.annotation.Transactional;
26:
27: /**
28: * This class is used to access and retrieve ControlAttributeType attributes and related information.
29: */
30: @Transactional
31: public class ResearchDocumentControlAttributeTypeServiceImpl implements
32: ResearchDocumentControlAttributeTypeService {
33:
34: private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger
35: .getLogger(ResearchDocumentControlAttributeTypeServiceImpl.class);
36:
37: private BusinessObjectService businessObjectService;
38:
39: /**
40: * @see org.kuali.module.kra.service.ResearchDocumentControlAttributeTypeService#getControlAttributeTypeCodes()
41: */
42: public List<ControlAttributeType> getControlAttributeTypeCodes() {
43: Collection<ControlAttributeType> allTypes = new ArrayList();
44: allTypes = businessObjectService
45: .findAll(ControlAttributeType.class);
46: List<ControlAttributeType> controlAttributeTypes = new ArrayList();
47: for (ControlAttributeType type : allTypes) {
48: controlAttributeTypes.add(type);
49: }
50: return controlAttributeTypes;
51: }
52:
53: /**
54: * Setter for BusinessObjectService property.
55: *
56: * @param BusinessObjectService businessObjectService
57: */
58: public void setBusinessObjectService(
59: BusinessObjectService businessObjectService) {
60: this.businessObjectService = businessObjectService;
61: }
62: }
|