| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| CampusRoleTypeServiceImpl |
|
| 3.0;3 |
| 1 | /* | |
| 2 | * Copyright 2008-2009 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.opensource.org/licenses/ecl2.php | |
| 9 | * | |
| 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.rice.kns.service.impl; | |
| 17 | ||
| 18 | import org.kuali.rice.kim.bo.impl.KimAttributes; | |
| 19 | import org.kuali.rice.kim.bo.types.dto.AttributeDefinitionMap; | |
| 20 | import org.kuali.rice.kim.service.support.impl.KimRoleTypeServiceBase; | |
| 21 | import org.kuali.rice.kns.datadictionary.AttributeDefinition; | |
| 22 | ||
| 23 | 0 | public class CampusRoleTypeServiceImpl extends KimRoleTypeServiceBase { |
| 24 | ||
| 25 | { | |
| 26 | 0 | workflowRoutingAttributes.add( KimAttributes.CAMPUS_CODE ); |
| 27 | 0 | requiredAttributes.add( KimAttributes.CAMPUS_CODE ); |
| 28 | // checkRequiredAttributes = true; | |
| 29 | 0 | } |
| 30 | ||
| 31 | /** | |
| 32 | * @see org.kuali.rice.kim.service.support.impl.KimTypeServiceBase#getAttributeDefinitions(java.lang.String) | |
| 33 | */ | |
| 34 | @Override | |
| 35 | public AttributeDefinitionMap getAttributeDefinitions(String kimTypeId) { | |
| 36 | 0 | AttributeDefinitionMap map = super.getAttributeDefinitions(kimTypeId); |
| 37 | 0 | for (AttributeDefinition definition : map.values()) { |
| 38 | 0 | if (KimAttributes.CAMPUS_CODE.equals(definition.getName())) { |
| 39 | 0 | definition.setRequired(Boolean.TRUE); |
| 40 | } | |
| 41 | } | |
| 42 | 0 | return map; |
| 43 | } | |
| 44 | } |