001 /*
002 * Copyright 2011 The Kuali Foundation.
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.kfs.sec.businessobject;
017
018 import java.sql.Date;
019 import java.util.LinkedHashMap;
020
021 import org.kuali.kfs.sec.SecPropertyConstants;
022 import org.kuali.kfs.sys.KFSPropertyConstants;
023 import org.kuali.rice.kns.bo.Inactivateable;
024 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
025 import org.kuali.rice.kns.util.KualiInteger;
026
027
028 /**
029 * Attribute Security Principal Definition
030 */
031 public class SecurityPrincipalDefinition extends PersistableBusinessObjectBase implements Inactivateable {
032 private KualiInteger principalDefinitionId;
033 private String principalId;
034 private KualiInteger definitionId;
035 private String constraintCode;
036 private String operatorCode;
037 private String attributeValue;
038 private boolean overrideDeny;
039 private boolean active;
040
041 private SecurityDefinition securityDefinition;
042
043 public SecurityPrincipalDefinition() {
044 super();
045
046 overrideDeny = false;
047 }
048
049
050 /**
051 * Gets the principalDefinitionId attribute.
052 *
053 * @return Returns the principalDefinitionId.
054 */
055 public KualiInteger getPrincipalDefinitionId() {
056 return principalDefinitionId;
057 }
058
059
060 /**
061 * Sets the principalDefinitionId attribute value.
062 *
063 * @param principalDefinitionId The principalDefinitionId to set.
064 */
065 public void setPrincipalDefinitionId(KualiInteger principalDefinitionId) {
066 this.principalDefinitionId = principalDefinitionId;
067 }
068
069
070 /**
071 * Gets the principalId attribute.
072 *
073 * @return Returns the principalId.
074 */
075 public String getPrincipalId() {
076 return principalId;
077 }
078
079
080 /**
081 * Sets the principalId attribute value.
082 *
083 * @param principalId The principalId to set.
084 */
085 public void setPrincipalId(String principalId) {
086 this.principalId = principalId;
087 }
088
089
090 /**
091 * Gets the definitionId attribute.
092 *
093 * @return Returns the definitionId.
094 */
095 public KualiInteger getDefinitionId() {
096 return definitionId;
097 }
098
099
100 /**
101 * Sets the definitionId attribute value.
102 *
103 * @param definitionId The definitionId to set.
104 */
105 public void setDefinitionId(KualiInteger definitionId) {
106 this.definitionId = definitionId;
107 }
108
109
110 /**
111 * Gets the constraintCode attribute.
112 *
113 * @return Returns the constraintCode.
114 */
115 public String getConstraintCode() {
116 return constraintCode;
117 }
118
119
120 /**
121 * Sets the constraintCode attribute value.
122 *
123 * @param constraintCode The constraintCode to set.
124 */
125 public void setConstraintCode(String constraintCode) {
126 this.constraintCode = constraintCode;
127 }
128
129
130 /**
131 * Gets the operatorCode attribute.
132 *
133 * @return Returns the operatorCode.
134 */
135 public String getOperatorCode() {
136 return operatorCode;
137 }
138
139
140 /**
141 * Sets the operatorCode attribute value.
142 *
143 * @param operatorCode The operatorCode to set.
144 */
145 public void setOperatorCode(String operatorCode) {
146 this.operatorCode = operatorCode;
147 }
148
149
150 /**
151 * Gets the attributeValue attribute.
152 *
153 * @return Returns the attributeValue.
154 */
155 public String getAttributeValue() {
156 return attributeValue;
157 }
158
159
160 /**
161 * Sets the attributeValue attribute value.
162 *
163 * @param attributeValue The attributeValue to set.
164 */
165 public void setAttributeValue(String attributeValue) {
166 this.attributeValue = attributeValue;
167 }
168
169
170 /**
171 * Gets the overrideDeny attribute.
172 *
173 * @return Returns the overrideDeny.
174 */
175 public boolean isOverrideDeny() {
176 return overrideDeny;
177 }
178
179
180 /**
181 * Sets the overrideDeny attribute value.
182 *
183 * @param overrideDeny The overrideDeny to set.
184 */
185 public void setOverrideDeny(boolean overrideDeny) {
186 this.overrideDeny = overrideDeny;
187 }
188
189
190 /**
191 * Gets the active attribute.
192 *
193 * @return Returns the active.
194 */
195 public boolean isActive() {
196 return active;
197 }
198
199
200 /**
201 * Sets the active attribute value.
202 *
203 * @param active The active to set.
204 */
205 public void setActive(boolean active) {
206 this.active = active;
207 }
208
209 /**
210 * Gets the securityDefinition attribute.
211 *
212 * @return Returns the securityDefinition.
213 */
214 public SecurityDefinition getSecurityDefinition() {
215 return securityDefinition;
216 }
217
218
219 /**
220 * Sets the securityDefinition attribute value.
221 *
222 * @param securityDefinition The securityDefinition to set.
223 */
224 public void setSecurityDefinition(SecurityDefinition securityDefinition) {
225 this.securityDefinition = securityDefinition;
226 }
227
228
229 /**
230 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
231 */
232 @Override
233 protected LinkedHashMap toStringMapper() {
234 LinkedHashMap m = new LinkedHashMap();
235
236 m.put(KFSPropertyConstants.PRINCIPAL_ID, this.principalId);
237 m.put(SecPropertyConstants.DEFINITION_ID, this.definitionId);
238
239 return m;
240 }
241
242 }