|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is implemented by all PropertyDescriptors which descend from the abstract implementation, AbstractPropertyDescriptor.
PropertyDescriptors are responsible for describing the business object which they are associated with. A default PropertyDescriptor is associated with each Type in order to describe default business behaviour for a given Type.
Method Summary | |
void |
applyDefaultDescriptor(PropertyDescription descriptor)
Forces this PropertyDescriptor to inherit the business rules of the passed descriptor. |
java.lang.Object |
cloneDescriptee(java.lang.Object value)
Returns an independent copy of the Object passed. |
java.lang.String |
formatToString(java.lang.Object value,
java.lang.String conversionType)
Returns the value passed as an Object, formatted as a String using the appropriate conversion type. |
java.lang.String |
formatToString(java.lang.Object value,
java.lang.String conversionType,
java.util.Locale locale)
Returns the value passed as an Object, formatted as a String using the specified conversion type and the specified locale. |
void |
formatToWriter(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer)
The value passed as an Object is formatted using the specified conversion type by the writer passed as argument. |
void |
formatToWriter(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer,
java.util.Locale locale)
The value passed as an Object is formatted using the specified conversion type and the specified locale by the writer passed as argument. |
Conversion |
getConversion(java.lang.String conversionType)
Returns the converter which handles the specified conversion type, or null if the conversion type is not supported. |
java.util.Enumeration |
getConverters()
Returns an Enumeration of all converters associated with this PropertyDescriptor. |
java.lang.String |
getDescription()
Returns the description of business object that this PropertyDescriptor describes. |
java.lang.Class |
getImplClass()
Gets the class of the business object descripted by this PropertyDescription |
ElementState |
getInitialState()
Returns the initial business state of the business object described by this PropertyDescriptor. |
java.lang.Object |
getInitialValue()
Returns the initial value of the business object described by this PropertyDescriptor. |
java.lang.String |
getName()
Returns the name of this PropertyDescriptor. |
java.util.Hashtable |
getParameters()
Returns a hashtable with all the extra parameters of the PropertyDescription |
Type |
getType()
Returns the Type of business object that this PropertyDescriptor describes. |
Validation |
getValidator()
Returns the validator responsible for handling validation of the business object described. |
TypedData |
initializeInstance(TypedData businessObject)
Initializes the businessObject attributes |
void |
setConversion(Conversion converter)
Sets the converter which handles the default conversion type. |
void |
setConversion(java.lang.String conversionType,
Conversion converter)
Sets the converter which handles the specified conversion type to that passed as argument. |
void |
setValidator(Validation validator)
Sets the validator to be employed by this PropertyDescriptor to that passed. |
java.lang.Object |
unformatFromReader(java.io.Reader reader,
java.lang.String conversionType)
Uses the reader passed to construct an Object of the correct Type using the appropriate conversion type. |
java.lang.Object |
unformatFromReader(java.io.Reader reader,
java.lang.String conversionType,
java.util.Locale locale)
Uses the reader passed to construct an Object of the correct Type using the specified conversion type and the specified locale. |
java.lang.Object |
unformatFromString(java.lang.String value,
java.lang.String conversionType)
Converts the String passed to an Object using the appropriate conversion Type. |
java.lang.Object |
unformatFromString(java.lang.String value,
java.lang.String conversionType,
java.util.Locale locale)
Converts the String passed to an Object using the specified conversion Type and the specified locale. |
java.lang.Object |
validate(java.lang.Object toValidate)
Validates the Object passed by first unformatting and then applying business rules |
java.lang.Object |
validate(java.lang.Object toValidate,
boolean useState)
Validates the Object passed by first unformatting and then applying business rules. |
Method Detail |
public void applyDefaultDescriptor(PropertyDescription descriptor) throws DSETypeException
descriptor
- PropertyDescriptionpublic java.lang.Object cloneDescriptee(java.lang.Object value) throws DSETypeException
value
- Objectpublic java.lang.String formatToString(java.lang.Object value, java.lang.String conversionType) throws DSETypeException
value
- ObjectconversionType
- Stringpublic java.lang.String formatToString(java.lang.Object value, java.lang.String conversionType, java.util.Locale locale) throws DSETypeException
value
- ObjectconversionType
- Stringlocale
- Localepublic void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer) throws DSETypeException
value
- ObjectconversionType
- Stringwriter
- Writerpublic void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, java.util.Locale locale) throws DSETypeException
value
- ObjectconversionType
- Stringwriter
- Writerlocale
- Localepublic Conversion getConversion(java.lang.String conversionType)
conversionType
- Stringpublic java.util.Enumeration getConverters()
public java.lang.String getDescription()
public java.lang.Class getImplClass() throws DSETypeException
public ElementState getInitialState()
public java.lang.Object getInitialValue()
public java.lang.String getName()
public java.util.Hashtable getParameters()
public Type getType()
public Validation getValidator()
public TypedData initializeInstance(TypedData businessObject) throws DSETypeException
businessObject
- com.ibm.dse.base.TypedDatapublic void setConversion(Conversion converter) throws DSETypeException
conversionType
- Stringconverter
- Conversionpublic void setConversion(java.lang.String conversionType, Conversion converter) throws DSETypeException
conversionType
- Stringconverter
- Conversionpublic void setValidator(Validation validator) throws DSETypeException
validator
- Validationpublic java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType) throws DSETypeException
reader
- ReaderconversionType
- Stringpublic java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType, java.util.Locale locale) throws DSETypeException
reader
- ReaderconversionType
- Stringlocale
- Localepublic java.lang.Object unformatFromString(java.lang.String value, java.lang.String conversionType) throws DSETypeException
value
- StringconversionType
- Stringpublic java.lang.Object unformatFromString(java.lang.String value, java.lang.String conversionType, java.util.Locale locale) throws DSETypeException
value
- StringconversionType
- Stringlocale
- Localepublic java.lang.Object validate(java.lang.Object toValidate) throws DSETypeException
If successful, the Object is returned, otherwise an appropriate exception is thrown.
toValidate
- Objectpublic java.lang.Object validate(java.lang.Object toValidate, boolean useState) throws DSETypeException
If successful, the Object is returned, otherwise an appropriate exception is thrown.
toValidate
- ObjectuseState
- boolean
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |