View Javadoc
1   /**
2    * Copyright 2004-2015 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.kpme.core.role.location;
17  
18  import java.util.ArrayList;
19  import java.util.List;
20  
21  import org.kuali.kpme.core.role.KPMERole;
22  import org.kuali.rice.core.api.util.ConcreteKeyValue;
23  import org.kuali.rice.core.api.util.KeyValue;
24  import org.kuali.rice.krad.keyvalues.KeyValuesBase;
25  
26  public class LocationRoleValuesFinder extends KeyValuesBase {
27  
28  	private static final long serialVersionUID = -522208884831448939L;
29  	
30  	private static final List<KeyValue> LOCATION_ROLE_KEY_VALUES = new ArrayList<KeyValue>();
31  	
32  	static {
33  		LOCATION_ROLE_KEY_VALUES.add(new ConcreteKeyValue(KPMERole.TIME_LOCATION_ADMINISTRATOR.getRoleName(), KPMERole.TIME_LOCATION_ADMINISTRATOR.getRoleName()));
34  		LOCATION_ROLE_KEY_VALUES.add(new ConcreteKeyValue(KPMERole.TIME_LOCATION_VIEW_ONLY.getRoleName(), KPMERole.TIME_LOCATION_VIEW_ONLY.getRoleName()));
35  		LOCATION_ROLE_KEY_VALUES.add(new ConcreteKeyValue(KPMERole.LEAVE_LOCATION_ADMINISTRATOR.getRoleName(), KPMERole.LEAVE_LOCATION_ADMINISTRATOR.getRoleName()));
36  		LOCATION_ROLE_KEY_VALUES.add(new ConcreteKeyValue(KPMERole.LEAVE_LOCATION_VIEW_ONLY.getRoleName(), KPMERole.LEAVE_LOCATION_VIEW_ONLY.getRoleName()));
37  	}
38  
39  	@Override
40  	public List<KeyValue> getKeyValues() {
41  		return LOCATION_ROLE_KEY_VALUES;
42  	}
43  	
44  }