001: package org.openwfe.gpe.model;
002:
003: import org.eclipse.ui.views.properties.IPropertyDescriptor;
004: import org.eclipse.ui.views.properties.TextPropertyDescriptor;
005:
006: /**
007: *
008: * @author helena
009: *
010: */
011: public class ConcurrenceComposite extends Composite {
012:
013: private String sync = "last-wins";
014: private String count = "";
015: private String merge = "";
016: private String mergeType = "";
017: private String remaining = "";
018: public static String name = "Concurrence";
019:
020: protected static IPropertyDescriptor[] descriptors;
021:
022: public static final String SYNC = "sync";
023: public static final String COUNT = "count";
024: public static final String MERGE = "merge";
025: public static final String MERGETYPE = "merge-type";
026: public static final String REMAINING = "remaining";
027:
028: static {
029: descriptors = new IPropertyDescriptor[] {
030: new TextPropertyDescriptor(SYNC, "sync"),
031: new TextPropertyDescriptor(COUNT, "count"),
032: new TextPropertyDescriptor(MERGE, "merge"),
033: new TextPropertyDescriptor(MERGETYPE, "merge-type"),
034: new TextPropertyDescriptor(REMAINING, "remaining"), };
035: }
036:
037: public String getName() {
038: return name;
039: }
040:
041: public void setName(String s) {
042: name = s;
043: }
044:
045: public String getSync() {
046: return sync;
047: }
048:
049: public void setSync(String s) {
050: sync = s;
051: firePropertyChange(SYNC, null, s);
052: }
053:
054: public String getCount() {
055: return count;
056: }
057:
058: public void setCount(String s) {
059: count = s;
060: firePropertyChange(COUNT, null, s);
061: }
062:
063: public String getMerge() {
064: return merge;
065: }
066:
067: public void setMerge(String s) {
068: merge = s;
069: firePropertyChange(MERGE, null, s);
070: }
071:
072: public String getMergeType() {
073: return mergeType;
074: }
075:
076: public void setMergeType(String s) {
077: mergeType = s;
078: firePropertyChange(MERGETYPE, null, s);
079: }
080:
081: public String getRemaining() {
082: return remaining;
083: }
084:
085: public void setRemaining(String s) {
086: remaining = s;
087: firePropertyChange(REMAINING, null, s);
088: }
089:
090: public IPropertyDescriptor[] getPropertyDescriptors() {
091: return descriptors;
092: }
093:
094: public Object getPropertyValue(Object propName) {
095: if (SYNC.equals(propName))
096: return getSync();
097: if (COUNT.equals(propName))
098: return getCount();
099: if (MERGE.equals(propName))
100: return getMerge();
101: if (MERGETYPE.equals(propName))
102: return getMergeType();
103: if (REMAINING.equals(propName))
104: return getRemaining();
105: return super .getPropertyValue(propName);
106: }
107:
108: public void setPropertyValue(Object id, Object value) {
109: if (id == SYNC)
110: setSync((String) value);
111: if (id == COUNT)
112: setCount((String) value);
113: if (id == MERGE)
114: setMerge((String) value);
115: if (id == MERGETYPE)
116: setMergeType((String) value);
117: if (id == REMAINING)
118: setRemaining((String) value);
119: }
120: }
|