|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Specifies an enumeration constraint that may be contextual and dynamic.
This interface provides a programmatic extension of xs:enumeration
facet.
The constraint must be declared under the element
xs:annotation/xs:appinfo/mdm:otherFacets
:
where<mdm:constraintEnumeration class="com.foo.MyConstraintEnumeration" />
com.foo.MyConstraintEnumeration
is
the fully qualified name of the class implementing this interface.
It is also possible to set additional JavaBean properties:
where<mdm:constraintEnumeration class="com.foo.MyConstraintEnumeration"> <param1>...</param1> <param2>...</param2> </mdm:constraintEnumeration>
param1
and param2
are JavaBean properties of the class specified.
For more information, read JavaBeans specification.
See Constraint
life-cycle.
ConstraintOnNull
Method Summary | |
String |
displayOccurrence(Object aValue,
ValueContext aContext,
Locale aLocale)
Returns, for user display, a string representation of the value specified (a 'label'). |
List |
getValues(ValueContext aContext)
Returns all values from the underlying enumeration of this constraint. |
Methods inherited from interface com.softwareag.mdm.schema.Constraint |
checkOccurrence, setup, toUserDocumentation |
Method Detail |
public List getValues(ValueContext aContext) throws InvalidSchemaException
InvalidSchemaException
- if some schema's dynamic condition prevents the execution of this method.public String displayOccurrence(Object aValue, ValueContext aContext, Locale aLocale) throws InvalidSchemaException
The value specified should be compatible with the current node's type, more particularly
it should be one of the values returned by getValues(ValueContext)
. However,
if this enumeration has evolved, it is possible that the value is no more in the current
enumeration. Hence such degraded cases must be handled properly by the implementation
of this method (those cases will be considered independently as proper validation errors).
aValue
- The value that must be displayedaContext
- The current contextaLocale
- The current user locale
InvalidSchemaException
- if some schema's dynamic condition prevents the execution of this method.ValueContext.displayOccurrence(Object, Locale)
,
ValueContext.formatOccurrence(Object)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.