001    /**
002     * Copyright 2005-2013 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.rice.krms.impl.repository;
017    
018    import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
019    import org.kuali.rice.krms.api.repository.BaseAttributeContract;
020    import org.kuali.rice.krms.api.repository.type.KrmsAttributeDefinitionContract;
021    
022    /**
023     * This class contains the common elements of a KRMS attribute.
024     * <p>
025     * Attributes provide a way to attach custom data to an entity based on that entity's type.
026     * Rules, Actions, Contexts, Agendas and Term Resolvers have their own specific
027     * attribute types. This class contains their common fields.
028     *
029     * @author Kuali Rice Team (rice.collab@kuali.org)
030     *
031     */
032    public class BaseJavaAttributeBo extends PersistableBusinessObjectBase implements BaseAttributeContract {
033    
034        private static final long serialVersionUID = -5827561613196341837L;
035        private String id;
036        private String attributeDefinitionId;
037        private String value;
038        private KrmsAttributeDefinitionBo attributeDefinition;
039    
040        @Override
041        public KrmsAttributeDefinitionContract getAttributeDefinition() {
042            return attributeDefinition;
043        }
044    
045        @Override
046        public String getAttributeDefinitionId() {
047            return attributeDefinition.getId();
048        }
049    
050        @Override
051        public String getId() {
052            return id;
053        }
054    
055        @Override
056        public String getValue() {
057            return value;
058        }
059    
060        public void setAttributeDefinition(KrmsAttributeDefinitionBo attributeDefinition) {
061            this.attributeDefinition = attributeDefinition;
062        }
063    
064        public void setAttributeDefinitionId(String attributeDefinitionId) {
065            this.attributeDefinitionId = attributeDefinitionId;
066        }
067    
068        public void setId(String id) {
069            this.id = id;
070        }
071    
072        public void setValue(String value) {
073            this.value = value;
074        }
075    
076    }