1 7 package com.inversoft.verge.mvc.config; 8 9 10 import java.util.HashMap ; 11 import java.util.Map ; 12 13 14 25 public class PropertyConfig extends BaseConfig { 26 27 private String id; 28 private String property; 29 private String type; 30 private String key; 31 private String bundleName; 32 private String errorMsg; 33 private Map parameters; 34 private boolean primitiveWrapper; 35 36 37 50 public PropertyConfig(String id, String property, String type, String key, 51 String bundleName, String errorMsg, Map parameters) { 52 super(id + "." + property); 53 this.id = id; 54 this.property = property; 55 this.type = type; 56 this.key = key; 57 this.bundleName = bundleName; 58 this.errorMsg = errorMsg; 59 this.parameters = parameters; 60 61 if (type != null) { 62 primitiveWrapper = (type.equals("char") || type.equals("byte") || 63 type.equals("short") || type.equals("int") || 64 type.equals("long") || type.equals("float") || 65 type.equals("double")); 66 } 67 } 68 69 70 76 public String getID() { 77 return id; 78 } 79 80 86 public String getProperty() { 87 return property; 88 } 89 90 96 public String getBundleName() { 97 return bundleName; 98 } 99 100 105 public String getErrorMsg() { 106 return errorMsg; 107 } 108 109 115 public String getKey() { 116 return key; 117 } 118 119 126 public Map getParameters() { 127 return new HashMap (parameters); 128 } 129 130 135 void setParameters(Map parameters) { 136 this.parameters = parameters; 137 } 138 139 145 Map getLiveParameters() { 146 return parameters; 147 } 148 149 154 public String getType() { 155 return type; 156 } 157 158 163 void setType(String type) { 164 this.type = type; 165 } 166 167 171 public boolean isPrimitiveOrWrapper() { 172 return primitiveWrapper; 173 } 174 } | Popular Tags |