stella.xml
Interface UserAdjustable

All Known Subinterfaces:
JUserAdjustable, UserDetails
All Known Implementing Classes:
ElementHelper, JElementHelper, JObjectHelper, MeritHelper, ObjectHelper, SequenceHelper

public interface UserAdjustable

An interface defining properties that are settable by the user.


Method Summary
 Map<String,Object> getDefined()
          Returns a map of all parameters set plus their current values.
 Object getID()
          Returns a unique id of this user adjustable.
 Map<String,Object> getMissing()
          Returns a map of all unset variables that are settable.
 Map<String,Object> getRequired()
          Returns a map of all required variables and their current values.
 Map<String,Object> getSettable()
          Returns a map of all settable variables.
 Class<?> getType(String name)
          Returns the class type of the value.
 Object getValue(String name)
          Returns the current value of the quoted variable.
 Map<String,Object> getVariables()
          Returns a map of all set and unset variables.
 boolean isValid()
          Returns true if this class has all required properties set.
 boolean setValue(String name, Object value)
          Sets a varibale of the given name to its value.
 boolean update()
          Updates dependant variables.
 

Method Detail

getID

Object getID()
Returns a unique id of this user adjustable. This can be a 'true' id used as an attribute to an XML-element, or it can be something like a varibale name, when it is assured that there will be only a single adjustable linked to a specific variable (more specific, think on a DTDConstants.CONSTRAINT element). For Meriting interfaces, the class name of the implementing class comes into mind.
ID's should never be settable by the user and defined right after construction/initialization (if the user adjustable is Initializable

Returns:
A unique identifier, normally a string.

update

boolean update()
Updates dependant variables. If some variables depend on others, and these other variables are set, their changes should not be reflected in the values of the dependant variables until this method is called. Normally, this method will return immediately.

Returns:
False, if update failed for whatever reason.

isValid

boolean isValid()
Returns true if this class has all required properties set. This can be either default values or user-adjusted values.


setValue

boolean setValue(String name,
                 Object value)
Sets a varibale of the given name to its value. If the value handed over is a string, the implementing class should cast it to the appropriate type or should parse the required class out of it.

Returns:
True if value setting was successful.

getValue

Object getValue(String name)
Returns the current value of the quoted variable. If the variable has not been set, null should be returned.


getType

Class<?> getType(String name)
Returns the class type of the value. This method should never return null, even if the value has not been set.


getDefined

Map<String,Object> getDefined()
Returns a map of all parameters set plus their current values.


getMissing

Map<String,Object> getMissing()
Returns a map of all unset variables that are settable.


getRequired

Map<String,Object> getRequired()
Returns a map of all required variables and their current values.


getVariables

Map<String,Object> getVariables()
Returns a map of all set and unset variables.


getSettable

Map<String,Object> getSettable()
Returns a map of all settable variables.