1 18 19 20 package sync4j.framework.core; 21 22 import java.util.*; 23 24 32 public final class CTPropParam 33 implements java.io.Serializable { 34 35 private String propName; 37 private ArrayList valEnum = new ArrayList(); 38 private String displayName; 39 private String dataType; 40 private int size; 41 private ArrayList ctParameters = new ArrayList(); 42 43 45 46 protected CTPropParam() {} 47 48 61 public CTPropParam(final String propName, 62 final String [] valEnum, 63 final String displayName, 64 final ContentTypeParameter[] ctParameters) { 65 setPropName(propName); 66 setValEnum(valEnum); 67 setContentTypeParameters(ctParameters); 68 69 this.displayName = displayName; 70 } 71 72 73 88 public CTPropParam(final String propName, 89 final String dataType, 90 final int size, 91 final String displayName, 92 final ContentTypeParameter[] ctParameters) { 93 94 setPropName(propName); 95 setContentTypeParameters(ctParameters); 96 97 this.dataType = dataType; 98 this.size = size; 99 this.displayName = displayName; 100 } 101 102 104 109 public String getPropName() { 110 return propName; 111 } 112 113 118 public void setPropName(String propName) { 119 if (propName == null){ 120 throw new IllegalArgumentException ("propName cannot be null"); 121 } 122 this.propName = propName; 123 } 124 125 130 public ArrayList getValEnum() { 131 return this.valEnum; 132 } 133 134 139 public void setValEnum(String [] valEnum) { 140 if (valEnum != null) { 141 this.valEnum.clear(); 142 this.valEnum.addAll(Arrays.asList(valEnum)); 143 } else { 144 this.valEnum = null; 145 } 146 } 147 148 153 public String getDisplayName() { 154 return displayName; 155 } 156 157 162 public void setDisplayName(String displayName) { 163 this.displayName = displayName; 164 } 165 166 171 public String getDataType() { 172 return dataType; 173 } 174 175 180 public void setDataType(String dataType) { 181 this.dataType = dataType; 182 } 183 184 189 public int getSize() { 190 return size; 191 } 192 193 199 public void setSize(int size) { 200 this.size = size; 201 } 202 203 208 public ArrayList getContentTypeParameters() { 209 return this.ctParameters; 210 } 211 212 218 public void setContentTypeParameters(ContentTypeParameter[] ctParameters) { 219 if (ctParameters != null) { 220 this.ctParameters.clear(); 221 this.ctParameters.addAll(Arrays.asList(ctParameters)); 222 } else { 223 this.ctParameters = null; 224 } 225 } 226 } 227 | Popular Tags |