|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.types.AbstractPropertyDescriptor
This class resides at the top of the PropertyDescriptor hierarchy and provides an abstract implementation of the PropertyDescription interface for Type specific PropertyDescriptors to extend.
Field Summary | |
protected java.util.Hashtable |
converters
The converters known to this PropertyDescriptor |
protected java.util.Hashtable |
keyValuePairs
The parameterization for this PropertyDescriptor, understood by concrete subclasses |
Fields inherited from interface com.ibm.dse.base.types.TypeConstants |
CONV_TYPE_DEFAULT,
CONV_TYPE_HOST,
CONV_TYPE_OUTPUT,
CONV_TYPE_SER,
CONV_TYPE_XML,
disabled,
hidden,
isDisabled,
isHidden,
isMandatory,
isOmitted,
isReadOnly,
mandatory,
omitted,
readOnly,
TYPE_DEFAULT,
TYPE_REGISTRY_INIT_SIZE |
Constructor Summary | |
AbstractPropertyDescriptor()
This constructor creates a AbstractPropertyDescriptor object. |
|
AbstractPropertyDescriptor(java.lang.String name,
java.util.Hashtable keyValuePairs)
This constructor creates a PropertyDescriptor with the name passed. |
|
AbstractPropertyDescriptor(java.lang.String name,
java.util.Hashtable keyValuePairs,
java.lang.String typeName)
This constructor creates a PropertyDescriptor with the name passed. |
Method Summary | |
void |
applyDefaultDescriptor(PropertyDescription defaultDescriptor)
Forces this PropertyDescriptor to inherit the business rules of the passed descriptor. |
void |
applyDefaultDescriptorForType(PropertyDescription defaultDescriptor)
This method can be overwritten by specific subclasses if an additional behaviour is required. |
abstract java.lang.Object |
cloneDescriptee(java.lang.Object value)
Returns an independent copy of the Object passed and is to be implementaed by Type specific subclass. |
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 and 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. |
protected Conversion |
getConverterFromConversionType(java.lang.String conversionType)
Returns the converter for the conversion type passed, or the default converter if the requested 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 This method must be overwritten by specific descriptors. |
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 the keyValuePairs hashtable. |
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 |
protected void |
initializeState(ElementState iniState)
Initializes the initialState attribute based on the attributes defined in the key value pairs. |
void |
readExternal(java.io.ObjectInput s)
Invokes the object creation from an ObjectInput. |
void |
setConversion(Conversion converter)
Convenience method to set 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. |
protected void |
setInitialState(ElementState iniState)
Sets the initial business state for the PropertyDescriptor. |
protected void |
setInitialValue(java.lang.Object value)
Sets the initial value for the PropertyDescriptor. |
void |
setName(java.lang.String aName)
Sets the name attribute. |
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. |
void |
writeExternal(java.io.ObjectOutput s)
Provides concrete serialization handling for AbstractPropertyDescriptor. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.util.Hashtable converters
protected java.util.Hashtable keyValuePairs
Constructor Detail |
public AbstractPropertyDescriptor()
public AbstractPropertyDescriptor(java.lang.String name, java.util.Hashtable keyValuePairs) throws DSETypeException
name
- Stringpublic AbstractPropertyDescriptor(java.lang.String name, java.util.Hashtable keyValuePairs, java.lang.String typeName) throws DSETypeException
name
- StringtypeName
- StringMethod Detail |
public void applyDefaultDescriptor(PropertyDescription defaultDescriptor) throws DSETypeException
Any specific business behaviour defined is retained and will override that of the descriptor passed.
descriptor
- PropertyDescriptionpublic void applyDefaultDescriptorForType(PropertyDescription defaultDescriptor)
descriptor
- PropertyDescriptionpublic abstract 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
- Stringprotected Conversion getConverterFromConversionType(java.lang.String conversionType) throws DSETypeException
An exception is thrown if default conversion is not supported.
public 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.TypedDataprotected void initializeState(ElementState iniState)
public void readExternal(java.io.ObjectInput s) throws java.io.IOException, java.lang.ClassNotFoundException
s
- java.io.ObjectInputpublic void setConversion(Conversion converter) throws DSETypeException
conversionType
- Stringconverter
- Conversionpublic void setConversion(java.lang.String conversionType, Conversion converter) throws DSETypeException
conversionType
- Stringconverter
- Conversionprotected void setInitialState(ElementState iniState)
initialState
- intprotected void setInitialValue(java.lang.Object value)
value
- Objectpublic void setName(java.lang.String aName)
aName
- java.lang.Stringpublic 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
- booleanpublic void writeExternal(java.io.ObjectOutput s) throws java.io.IOException
s
- java.io.ObjectOutput
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |