001: /*
002: * Created on 17 mai 2005
003: *
004: */
005: package org.openwfe.gpe.model;
006:
007: import org.eclipse.ui.views.properties.IPropertyDescriptor;
008: import org.eclipse.ui.views.properties.TextPropertyDescriptor;
009:
010: /**
011: * @author Christelle
012: *
013: */
014: public class ConcurrentIteratorElement extends OneChild {
015:
016: public static String name = "Concurrent-Iterator";
017: private String onValue = "";
018: private String toField = "";
019: private String onFieldValue = "";
020: private String valueSeparator = "";
021:
022: protected static IPropertyDescriptor[] descriptors;
023:
024: public static final String ONVALUE = "on-value"; //$NON-NLS-1$
025: public static final String TOFIELD = "to-field";
026: public static final String ONFIELDVALUE = "on-field-value";
027: public static final String VALUESEPARATOR = "value-separator";
028: static {
029: descriptors = new IPropertyDescriptor[] {
030: new TextPropertyDescriptor(ONVALUE, "on-value"),
031: new TextPropertyDescriptor(TOFIELD, "to-field"),
032: new TextPropertyDescriptor(ONFIELDVALUE,
033: "on-field-value"),
034: new TextPropertyDescriptor(VALUESEPARATOR,
035: "value-separator") };
036: }
037:
038: public String getName() {
039: return name;
040: }
041:
042: public void setName(String s) {
043: name = s;
044: }
045:
046: /**
047: * @return Returns the onValue.
048: */
049: public String getOnValue() {
050: return onValue;
051: }
052:
053: /**
054: * @param onValue The onValue to set.
055: */
056: public void setOnValue(String onValue) {
057: this .onValue = onValue;
058: firePropertyChange(ONVALUE, null, onValue);
059: }
060:
061: /**
062: * @return Returns the toField.
063: */
064: public String getToField() {
065: return toField;
066: }
067:
068: /**
069: * @param toField The toField to set.
070: */
071: public void setToField(String toField) {
072: this .toField = toField;
073: firePropertyChange(TOFIELD, null, toField);
074: }
075:
076: /**
077: * @return Returns the onFieldValueField.
078: */
079: public String getOnFieldValue() {
080: return onFieldValue;
081: }
082:
083: public void setOnFieldValue(String s) {
084: this .onFieldValue = s;
085: firePropertyChange(ONFIELDVALUE, null, s);
086: }
087:
088: /**
089: * @return Returns the valueSeparator.
090: */
091: public String getValueSeparator() {
092: return valueSeparator;
093: }
094:
095: /**
096: * @param valueSeparator The valueSeparator to set.
097: */
098: public void setValueSeparator(String valueSeparator) {
099: this .valueSeparator = valueSeparator;
100: firePropertyChange(VALUESEPARATOR, null, valueSeparator);
101: }
102:
103: public IPropertyDescriptor[] getPropertyDescriptors() {
104: return descriptors;
105: }
106:
107: public Object getPropertyValue(Object propName) {
108: if (TOFIELD.equals(propName))
109: return getToField();
110: if (ONFIELDVALUE.equals(propName))
111: return getOnFieldValue();
112: if (ONVALUE.equals(propName))
113: return getOnValue();
114: if (VALUESEPARATOR.equals(propName))
115: return getValueSeparator();
116: return super .getPropertyValue(propName);
117: }
118:
119: public void setPropertyValue(Object id, Object value) {
120: if (id == ONVALUE)
121: setOnValue((String) value);
122: if (id == TOFIELD)
123: setToField((String) value);
124: if (id == ONFIELDVALUE)
125: setOnFieldValue((String) value);
126: if (id == VALUESEPARATOR)
127: setValueSeparator((String) value);
128: }
129:
130: }
|