001/* 002 * Copyright 2009 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 1.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/ecl1.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 */ 016package org.kuali.ole.sec.businessobject; 017 018import java.util.LinkedHashMap; 019 020import org.kuali.ole.sec.SecPropertyConstants; 021import org.kuali.rice.core.api.mo.common.active.MutableInactivatable; 022import org.kuali.rice.core.api.util.type.KualiInteger; 023import org.kuali.rice.krad.bo.PersistableBusinessObjectBase; 024 025 026/** 027 * 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 028 */ 029public class SecurityModelDefinition extends AbstractSecurityModelDefinition { 030 protected KualiInteger modelDefinitionId; 031 protected KualiInteger modelId; 032 033 /** 034 * Gets the modelDefinitionId attribute. 035 * 036 * @return Returns the modelDefinitionId. 037 */ 038 public KualiInteger getModelDefinitionId() { 039 return modelDefinitionId; 040 } 041 042 043 /** 044 * Sets the modelDefinitionId attribute value. 045 * 046 * @param modelDefinitionId The modelDefinitionId to set. 047 */ 048 public void setModelDefinitionId(KualiInteger modelDefinitionId) { 049 this.modelDefinitionId = modelDefinitionId; 050 } 051 052 053 /** 054 * Gets the modelId attribute. 055 * 056 * @return Returns the modelId. 057 */ 058 public KualiInteger getModelId() { 059 return modelId; 060 } 061 062 063 /** 064 * Sets the modelId attribute value. 065 * 066 * @param modelId The modelId to set. 067 */ 068 public void setModelId(KualiInteger modelId) { 069 this.modelId = modelId; 070 } 071 072 073 @Override 074 public String toString() { 075 StringBuilder builder = new StringBuilder(); 076 builder.append("SecurityModelDefinition ["); 077 if (modelDefinitionId != null) { 078 builder.append("modelDefinitionId="); 079 builder.append(modelDefinitionId); 080 builder.append(", "); 081 } 082 if (modelId != null) { 083 builder.append("modelId="); 084 builder.append(modelId); 085 builder.append(", "); 086 } 087 if (definitionId != null) { 088 builder.append("definitionId="); 089 builder.append(definitionId); 090 builder.append(", "); 091 } 092 if (constraintCode != null) { 093 builder.append("constraintCode="); 094 builder.append(constraintCode); 095 builder.append(", "); 096 } 097 if (operatorCode != null) { 098 builder.append("operatorCode="); 099 builder.append(operatorCode); 100 builder.append(", "); 101 } 102 if (attributeValue != null) { 103 builder.append("attributeValue="); 104 builder.append(attributeValue); 105 builder.append(", "); 106 } 107 builder.append("overrideDeny="); 108 builder.append(overrideDeny); 109 builder.append("]"); 110 return builder.toString(); 111 } 112 113 114}