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.sys.businessobject;
017
018 import java.util.LinkedHashMap;
019
020 import org.kuali.rice.kns.bo.TransientBusinessObjectBase;
021 import org.kuali.rice.kns.datadictionary.BusinessObjectEntry;
022
023 public class BusinessObjectComponent extends TransientBusinessObjectBase {
024 private String namespaceCode;
025 private String componentClass;
026 private String componentLabel;
027
028 public BusinessObjectComponent() {
029 }
030
031 public BusinessObjectComponent(String namespaceCode, BusinessObjectEntry businessObjectEntry) {
032 setNamespaceCode(namespaceCode);
033 setComponentClass(businessObjectEntry.getBusinessObjectClass().getName());
034 setComponentLabel(businessObjectEntry.getObjectLabel());
035 }
036
037 public String getNamespaceCode() {
038 return namespaceCode;
039 }
040
041 public void setNamespaceCode(String namespaceCode) {
042 this.namespaceCode = namespaceCode;
043 }
044
045 public String getComponentClass() {
046 return componentClass;
047 }
048
049 public void setComponentClass(String componentClass) {
050 this.componentClass = componentClass;
051 }
052
053 public String getComponentLabel() {
054 return componentLabel;
055 }
056
057 public void setComponentLabel(String componentLabel) {
058 this.componentLabel = componentLabel;
059 }
060
061 @Override
062 protected LinkedHashMap toStringMapper() {
063 LinkedHashMap<String, String> toString = new LinkedHashMap<String, String>();
064 toString.put("namespaceCode", getNamespaceCode());
065 toString.put("componentClass", getComponentClass());
066 return toString;
067 }
068 }