com.monad.homerun.base
Class Specifier

java.lang.Object
  extended by com.monad.homerun.base.Specifier
All Implemented Interfaces:
java.io.Serializable

public class Specifier
extends java.lang.Object
implements java.io.Serializable

Specifier is basically a glorified description of a property, i.e. a name/value pair, together with associated type, descriptive, and validation parameters. Some types are multi-valued, but are normalized to a comma-separated list of strings. Note that specifers are not themselves properties - they have no values - but are used to constrain the behavior of properties. Used in UIs for property editing

See Also:
Serialized Form

Field Summary
static java.lang.String BOOL_TYPE
          boolean type display: checkbox with 'enabled' label limiters: none
static java.lang.String ICON_TYPE
          icon type - single selection from a group of icons display: as icon label with a button to invoke IconBrowser widget to change limiters:
static java.lang.String INT_TYPE
          integer type display: text box limiters: - integerhood validated, & range-checked if specified
static java.lang.String LIST_TYPE
          list type - multiple selections (0-n) from user-entered strings: really a set type with unconstrained members display: text box + (Add/remove) buttons + text entry box limiters: unchecked, except for duplicates
static java.lang.String PICK_TYPE
          pick type - single selection from either (a) an enumerated set of values, or (b) a list of features in config data, or (c) list of values from object store display: uneditable text box + combo box limiters: (a) (b) / (c) @
static java.lang.String SET_TYPE
          set type - multiple selections (0-n) from either (a) an enumerated set of values or (b) a list of features in config data, or (c) list of values from object store display: text box + (Add/remove) check box + combo box limiters: (a) (b) / (c) @
static java.lang.String STRING_TYPE
          string type display: text box limiters: - unchecked, except length if range specified
 
Constructor Summary
Specifier()
           
Specifier(java.lang.String name, java.lang.String dataType, java.lang.String description, boolean required, java.lang.String limiters)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns equality of this specifier and another
 java.lang.String getDescription()
          Returns a user-friendly description of specifier
 java.lang.String getLimiters()
          Returns limiters
 java.lang.String getName()
          Returns the name (key) of the specifier
 java.lang.String getType()
          Returns the datatype of the specifier value
 boolean isRequired()
          Is the specifier required?
static java.lang.String[] resolveLimiters(LimiterResolver resolver, java.lang.String limiters)
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOL_TYPE

public static final java.lang.String BOOL_TYPE
boolean type display: checkbox with 'enabled' label limiters: none

See Also:
Constant Field Values

INT_TYPE

public static final java.lang.String INT_TYPE
integer type display: text box limiters: - integerhood validated, & range-checked if specified

See Also:
Constant Field Values

STRING_TYPE

public static final java.lang.String STRING_TYPE
string type display: text box limiters: - unchecked, except length if range specified

See Also:
Constant Field Values

PICK_TYPE

public static final java.lang.String PICK_TYPE
pick type - single selection from either (a) an enumerated set of values, or (b) a list of features in config data, or (c) list of values from object store display: uneditable text box + combo box limiters: (a) (b) / (c) @

See Also:
Constant Field Values

SET_TYPE

public static final java.lang.String SET_TYPE
set type - multiple selections (0-n) from either (a) an enumerated set of values or (b) a list of features in config data, or (c) list of values from object store display: text box + (Add/remove) check box + combo box limiters: (a) (b) / (c) @

See Also:
Constant Field Values

LIST_TYPE

public static final java.lang.String LIST_TYPE
list type - multiple selections (0-n) from user-entered strings: really a set type with unconstrained members display: text box + (Add/remove) buttons + text entry box limiters: unchecked, except for duplicates

See Also:
Constant Field Values

ICON_TYPE

public static final java.lang.String ICON_TYPE
icon type - single selection from a group of icons display: as icon label with a button to invoke IconBrowser widget to change limiters:

See Also:
Constant Field Values
Constructor Detail

Specifier

public Specifier()

Specifier

public Specifier(java.lang.String name,
                 java.lang.String dataType,
                 java.lang.String description,
                 boolean required,
                 java.lang.String limiters)
Method Detail

getName

public java.lang.String getName()
Returns the name (key) of the specifier

Returns:
name the specifier name

getDescription

public java.lang.String getDescription()
Returns a user-friendly description of specifier

Returns:
description description of specifier

isRequired

public boolean isRequired()
Is the specifier required?

Returns:
true if a value is required, false if optional

getType

public java.lang.String getType()
Returns the datatype of the specifier value

Returns:
type the datatype of the specifier value

getLimiters

public java.lang.String getLimiters()
Returns limiters

Returns:
limiters the limiters

equals

public boolean equals(java.lang.Object obj)
Returns equality of this specifier and another

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare
Returns:
true if equal, false if unequal

resolveLimiters

public static java.lang.String[] resolveLimiters(LimiterResolver resolver,
                                                 java.lang.String limiters)


Copyright © 2006-2009 Richard Rodgers. All Rights Reserved.