@@ -13,23 +13,25 @@ public class DSMetadata {
1313
1414 public static final String BOOLEAN_RANGE = "booleanRange" ;
1515 public static final String DESCRIPTION = "description" ;
16- public static final String DECIMAL_PLACES = "decimalPlaces" ;
1716 public static final String DEFAULT = "default" ;
1817 public static final String DISPLAY_NAME = "displayName" ;
1918 public static final String EDITOR = "editor" ;
2019 public static final String ENUM_RANGE = "enumRange" ;
2120 public static final String NAME = "name" ;
22- public static final String MAX_VALUE = "maxValue " ;
23- public static final String MIN_VALUE = "minValue " ;
21+ public static final String MAX = "max " ;
22+ public static final String MIN = "min " ;
2423 public static final String PLACEHOLDER = "placeholder" ;
24+ public static final String PRECISION = "precision" ;
2525 public static final String TYPE = "type" ;
2626 public static final String UNIT = "unit" ;
2727
28- //public static final String EDITOR_DATE = "date";
29- //public static final String EDITOR_DATE_RANGE = "daterange";
30- //public static final String EDITOR_FILE_INPUT = "fileinput";
31- //public static final String EDITOR_PASSWORD = "password";
32- //public static final String EDITOR_TEXT_AREA = "textarea";
28+ public static final String NUM_EDITOR_INT = "int" ;
29+ public static final String NUM_EDITOR_COLOR = "color" ;
30+ public static final String STR_EDITOR_DATE = "date" ;
31+ public static final String STR_EDITOR_DATE_RANGE = "daterange" ;
32+ public static final String STR_EDITOR_FILE_INPUT = "fileinput" ;
33+ public static final String STR_EDITOR_PASSWORD = "password" ;
34+ public static final String STR_EDITOR_TEXT_AREA = "textarea" ;
3335
3436 ///////////////////////////////////////////////////////////////////////////
3537 // Fields
@@ -63,10 +65,6 @@ public DSMetadata clear(String key) {
6365 return this ;
6466 }
6567
66- public DSMap getMap () {
67- return map ;
68- }
69-
7068 /**
7169 * The boolean range, or null. If not null, the length will be 2, index 0 will be the false
7270 * text and index 1 the true text.
@@ -75,13 +73,6 @@ public DSList getBooleanRange() {
7573 return (DSList ) map .get (BOOLEAN_RANGE );
7674 }
7775
78- /**
79- * The decimal precision or null.
80- */
81- public DSLong getDecimalPlaces () {
82- return (DSLong ) map .get (DECIMAL_PLACES );
83- }
84-
8576 /**
8677 * The default value for an action parameter, or null.
8778 */
@@ -117,11 +108,15 @@ public DSList getEnumRange() {
117108 return map .getList (ENUM_RANGE );
118109 }
119110
111+ public DSMap getMap () {
112+ return map ;
113+ }
114+
120115 /**
121116 * The max value, or null.
122117 */
123118 public DSElement getMaxValue () {
124- return map .get (MAX_VALUE );
119+ return map .get (MAX );
125120 }
126121
127122 /**
@@ -152,7 +147,7 @@ public static DSMap getMetadata(DSInfo info, DSMap bucket) {
152147 * The min value, or null.
153148 */
154149 public DSElement getMinValue () {
155- return map .get (MIN_VALUE );
150+ return map .get (MIN );
156151 }
157152
158153 /**
@@ -169,6 +164,13 @@ public String getPlaceHolder() {
169164 return map .getString (PLACEHOLDER );
170165 }
171166
167+ /**
168+ * The decimal precision or null.
169+ */
170+ public DSLong getPrecision () {
171+ return (DSLong ) map .get (PRECISION );
172+ }
173+
172174 /**
173175 * The type for action parameters, can be used to override types in the responder api.
174176 */
@@ -233,13 +235,6 @@ public DSMetadata setDefault(DSIValue arg) {
233235 return this ;
234236 }
235237
236- public DSMetadata setDecimalPlaces (DSLong arg ) {
237- if (arg != null ) {
238- map .put (DECIMAL_PLACES , arg );
239- }
240- return this ;
241- }
242-
243238 public DSMetadata setDescription (String arg ) {
244239 if (arg != null ) {
245240 map .put (DESCRIPTION , arg );
@@ -298,7 +293,7 @@ public DSMetadata setMap(DSMap arg) {
298293 */
299294 public DSMetadata setMaxValue (DSElement arg ) {
300295 if (arg != null ) {
301- map .put (MIN_VALUE , arg );
296+ map .put (MIN , arg );
302297 }
303298 return this ;
304299 }
@@ -308,7 +303,7 @@ public DSMetadata setMaxValue(DSElement arg) {
308303 */
309304 public DSMetadata setMinValue (DSElement arg ) {
310305 if (arg != null ) {
311- map .put (MIN_VALUE , arg );
306+ map .put (MIN , arg );
312307 }
313308 return this ;
314309 }
@@ -330,6 +325,13 @@ public DSMetadata setPlaceHolder(String arg) {
330325 return this ;
331326 }
332327
328+ public DSMetadata setPrecision (DSLong arg ) {
329+ if (arg != null ) {
330+ map .put (PRECISION , arg );
331+ }
332+ return this ;
333+ }
334+
333335 /**
334336 * Sets the type and if the given is an enum, sets the enum range as well.
335337 */
0 commit comments