View Javadoc
1   /*
2    * Copyright 2010 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;
17  
18  import java.util.LinkedHashMap;
19  
20  import org.kuali.ole.sec.SecPropertyConstants;
21  import org.kuali.rice.krad.bo.TransientBusinessObjectBase;
22  
23  
24  /**
25   * Holds fields that provide metadata information for a security attribute
26   */
27  public class SecurityAttributeMetadata extends TransientBusinessObjectBase {
28      private Class attributeClass;
29      private String attributeField;
30      private String attributeNameField;
31  
32      public SecurityAttributeMetadata() {
33      }
34  
35      public SecurityAttributeMetadata(Class attributeClass, String attributeField) {
36          this.attributeClass = attributeClass;
37          this.attributeField = attributeField;
38      }
39  
40      public SecurityAttributeMetadata(Class attributeClass, String attributeField, String attributeNameField) {
41          this.attributeClass = attributeClass;
42          this.attributeField = attributeField;
43          this.attributeNameField = attributeNameField;
44      }
45  
46      /**
47       * Gets the attributeClass attribute.
48       * 
49       * @return Returns the attributeClass.
50       */
51      public Class getAttributeClass() {
52          return attributeClass;
53      }
54  
55  
56      /**
57       * Sets the attributeClass attribute value.
58       * 
59       * @param attributeClass The attributeClass to set.
60       */
61      public void setAttributeClass(Class attributeClass) {
62          this.attributeClass = attributeClass;
63      }
64  
65  
66      /**
67       * Gets the attributeField attribute.
68       * 
69       * @return Returns the attributeField.
70       */
71      public String getAttributeField() {
72          return attributeField;
73      }
74  
75  
76      /**
77       * Sets the attributeField attribute value.
78       * 
79       * @param attributeField The attributeField to set.
80       */
81      public void setAttributeField(String attributeField) {
82          this.attributeField = attributeField;
83      }
84  
85  
86      /**
87       * Gets the attributeNameField attribute.
88       * 
89       * @return Returns the attributeNameField.
90       */
91      public String getAttributeNameField() {
92          return attributeNameField;
93      }
94  
95      /**
96       * Sets the attributeNameField attribute value.
97       * 
98       * @param attributeNameField The attributeNameField to set.
99       */
100     public void setAttributeNameField(String attributeNameField) {
101         this.attributeNameField = attributeNameField;
102     }
103 
104     
105     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
106         LinkedHashMap m = new LinkedHashMap();
107 
108         m.put(SecPropertyConstants.ATTRIBUTE_ID, this.attributeField);
109 
110         return m;
111     }
112 
113 }