001/*
002 * Copyright 2008 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 */
016package org.kuali.ole.sys.businessobject;
017
018import java.util.LinkedHashMap;
019
020import org.kuali.rice.krad.bo.TransientBusinessObjectBase;
021import org.kuali.rice.krad.datadictionary.AttributeDefinition;
022
023public class BusinessObjectProperty extends TransientBusinessObjectBase {
024    private String namespaceCode;
025    private String componentClass;
026    private String propertyName;
027    private String propertyLabel;
028
029    private BusinessObjectComponent businessObjectComponent;
030    
031    public BusinessObjectProperty() {
032    }
033    
034    public BusinessObjectProperty(BusinessObjectComponent businessObjectComponent, AttributeDefinition attributeDefinition) {
035        setBusinessObjectComponent(businessObjectComponent);
036        setNamespaceCode(businessObjectComponent.getNamespaceCode());
037        setComponentClass(businessObjectComponent.getComponentClass());
038        setPropertyName(attributeDefinition.getName());
039        setPropertyLabel(attributeDefinition.getLabel());
040    }
041
042    public String getNamespaceCode() {
043        return namespaceCode;
044    }
045
046    public void setNamespaceCode(String namespaceCode) {
047        this.namespaceCode = namespaceCode;
048    }
049
050    public String getComponentClass() {
051        return componentClass;
052    }
053
054    public void setComponentClass(String componentClass) {
055        this.componentClass = componentClass;
056    }
057
058    public String getPropertyName() {
059        return propertyName;
060    }
061
062    public void setPropertyName(String propertyName) {
063        this.propertyName = propertyName;
064    }
065
066    public String getPropertyLabel() {
067        return propertyLabel;
068    }
069
070    public void setPropertyLabel(String propertyLabel) {
071        this.propertyLabel = propertyLabel;
072    }
073
074    public BusinessObjectComponent getBusinessObjectComponent() {
075        return businessObjectComponent;
076    }
077
078    public void setBusinessObjectComponent(BusinessObjectComponent businessObjectComponent) {
079        this.businessObjectComponent = businessObjectComponent;
080    }
081
082    
083    protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
084        LinkedHashMap<String, String> toString = new LinkedHashMap<String, String>();
085        toString.put("namespaceCode", getNamespaceCode());
086        toString.put("componentClass", getComponentClass());
087        toString.put("propertyName", getPropertyName());
088        return toString;
089    }
090}