wt.fc.dynamicenum
Class DynamicEnumerationHelper

java.lang.Object
  extended bywt.fc.dynamicenum.DynamicEnumerationHelper
All Implemented Interfaces:
Externalizable, Serializable

public final class DynamicEnumerationHelper
extends Object
implements Externalizable



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static Locale userLocale
           
private static Hashtable valueMap
           
 
Constructor Summary
DynamicEnumerationHelper()
           
 
Method Summary
static boolean add(WTContainer container, String dynamicEnumType, String dynamicEnumValue)
          Adds the specified value to the FilteredDynamicEnum.
static QueryResult add(WTContainer container, String dynamicEnumType, WTLargeStringSet dynamicValues, WTLargeStringSet excludedValues)
          Add a FilteredDynamicEnumSet instance associated to the Container.
private static FilteredDynamicEnumSet findSet(WTContainer container, String dynamicEnumType, boolean searchHierarchy)
           
private static FilteredDynamicEnumSet findSet(WTContainer container, String dynamicEnumType, boolean searchHierarchy, HashMap ancestorValues)
           
static WTLargeStringSet getBaseValues(String enumType)
          

Supported API: false
static QueryResult getDynamicValueSet(WTContainer container, String dynamicEnumType, boolean searchHierarchy)
          Answers a wt.fc.QueryResult (of type String) of the dynamic values for the specified FilteredDynamicEnumSet.
static FilteredDynamicEnumSet getEnumeratedType(WTContainer container, String dynamicEnumType, boolean searchHierarchy)
          Answers an java.util.Enumeration of the values of a FilteredDynamicEnumSet associated with specified Container and based on a specified DynamicEnumType.
private static FilteredDynamicEnumSet getEnumeratedType(WTContainer container, String dynamicEnumType, boolean searchHierarchy, HashMap ancestorValueSets)
          Answers an java.util.Enumeration of the values of a FilteredDynamicEnumSet associated with specified Container and based on a specified DynamicEnumType.
static EnumeratedType getEnumeratedType(WTContainer container, String dynamicEnumType, String value)
          This will take the Value passed in and look to see if corresponding enumerations from the parent Enumerated Type.
static QueryResult getEnumeratedTypes(WTContainer container, boolean searchHierarchy)
          Answers a wt.fc.QueryResult of the DynamicEnumType class names for all FilteredDynamicEnumSet's associated with specified Container.
static QueryResult getExcludedValueSet(WTContainer container, String dynamicEnumType, boolean searchHierarchy)
          Answers a wt.fc.QueryResult (of type String) of the excludedValueSet for the specified FilteredDynamicEnumSet.
static QueryResult getFilteredDynamicEnumeration(WTContainer container, String dynamicEnumType, boolean searchHierarchy)
          Answers a wt.fc.QueryResult (of type String) of values for the specified FilteredDynamicEnumSet.
static WTLargeStringSet getPublicBaseValues(String filteredType)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(DynamicEnumerationHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
static void removeAll(WTContainer container)
          Remove all FilteredDynamicEnumSet instances associated with the container

Supported API: false
static void removeType(WTContainer container, String dynamicEnumType)
          Remove the FilteredDynamicEnumSet for the specified DynamicEnumType and container.
static QueryResult removeValue(WTContainer container, String dynamicEnumType, String value)
          Remove the specified value from the FilteredDynamicEnumSet.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

valueMap

private static Hashtable valueMap

userLocale

private static Locale userLocale
Constructor Detail

DynamicEnumerationHelper

public DynamicEnumerationHelper()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(DynamicEnumerationHelper thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getExcludedValueSet

public static QueryResult getExcludedValueSet(WTContainer container,
                                              String dynamicEnumType,
                                              boolean searchHierarchy)
                                       throws WTException
Answers a wt.fc.QueryResult (of type String) of the excludedValueSet for the specified FilteredDynamicEnumSet.

Supported API: false

Parameters:
container - Object that the dynamic enumeration instance is associated to.
dynamicEnumType - The String name of the DynamicEnumType. This must be the fully qualified class name of a class derived from wt.fc.DynamicEnumType.
searchHierarchy - If true, will seach up the Container hierarchy to find a FilteredDynamicEnumSet based on the specified DynamicEnumType. If false, will only return a FilteredDynamicEnumSet for the specified (Container and DnynamicEnumType.
Returns:
QueryResult
Throws:
WTException

getFilteredDynamicEnumeration

public static QueryResult getFilteredDynamicEnumeration(WTContainer container,
                                                        String dynamicEnumType,
                                                        boolean searchHierarchy)
                                                 throws WTException
Answers a wt.fc.QueryResult (of type String) of values for the specified FilteredDynamicEnumSet. This represents both the filtered values from inherited from the parent container (or from the DynamicEnumType), and dynamic values for the specified FilteredDynamicEnumSet. The FilteredDynamicEnumSet is specified by its container, and the classname of the DynamicEnumType on which it is based.

Supported API: false

Parameters:
container - Object that the dynamic enumeration instance is associated to.
dynamicEnumType - The String name of the DynamicEnumType. This must be the fully qualified class name of a class derived from wt.fc.DynamicEnumType.
searchHierarchy - If true, will seach up the Container hierarchy to find a FilteredDynamicEnumSet based on the specified DynamicEnumType. If false, will only return a FilteredDynamicEnumSet for the specified (Container and DnynamicEnumType.
Returns:
QueryResult
Throws:
WTException

getEnumeratedTypes

public static QueryResult getEnumeratedTypes(WTContainer container,
                                             boolean searchHierarchy)
                                      throws WTException
Answers a wt.fc.QueryResult of the DynamicEnumType class names for all FilteredDynamicEnumSet's associated with specified Container.

Supported API: false

Parameters:
container -
searchHierarchy - If true, will seach up the Container hierarchy to find a FilteredDynamicEnumSet based on the specified DynamicEnumType. If false, will only return a FilteredDynamicEnumSet for the specified (Container and DnynamicEnumType.
Returns:
QueryResult
Throws:
WTException

removeValue

public static QueryResult removeValue(WTContainer container,
                                      String dynamicEnumType,
                                      String value)
                               throws WTException,
                                      WTPropertyVetoException
Remove the specified value from the FilteredDynamicEnumSet. If the value is inherited from the parent container or from the DynamicEnumType, the excludedValueSet is used to remove it; if the value is listed in the dynamicValueSet, it is removed there. Answers a wt.fc.QueryResult of the new filtered value set

Supported API: false

Parameters:
container -
dynamicEnumType - The String name of the DynamicEnumType. This must be the fully qualified class name of a class derived from wt.fc.DynamicEnumType.
value - The value to be removed from the FilteredDynamicEnumSet.
Returns:
QueryResult
Throws:
WTException
WTPropertyVetoException

removeType

public static void removeType(WTContainer container,
                              String dynamicEnumType)
                       throws WTException
Remove the FilteredDynamicEnumSet for the specified DynamicEnumType and container.

Supported API: false

Parameters:
container -
dynamicEnumType -
Throws:
WTException

removeAll

public static void removeAll(WTContainer container)
                      throws WTException
Remove all FilteredDynamicEnumSet instances associated with the container

Supported API: false

Parameters:
container -
Throws:
WTException

add

public static QueryResult add(WTContainer container,
                              String dynamicEnumType,
                              WTLargeStringSet dynamicValues,
                              WTLargeStringSet excludedValues)
                       throws WTException,
                              WTPropertyVetoException
Add a FilteredDynamicEnumSet instance associated to the Container. The values returned by this set will be: (inherited set + dynamic values) - excluded values. The inherited values are those provided by the nearest-ancestor FilteredDynamicEnumSet in the container hierarchy, for the same dynamicEnumType; or if none, by the DynamicEnumType itself. Returns a wt.fc.QueryResult listing the values of the set.

Supported API: false

Parameters:
container - Object that the Dynamic Enumeration Instance will be associated to
dynamicEnumType - The String name of the DynamicEnumType. This must be the fully qualified class name of a class derived from wt.fc.DynamicEnumType.
dynamicValues - The ad-hoc valueSet that willl that extends the base (inherited) list. The values returned by this set will be: (inherited set + dynamic values) - excluded values.
excludedValues - The list of values which will be excluded from the set. The values returned by this set will be: (inherited set + dynamic values) - excluded values.
Returns:
QueryResult
Throws:
WTException
WTPropertyVetoException

add

public static boolean add(WTContainer container,
                          String dynamicEnumType,
                          String dynamicEnumValue)
                   throws WTException
Adds the specified value to the FilteredDynamicEnum. Answers a java.util.Enumeration of the new filtered value set

Supported API: false

Parameters:
container -
dynamicEnumType -
dynamicEnumValue -
Returns:
boolean
Throws:
WTException

getEnumeratedType

public static FilteredDynamicEnumSet getEnumeratedType(WTContainer container,
                                                       String dynamicEnumType,
                                                       boolean searchHierarchy)
                                                throws WTException
Answers an java.util.Enumeration of the values of a FilteredDynamicEnumSet associated with specified Container and based on a specified DynamicEnumType.

Supported API: false

Parameters:
container -
dynamicEnumType - The String name of the DynamicEnumType. This must be the fully qualified class name of a class derived from wt.fc.DynamicEnumType.
searchHierarchy - If true, will seach up the Container hierarchy to find a FilteredDynamicEnumSet based on the specified DynamicEnumType. If false, will only return a FilteredDynamicEnumSet for the specified (Container and DnynamicEnumType.
Returns:
FilteredDynamicEnumSet
Throws:
WTException

getEnumeratedType

private static FilteredDynamicEnumSet getEnumeratedType(WTContainer container,
                                                        String dynamicEnumType,
                                                        boolean searchHierarchy,
                                                        HashMap ancestorValueSets)
                                                 throws WTException
Answers an java.util.Enumeration of the values of a FilteredDynamicEnumSet associated with specified Container and based on a specified DynamicEnumType.

Parameters:
container -
dynamicEnumType - The String name of the DynamicEnumType. This must be the fully qualified class name of a class derived from wt.fc.DynamicEnumType.
searchHierarchy - If true, will seach up the Container hierarchy to find a FilteredDynamicEnumSet based on the specified DynamicEnumType. If false, will only return a FilteredDynamicEnumSet for the specified (Container and DnynamicEnumType.
ancestorValueSets -
Returns:
FilteredDynamicEnumSet
Throws:
WTException

getDynamicValueSet

public static QueryResult getDynamicValueSet(WTContainer container,
                                             String dynamicEnumType,
                                             boolean searchHierarchy)
                                      throws WTException
Answers a wt.fc.QueryResult (of type String) of the dynamic values for the specified FilteredDynamicEnumSet. This represents the set of values provided by this FilteredDynamicEnumSet, in addition to its inherited values.

Supported API: false

Parameters:
container - Container that the FilteredDynamicEnumSet instance is associated to.
dynamicEnumType - The String name of the DynamicEnumType. This must be the fully qualified class name of a class derived from wt.fc.DynamicEnumType.
searchHierarchy - If true, will seach up the Container hierarchy to find a FilteredDynamicEnumSet based on the specified DynamicEnumType. If false, will only return a FilteredDynamicEnumSet for the specified (Container and DnynamicEnumType.
Returns:
QueryResult
Throws:
WTException

getBaseValues

public static WTLargeStringSet getBaseValues(String enumType)
                                      throws WTException


Supported API: false

Parameters:
enumType -
Returns:
WTLargeStringSet
Throws:
WTException

getEnumeratedType

public static EnumeratedType getEnumeratedType(WTContainer container,
                                               String dynamicEnumType,
                                               String value)
                                        throws WTException
This will take the Value passed in and look to see if corresponding enumerations from the parent Enumerated Type. If it exists then the parent enum will be returned, otherwise null.

Supported API: false

Parameters:
container - Object that the Dynamic Enumeration Instance will be associated to.
dynamicEnumType - The String name of the DynamicEnumType. This must be the fully qualified class name of a class derived from wt.fc.DynamicEnumType.
value - The string of the enumerated value.
Returns:
EnumeratedType
Throws:
WTException

findSet

private static FilteredDynamicEnumSet findSet(WTContainer container,
                                              String dynamicEnumType,
                                              boolean searchHierarchy)
                                       throws WTException
Throws:
WTException

findSet

private static FilteredDynamicEnumSet findSet(WTContainer container,
                                              String dynamicEnumType,
                                              boolean searchHierarchy,
                                              HashMap ancestorValues)
                                       throws WTException
Throws:
WTException

getPublicBaseValues

public static WTLargeStringSet getPublicBaseValues(String filteredType)
                                            throws WTException
Throws:
WTException