wt.eff
Class EffConfigSpecAssistant

java.lang.Object
  extended by wt.eff.EffConfigSpecAssistant
All Implemented Interfaces:
Externalizable, Serializable, RemoteAccess, wt.services.applicationcontext.ApplicationContextChild

public class EffConfigSpecAssistant
extends Object
implements RemoteAccess, wt.services.applicationcontext.ApplicationContextChild, Externalizable

Assistant for handling type conversions for the start and end values of any subclass of of an EffRange, and providing client and server-side APIs useful for EffConfigSpec, PersistableEffConfigSpec and EffConfigSpecGroup.

Supported API: true

Extendable: false

See Also:
Serialized Form

Method Summary
static EffConfigSpecGroup getEffConfigSpecGroup()
          Queries the DB for the EffConfigSpecGroup stored by the current principal.
static EffConfigSpec[] getValidEffConfigSpecs(EffContext effContext)
          Returns all the valid EffConfigSpecs for the context -- one for each valid Eff class.
static PersistableEffConfigSpec[] getValidPersistableEffConfigSpecs(EffContext effContext)
          Returns all the valid PersistableEffConfigSpecs for the context -- one for each valid Eff class.
static EffConfigSpecGroup saveEffConfigSpecGroup(EffConfigSpecGroup effConfigSpecGroup)
          Stores or modifies the EffConfigSpecGroup on the behalf of the current principal.
static void validateValue(Class effType, Serializable value)
          Validates the value.
static void validateValueAsString(Class effType, String valueAsString)
          Validates the value as a string.
static Serializable valueAsStringToValue(Class effType, String valueAsString)
          Converts the String representation of a value to the serialized object represented by the type.
static String valueToValueAsString(Class effType, Serializable value)
          Converts a value to a String..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getValidEffConfigSpecs

public static EffConfigSpec[] getValidEffConfigSpecs(EffContext effContext)
Returns all the valid EffConfigSpecs for the context -- one for each valid Eff class.

Supported API: true

Parameters:
effContext -
Returns:
EffConfigSpec[]

getValidPersistableEffConfigSpecs

public static PersistableEffConfigSpec[] getValidPersistableEffConfigSpecs(EffContext effContext)
Returns all the valid PersistableEffConfigSpecs for the context -- one for each valid Eff class.

Supported API: true

Parameters:
effContext -
Returns:
PersistableEffConfigSpec[]

valueToValueAsString

public static String valueToValueAsString(Class effType,
                                          Serializable value)
                                   throws WTPropertyVetoException
Converts a value to a String.. Uses EffHelper.getEffRange(Class) and getEffGroupRangeDelegate(Class) to get an EffGroupRangeDelegate so it can figure out what type of value for start or end of a Range to convert to a String.

Supported API: true

Parameters:
effType -
value -
Returns:
String
Throws:
WTPropertyVetoException

valueAsStringToValue

public static Serializable valueAsStringToValue(Class effType,
                                                String valueAsString)
                                         throws WTPropertyVetoException
Converts the String representation of a value to the serialized object represented by the type. Uses EffHelper.getEffRange(Class) and getEffGroupRangeDelegate(Class) to get an EffGroupRangeDelegate so it can figure out what type of value for start or end of a Range to convert the value to.

Supported API: true

Parameters:
effType -
valueAsString -
Returns:
Serializable
Throws:
WTPropertyVetoException

validateValue

public static void validateValue(Class effType,
                                 Serializable value)
                          throws WTPropertyVetoException
Validates the value.

Supported API: true

Parameters:
effType -
value -
Throws:
WTPropertyVetoException
See Also:
valueToValueAsString(java.lang.Class, java.io.Serializable)

validateValueAsString

public static void validateValueAsString(Class effType,
                                         String valueAsString)
                                  throws WTPropertyVetoException
Validates the value as a string.

Supported API: true

Parameters:
effType -
valueAsString -
Throws:
WTPropertyVetoException
See Also:
valueAsStringToValue(java.lang.Class, java.lang.String)

getEffConfigSpecGroup

public static EffConfigSpecGroup getEffConfigSpecGroup()
                                                throws WTException
Queries the DB for the EffConfigSpecGroup stored by the current principal. Returns null if one does not exist.

Supported API: true

Returns:
EffConfigSpecGroup
Throws:
WTException

saveEffConfigSpecGroup

public static EffConfigSpecGroup saveEffConfigSpecGroup(EffConfigSpecGroup effConfigSpecGroup)
                                                 throws WTException
Stores or modifies the EffConfigSpecGroup on the behalf of the current principal.

Supported API: true

Parameters:
effConfigSpecGroup -
Returns:
EffConfigSpecGroup
Throws:
WTException