View Javadoc
1   /*
2    * Copyright 2007 The Kuali Foundation.
3    * 
4    * Licensed under the Educational Community License, Version 1.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/ecl1.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.ole.sec.businessobject.options;
17  
18  import java.util.ArrayList;
19  import java.util.List;
20  
21  import org.kuali.ole.sec.SecConstants.NonSecurityAttributeNames;
22  import org.kuali.ole.sec.SecConstants.SecurityAttributeNames;
23  import org.kuali.rice.core.api.util.ConcreteKeyValue;
24  import org.kuali.rice.core.api.util.KeyValue;
25  import org.kuali.rice.krad.keyvalues.KeyValuesBase;
26  
27  
28  /**
29   * Returns list of attribute names
30   */
31  public class AttributeNameFinder extends KeyValuesBase {
32  
33      protected static final List<KeyValue> OPTIONS = new ArrayList<KeyValue>();
34      static {
35          OPTIONS.add(new ConcreteKeyValue(SecurityAttributeNames.ACCOUNT, SecurityAttributeNames.ACCOUNT));
36          OPTIONS.add(new ConcreteKeyValue(SecurityAttributeNames.CHART, SecurityAttributeNames.CHART));
37          OPTIONS.add(new ConcreteKeyValue(NonSecurityAttributeNames.OBJECT_CODE, NonSecurityAttributeNames.OBJECT_CODE));
38          OPTIONS.add(new ConcreteKeyValue(SecurityAttributeNames.OBJECT_CONSOLIDATION, SecurityAttributeNames.OBJECT_CONSOLIDATION));
39          OPTIONS.add(new ConcreteKeyValue(SecurityAttributeNames.OBJECT_LEVEL, SecurityAttributeNames.OBJECT_LEVEL));
40          OPTIONS.add(new ConcreteKeyValue(SecurityAttributeNames.ORGANIZATION, SecurityAttributeNames.ORGANIZATION));
41          OPTIONS.add(new ConcreteKeyValue(SecurityAttributeNames.PROJECT_CODE, SecurityAttributeNames.PROJECT_CODE));
42          OPTIONS.add(new ConcreteKeyValue(SecurityAttributeNames.SUB_ACCOUNT, SecurityAttributeNames.SUB_ACCOUNT));
43          OPTIONS.add(new ConcreteKeyValue(NonSecurityAttributeNames.SUB_OBJECT_CODE, NonSecurityAttributeNames.SUB_OBJECT_CODE));
44      }
45      
46      /**
47       * @see org.kuali.keyvalues.KeyValuesFinder#getKeyValues()
48       */
49      public List<KeyValue> getKeyValues() {
50          return OPTIONS;
51      }
52  }