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.ole.sys.OLEPropertyConstants;
022import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
023import org.kuali.rice.core.api.util.type.KualiInteger;
024import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
025
026
027/**
028 * Attribute Security Principal Definition
029 */
030public class SecurityPrincipalDefinition extends AbstractSecurityModelDefinition {
031    protected KualiInteger principalDefinitionId;
032    protected String principalId;
033
034    /**
035     * Gets the principalDefinitionId attribute.
036     * 
037     * @return Returns the principalDefinitionId.
038     */
039    public KualiInteger getPrincipalDefinitionId() {
040        return principalDefinitionId;
041    }
042
043
044    /**
045     * Sets the principalDefinitionId attribute value.
046     * 
047     * @param principalDefinitionId The principalDefinitionId to set.
048     */
049    public void setPrincipalDefinitionId(KualiInteger principalDefinitionId) {
050        this.principalDefinitionId = principalDefinitionId;
051    }
052
053
054    /**
055     * Gets the principalId attribute.
056     * 
057     * @return Returns the principalId.
058     */
059    public String getPrincipalId() {
060        return principalId;
061    }
062
063
064    /**
065     * Sets the principalId attribute value.
066     * 
067     * @param principalId The principalId to set.
068     */
069    public void setPrincipalId(String principalId) {
070        this.principalId = principalId;
071    }
072
073
074    @Override
075    public String toString() {
076        StringBuilder builder = new StringBuilder();
077        builder.append("SecurityPrincipalDefinition [");
078        if (principalDefinitionId != null) {
079            builder.append("principalDefinitionId=");
080            builder.append(principalDefinitionId);
081            builder.append(", ");
082        }
083        if (principalId != null) {
084            builder.append("principalId=");
085            builder.append(principalId);
086            builder.append(", ");
087        }
088        if (definitionId != null) {
089            builder.append("definitionId=");
090            builder.append(definitionId);
091            builder.append(", ");
092        }
093        if (constraintCode != null) {
094            builder.append("constraintCode=");
095            builder.append(constraintCode);
096            builder.append(", ");
097        }
098        if (operatorCode != null) {
099            builder.append("operatorCode=");
100            builder.append(operatorCode);
101            builder.append(", ");
102        }
103        if (attributeValue != null) {
104            builder.append("attributeValue=");
105            builder.append(attributeValue);
106            builder.append(", ");
107        }
108        builder.append("overrideDeny=");
109        builder.append(overrideDeny);
110        builder.append("]");
111        return builder.toString();
112    }
113
114    
115}