com.isti.util
Class PropItem

java.lang.Object
  extended bycom.isti.util.IstiNamedValue
      extended bycom.isti.util.PropItem
All Implemented Interfaces:
IstiNamedValueInterface, PropItemInterface

public class PropItem
extends IstiNamedValue
implements PropItemInterface

Class PropItem defines a property item object.


Field Summary
protected  java.lang.Object auxiliaryObj
           
protected  java.lang.Object groupSelObj
           
protected  CfgPropValidator validatorObj
           
 
Fields inherited from interface com.isti.util.IstiNamedValueInterface
sepCh
 
Constructor Summary
PropItem(java.lang.String valueName, java.lang.Object defaultValueObj)
          Creates a value.
PropItem(java.lang.String valueName, java.lang.Object defaultValueObj, java.lang.Object valueObj, java.lang.String descriptionStr)
          Creates a value.
PropItem(java.lang.String valueName, java.lang.Object defaultValueObj, java.lang.String descriptionStr)
          Creates a value.
 
Method Summary
protected  java.lang.Object checkValue(java.lang.Object valueObj)
          Checks the value object.
 java.lang.Object clone()
          Creates and returns a clone of this object.
 java.lang.Object getAuxiliaryObj()
          Returns the "auxiliary" object for this value.
 java.lang.String getDescriptionStr()
          Returns the description string.
 java.lang.Object getGroupSelObj()
          Returns the group-select object for this item.
 CfgPropValidator getValidator()
          Gets the validator object for this item.
 PropItem setAuxiliaryObj(java.lang.Object obj)
          Sets the "auxiliary" object for this item.
 PropItem setGroupSelObj(java.lang.Object obj)
          Sets the group-select object for this item.
 PropItem setValidator(CfgPropValidator validatorObj)
          Sets the validator for this item.
static boolean validateValue(CfgPropValidator validatorObj, java.lang.Object valueObj)
          Checks that the given object is a valid data value using the specified validator.
 
Methods inherited from class com.isti.util.IstiNamedValue
determineStringValue, getDefaultValue, getName, getValue, isDefaultValue, setValue, setValueString, setValueString, stringValue, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.isti.util.IstiNamedValueInterface
getDefaultValue, getName, getValue, isDefaultValue, setValue, setValueString, stringValue
 

Field Detail

auxiliaryObj

protected java.lang.Object auxiliaryObj

groupSelObj

protected java.lang.Object groupSelObj

validatorObj

protected CfgPropValidator validatorObj
Constructor Detail

PropItem

public PropItem(java.lang.String valueName,
                java.lang.Object defaultValueObj)
Creates a value.

Parameters:
valueName - the value name.
defaultValueObj - the default value object.

PropItem

public PropItem(java.lang.String valueName,
                java.lang.Object defaultValueObj,
                java.lang.String descriptionStr)
Creates a value.

Parameters:
valueName - the value name.
defaultValueObj - the default value object.
descriptionStr - the description text or null for the default.

PropItem

public PropItem(java.lang.String valueName,
                java.lang.Object defaultValueObj,
                java.lang.Object valueObj,
                java.lang.String descriptionStr)
Creates a value.

Parameters:
valueName - the value name.
defaultValueObj - the default value object.
valueObj - the value object or null for the default.
descriptionStr - the description text or null for the default.
Method Detail

clone

public java.lang.Object clone()
Creates and returns a clone of this object.

Specified by:
clone in interface IstiNamedValueInterface
Overrides:
clone in class IstiNamedValue
Returns:
a clone of the this object.

getAuxiliaryObj

public java.lang.Object getAuxiliaryObj()
Returns the "auxiliary" object for this value.

Specified by:
getAuxiliaryObj in interface PropItemInterface
Returns:
A handle to the "auxiliary" object.

getDescriptionStr

public java.lang.String getDescriptionStr()
Returns the description string.

Specified by:
getDescriptionStr in interface PropItemInterface
Returns:
the description string.

getGroupSelObj

public java.lang.Object getGroupSelObj()
Returns the group-select object for this item.

Specified by:
getGroupSelObj in interface PropItemInterface
Returns:
handle to the group-select object.

getValidator

public CfgPropValidator getValidator()
Gets the validator object for this item.

Specified by:
getValidator in interface PropItemInterface
Returns:
handle to the validator object.

setAuxiliaryObj

public PropItem setAuxiliaryObj(java.lang.Object obj)
Sets the "auxiliary" object for this item.

Parameters:
obj - the value of the object.
Returns:
A handle to this object.

setGroupSelObj

public PropItem setGroupSelObj(java.lang.Object obj)
Sets the group-select object for this item.

Parameters:
obj - the group-select object to use.
Returns:
A handle to this object.

setValidator

public PropItem setValidator(CfgPropValidator validatorObj)
Sets the validator for this item.

Parameters:
validatorObj - a 'CfgPropValidator' object.
Returns:
A handle to this object.

validateValue

public static boolean validateValue(CfgPropValidator validatorObj,
                                    java.lang.Object valueObj)
Checks that the given object is a valid data value using the specified validator.

Parameters:
validatorObj - a 'CfgPropValidator' object.
valueObj - the value of the object.
Returns:
true if the given object is valid (or if no validator has been setup), false if not.

checkValue

protected java.lang.Object checkValue(java.lang.Object valueObj)
Checks the value object.

Overrides:
checkValue in class IstiNamedValue
Parameters:
valueObj - the value object.
Returns:
the value object or null if invalid value.