|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MOPropertyEditor
Defines how to support mapping of a Java class to an XML simple type. Implementations of this interface are available for most of the Java standard built in types.
To extend the library to support additional simple types, implement this interface and register the implementation
with the MOPropertyEditorRegistry
MOPropertyEditorRegistry
Method Summary | |
---|---|
int |
compareValues(java.lang.Object obj_a,
java.lang.Object obj_b)
|
java.lang.Object |
fromString(java.lang.Class<?> propertyValueType,
java.lang.String value)
decodes the property value from string. this string can be used in annotations as the property default value. |
java.lang.Object |
fromXmlValue(MOPropertySimpleTypeDescriptor simpleTypeDescriptor,
XmlValue value)
decodes the property value from the value used to store in XML. |
java.lang.String[] |
getEnumerations(java.lang.Class<?> propertyValueType)
|
MoXmlBaseSimpleType |
getXmlDefaultSimpleType(MoXmlBaseSimpleType xmlSimpleType)
gets the base XML encoding type, used as the element base type in an XML schema |
boolean |
isCompatibleSimpleType(MoXmlBaseSimpleType xmlSimpleType)
|
boolean |
supportsNumberValidations()
indicates that the type supports the MOValidationNumber for Number validations |
boolean |
supportsStringValidations()
indicates that the type supports the MOValidationString for string validations |
java.lang.String |
toString(java.lang.Class<?> propertyValueType,
java.lang.Object value)
encodes the property value to string. |
XmlValue |
toXmlValue(MOPropertySimpleTypeDescriptor simpleTypeDescriptor,
java.lang.Object value)
encodes the value to XML representation |
MOValueValidationResult |
validateStringEncoding(java.lang.Class propertyValueType,
java.lang.String value)
validates the string encoding. |
Method Detail |
---|
java.lang.Object fromString(java.lang.Class<?> propertyValueType, java.lang.String value)
propertyValueType
- the class of the propery valuevalue
- - the string value
java.lang.String toString(java.lang.Class<?> propertyValueType, java.lang.Object value)
propertyValueType
- the class of the propery valuevalue
- - the property value
MOValueValidationResult validateStringEncoding(java.lang.Class propertyValueType, java.lang.String value)
propertyValueType
- the class of the propery valuevalue
- - string encoding to validate
java.lang.Object fromXmlValue(MOPropertySimpleTypeDescriptor simpleTypeDescriptor, XmlValue value) throws MOBeansException
simpleTypeDescriptor
- descriptor for simple type instancevalue
- - the value to decode
MOBeansException
XmlValue toXmlValue(MOPropertySimpleTypeDescriptor simpleTypeDescriptor, java.lang.Object value)
simpleTypeDescriptor
- descriptor for simple type instancevalue
- - the value to encode
boolean isCompatibleSimpleType(MoXmlBaseSimpleType xmlSimpleType)
xmlSimpleType
- simple type to check if compatible with the property editor
MoXmlBaseSimpleType getXmlDefaultSimpleType(MoXmlBaseSimpleType xmlSimpleType)
xmlSimpleType
- an xml simple type. can be MoXmlBaseSimpleType.xmlNotSpecified
java.lang.String[] getEnumerations(java.lang.Class<?> propertyValueType)
propertyValueType
- the enumeration class
boolean supportsStringValidations()
boolean supportsNumberValidations()
int compareValues(java.lang.Object obj_a, java.lang.Object obj_b)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |