001: /*
002: * Copyright 2001-2006 C:1 Financial Services GmbH
003: *
004: * This software is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU Lesser General Public
006: * License Version 2.1, as published by the Free Software Foundation.
007: *
008: * This software is distributed in the hope that it will be useful,
009: * but WITHOUT ANY WARRANTY; without even the implied warranty of
010: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
011: * Lesser General Public License for more details.
012: *
013: * You should have received a copy of the GNU Lesser General Public
014: * License along with this library; if not, write to the Free Software
015: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
016: */
017:
018: package de.finix.contelligent.client.base;
019:
020: import java.io.Serializable;
021:
022: public class ComponentProperty implements Serializable, Editable {
023:
024: private ContelligentComponent component;
025:
026: private String name;
027:
028: private String value;
029:
030: private TypeProperty typeProperty;
031:
032: private PropertyDescriptor descriptor = null;
033:
034: public ComponentProperty(ContelligentComponent component,
035: String name, String value, TypeProperty typeProperty) {
036: this .component = component;
037: this .name = name;
038: this .value = value;
039: this .typeProperty = typeProperty;
040: }
041:
042: public void setPropertyDescriptor(PropertyDescriptor descriptor) {
043: this .descriptor = descriptor;
044: }
045:
046: public PropertyDescriptor getPropertyDescriptor() {
047: return descriptor;
048: }
049:
050: public boolean hasPropertyDescriptor() {
051: if (descriptor == null) {
052: return false;
053: }
054: return true;
055: }
056:
057: public TypeProperty getTypeProperty() {
058: return typeProperty;
059: }
060:
061: public void setTypeProperty(TypeProperty typeProperty) {
062: this .typeProperty = typeProperty;
063: }
064:
065: public String getValue() {
066: return value;
067: }
068:
069: public void setValue(String value) {
070: this .value = value;
071: }
072:
073: public String getInitialValue() {
074: return typeProperty.getValue();
075: }
076:
077: public void setName(String name) {
078: this .name = name;
079: }
080:
081: public String getName() {
082: return name;
083: }
084:
085: public boolean isFinal() {
086: return typeProperty.isFinal();
087: }
088:
089: public boolean isRequired() {
090: return typeProperty.isRequired();
091: }
092:
093: public String getMode() {
094: return typeProperty.getMode();
095: }
096:
097: public String getGroup() {
098: return typeProperty.getGroup();
099: }
100:
101: public void setComponent(ContelligentComponent component) {
102: this .component = component;
103: }
104:
105: public ContelligentComponent getComponent() {
106: return component;
107: }
108: }
|