Package com.orchestranetworks.schema
Interface ConstraintEnumeration<T>
- All Superinterfaces:
- Constraint<T>,- JavaBeanVersion
 
 - public interface ConstraintEnumeration<T> extends Constraint<T> Specifies an enumeration constraint that can be contextual and dynamic. This interface provides a programmatic extension of the- xs:enumerationfacet.- Definition in the data model- The constraint must be declared under the element - xs:annotation/xs:appinfo/osd:otherFacets:
 where- <osd:constraintEnumeration class="com.foo.MyConstraintEnumeration" /> - com.foo.MyConstraintEnumerationis the fully qualified name of the class implementing this interface. It is also possible to set additional JavaBean properties:
 where- <osd:constraintEnumeration class="com.foo.MyConstraintEnumeration"> <param1>...</param1> <param2>...</param2> </osd:constraintEnumeration>- param1and- param2are JavaBean properties of the class specified.- For more information, see the JavaBean specification. - Life cycle- See - Constraintlife cycle.- See Also:
- ConstraintOnNull,- JavaBeanVersion.getBeanVersion()
 
-   Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description StringdisplayOccurrence (T aValue, ValueContext aContext, Locale aLocale)Returns a string representation of the value specified for the end-user (a label).List<T>getValues (ValueContext aContext)Returns all values of the underlying enumeration of this constraint.-   Methods inherited from interface com.orchestranetworks.schema.ConstraintcheckOccurrence, setup, toUserDocumentation
 -   Methods inherited from interface com.orchestranetworks.schema.JavaBeanVersiongetBeanVersion
 
-   
 
-   
-   Method Detail- getValues- List<T> getValues(ValueContext aContext) throws InvalidSchemaException Returns all values of the underlying enumeration of this constraint. All elements of the returned list must comply with the associated XML Schema type.- Throws:
- InvalidSchemaException- if a dynamic condition in the data model prevents the execution of this method.
 
 - displayOccurrence- String displayOccurrence(T aValue, ValueContext aContext, Locale aLocale) throws InvalidSchemaException Returns a string representation of the value specified for the end-user (a label).- The specified value should be compatible with the type of the current node. Specifically, it should be one of the values returned by - getValues(ValueContext). However, if this enumeration has changed, it is possible for the value to no longer be in the current enumeration. Therefore, such cases must be handled properly by the implementation of this method, independent of true validation errors.- Parameters:
- aValue- The value to display
- aContext- The current context
- aLocale- The current user locale
- Throws:
- InvalidSchemaException- if a dynamic condition in the data model prevents the execution of this method.
- See Also:
- SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale)
 
 
 
-