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.util.LinkedHashMap; 019 020 import org.kuali.kfs.sec.SecPropertyConstants; 021 import org.kuali.kfs.sys.KFSPropertyConstants; 022 import org.kuali.rice.kns.bo.Inactivateable; 023 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; 024 import org.kuali.rice.kns.util.KualiInteger; 025 026 027 /** 028 * Associates a security definition with a model with qualification. The qualifications become the qualifications on the KIM assignment of the model role to the definition role 029 */ 030 public class SecurityModelDefinition extends PersistableBusinessObjectBase implements Inactivateable { 031 private KualiInteger modelDefinitionId; 032 private KualiInteger modelId; 033 private KualiInteger definitionId; 034 private String constraintCode; 035 private String operatorCode; 036 private String attributeValue; 037 private boolean overrideDeny; 038 private boolean active; 039 040 private SecurityDefinition securityDefinition; 041 042 043 public SecurityModelDefinition() { 044 super(); 045 046 overrideDeny = false; 047 } 048 049 050 /** 051 * Gets the modelDefinitionId attribute. 052 * 053 * @return Returns the modelDefinitionId. 054 */ 055 public KualiInteger getModelDefinitionId() { 056 return modelDefinitionId; 057 } 058 059 060 /** 061 * Sets the modelDefinitionId attribute value. 062 * 063 * @param modelDefinitionId The modelDefinitionId to set. 064 */ 065 public void setModelDefinitionId(KualiInteger modelDefinitionId) { 066 this.modelDefinitionId = modelDefinitionId; 067 } 068 069 070 /** 071 * Gets the modelId attribute. 072 * 073 * @return Returns the modelId. 074 */ 075 public KualiInteger getModelId() { 076 return modelId; 077 } 078 079 080 /** 081 * Sets the modelId attribute value. 082 * 083 * @param modelId The modelId to set. 084 */ 085 public void setModelId(KualiInteger modelId) { 086 this.modelId = modelId; 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 attributeValue attribute. 112 * 113 * @return Returns the attributeValue. 114 */ 115 public String getAttributeValue() { 116 return attributeValue; 117 } 118 119 120 /** 121 * Sets the attributeValue attribute value. 122 * 123 * @param attributeValue The attributeValue to set. 124 */ 125 public void setAttributeValue(String attributeValue) { 126 this.attributeValue = attributeValue; 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 constraintCode attribute. 152 * 153 * @return Returns the constraintCode. 154 */ 155 public String getConstraintCode() { 156 return constraintCode; 157 } 158 159 160 /** 161 * Sets the constraintCode attribute value. 162 * 163 * @param constraintCode The constraintCode to set. 164 */ 165 public void setConstraintCode(String constraintCode) { 166 this.constraintCode = constraintCode; 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 /** 211 * Gets the securityDefinition attribute. 212 * 213 * @return Returns the securityDefinition. 214 */ 215 public SecurityDefinition getSecurityDefinition() { 216 return securityDefinition; 217 } 218 219 220 /** 221 * Sets the securityDefinition attribute value. 222 * 223 * @param securityDefinition The securityDefinition to set. 224 */ 225 public void setSecurityDefinition(SecurityDefinition securityDefinition) { 226 this.securityDefinition = securityDefinition; 227 } 228 229 230 /** 231 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper() 232 */ 233 @Override 234 protected LinkedHashMap toStringMapper() { 235 LinkedHashMap m = new LinkedHashMap(); 236 237 m.put(SecPropertyConstants.MODEL_ID, this.modelId); 238 m.put(SecPropertyConstants.DEFINITION_ID, this.definitionId); 239 240 return m; 241 } 242 243 }