|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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 static java.lang.String |
classNameForState
The className for state |
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 |
---|
amended, CONV_TYPE_DEFAULT, CONV_TYPE_HOST, CONV_TYPE_OUTPUT, CONV_TYPE_SER, CONV_TYPE_XML, disabled, hidden, isAmended, 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 passed name. |
|
AbstractPropertyDescriptor(java.lang.String name,
java.util.Hashtable keyValuePairs,
java.lang.String typeName)
This constructor creates a PropertyDescriptor with the passed name. |
Method Summary | |
---|---|
void |
applyDefaultDescriptor(PropertyDescription defaultDescriptor)
Forces this PropertyDescriptor to inherit the business rules of the passed descriptor. |
void |
applyDefaultDescriptorForType(PropertyDescription defaultDescriptor)
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 a Type-specific subclass. |
java.lang.Object |
convertFrom(java.lang.Object obj)
Converts an input object into a proper object handled by the default converter. |
java.lang.Object |
convertFrom(java.lang.Object obj,
java.lang.String convType)
Converts an input object into a proper object handled by the specified converter. |
java.lang.Object |
convertFrom(java.lang.Object obj,
java.lang.String convType,
boolean byReference)
Converts an input object into a proper object handled by the specified converter. |
java.lang.Object |
convertFrom(java.lang.Object obj,
java.lang.String convType,
boolean byReference,
java.util.Locale locale)
Converts an input object into a proper object handled by the specified converter. |
java.lang.Object |
convertFrom(java.lang.Object obj,
java.lang.String convType,
boolean byReference,
java.util.Locale locale,
Hashtable parameters)
Converts an input object into a proper object handled by the specified converter. |
java.lang.Object |
convertTo(java.lang.Object obj)
Converts an input object, using the default converter, into a proper object handled by the invoker. |
java.lang.Object |
convertTo(java.lang.Object obj,
java.lang.String convType)
Converts an input object, using the specified converter, into a proper object handled by the invoker. |
java.lang.Object |
convertTo(java.lang.Object obj,
java.lang.String convType,
boolean byReference)
Converts an input object, using the specified converter, into a proper object handled by the invoker. |
java.lang.Object |
convertTo(java.lang.Object obj,
java.lang.String convType,
boolean byReference,
java.util.Locale locale)
Converts an input object, using the specified converter, into a proper object handled by the invoker. |
java.lang.Object |
convertTo(java.lang.Object obj,
java.lang.String convType,
boolean byReference,
java.util.Locale locale,
Hashtable parameters)
Converts an input object, using the specified converter, into a proper object handled by the invoker. |
java.lang.String |
formatToString(java.lang.Object value,
java.lang.String conversionType)
Returns the Object formatted as a String using the appropriate conversion type. |
java.lang.String |
formatToString(java.lang.Object value,
java.lang.String conversionType,
Hashtable parameters)
Returns the 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 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)
Formats the Object using the specified conversion type and writer passed as arguments. |
void |
formatToWriter(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer,
Hashtable parameters)
Formats the Object using the specified conversion type, the writer, and the Hashtable passed as arguments. |
void |
formatToWriter(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer,
java.util.Locale locale)
Formats the Object using the conversion type and the locale specified by the writer passed as arguments. |
void |
formatToWriter(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer,
java.util.Locale locale,
Hashtable parameters)
Formats the Object using the conversion type ,the locale, and the Hashtable specified by the writer passed as arguments. |
Conversion |
getConversion(java.lang.String conversionType)
Returns the converter that 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. |
java.util.Enumeration |
getConverters()
Returns an Enumeration of all converters associated with this PropertyDescriptor. |
protected Conversion |
getDefaultConverter()
Returns the converter for the default conversion type. |
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 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 property 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 to the default converter. |
void |
setConversion(java.lang.String conversionType,
Conversion converter)
Sets the converter that handles the specified conversion type. |
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 passed reader 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 |
unformatFromReader(java.io.Reader reader,
java.lang.String conversionType,
java.util.Locale locale,
Hashtable parameters)
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,
Hashtable parameters)
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 |
unformatFromString(java.lang.String value,
java.lang.String conversionType,
java.util.Locale locale,
Hashtable parameters)
Converts the String passed to an Object using the specified conversion Type, the specified locale, and the specified Hashtable. |
java.lang.Object |
validate(java.lang.Object toValidate)
Validates the Object 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. |
java.lang.Object |
validate(java.lang.Object toValidate,
Hashtable parameters)
Validates the Object by first unformatting and then applying business rules. |
java.lang.Object |
validate(java.lang.Object toValidate,
java.lang.String convType)
Validates the Object by first unformatting using the convType conversion and then applying business rules. |
java.lang.Object |
validate(java.lang.Object toValidate,
java.lang.String convType,
boolean useState)
Validates the Object by first unformatting using the convType conversion and then applying business rules. |
java.lang.Object |
validate(java.lang.Object toValidate,
java.lang.String convType,
boolean useState,
Hashtable parameters)
Validates the Object by first unformatting using the convType conversion and then applying business rules. |
java.lang.Object |
validate(java.lang.Object toValidate,
java.lang.String convType,
Hashtable parameters)
Validates the Object by first unformatting using the convType conversion and then applying business rules. |
void |
validateParams()
Validates the parameters externaly defined for this descriptor. |
void |
validateParams(Hashtable parameters)
Validates the parameters passed as a Hashtable. |
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
protected static java.lang.String classNameForState
Constructor Detail |
public AbstractPropertyDescriptor()
public AbstractPropertyDescriptor(java.lang.String name, java.util.Hashtable keyValuePairs) throws DSETypeException
name
- String
DSETypeException
- Referenced - Type can not be determined from class namepublic AbstractPropertyDescriptor(java.lang.String name, java.util.Hashtable keyValuePairs, java.lang.String typeName) throws DSETypeException
name
- StringtypeName
- String
DSETypeException
- - Referenced Type is not foundMethod Detail |
public void applyDefaultDescriptor(PropertyDescription defaultDescriptor) throws DSETypeException
applyDefaultDescriptor
in interface PropertyDescription
defaultDescriptor
- PropertyDescription
DSETypeException
- PropertyDescriptor passed as argument is not valid.public void applyDefaultDescriptorForType(PropertyDescription defaultDescriptor)
public abstract java.lang.Object cloneDescriptee(java.lang.Object value) throws DSETypeException
cloneDescriptee
in interface PropertyDescription
value
- Object
DSETypeException
- - Cloning is unsuccessfulpublic java.lang.Object convertFrom(java.lang.Object obj) throws DSETypeException
convertFrom
in interface PropertyDescription
obj
- java.lang.Object
DSETypeException
- if the conversion type is not supportedpublic java.lang.Object convertFrom(java.lang.Object obj, java.lang.String convType) throws DSETypeException
convertFrom
in interface PropertyDescription
obj
- java.lang.ObjectconvType
- java.lang.String
DSETypeException
- if the conversion type is not supportedpublic java.lang.Object convertFrom(java.lang.Object obj, java.lang.String convType, boolean byReference) throws DSETypeException
convertFrom
in interface PropertyDescription
obj
- java.lang.ObjectconvType
- java.lang.String
DSETypeException
- if the conversion type is not supportedpublic java.lang.Object convertFrom(java.lang.Object obj, java.lang.String convType, boolean byReference, java.util.Locale locale) throws DSETypeException
convertFrom
in interface PropertyDescription
obj
- java.lang.ObjectconvType
- java.lang.Stringlocale
- Locale
DSETypeException
- if the conversion type is not supportedpublic java.lang.Object convertFrom(java.lang.Object obj, java.lang.String convType, boolean byReference, java.util.Locale locale, Hashtable parameters) throws DSETypeException
convertFrom
in interface PropertyDescription
obj
- java.lang.ObjectconvType
- java.lang.Stringlocale
- Localeparameters
- com.ibm.dse.base.Hashtable
DSETypeException
- if the conversion type is not supportedpublic java.lang.Object convertTo(java.lang.Object obj) throws DSETypeException
convertTo
in interface PropertyDescription
obj
- java.lang.Object
DSETypeException
- if the conversion type is not supportedpublic java.lang.Object convertTo(java.lang.Object obj, java.lang.String convType) throws DSETypeException
convertTo
in interface PropertyDescription
obj
- java.lang.ObjectconvType
- java.lang.String
DSETypeException
- if the conversion type is not supportedpublic java.lang.Object convertTo(java.lang.Object obj, java.lang.String convType, boolean byReference) throws DSETypeException
convertTo
in interface PropertyDescription
obj
- java.lang.ObjectconvType
- java.lang.String
DSETypeException
- if the conversion type is not supportedpublic java.lang.Object convertTo(java.lang.Object obj, java.lang.String convType, boolean byReference, java.util.Locale locale) throws DSETypeException
convertTo
in interface PropertyDescription
obj
- java.lang.ObjectconvType
- java.lang.Stringlocale
- Locale
DSETypeException
- if the conversion type is not supportedpublic java.lang.Object convertTo(java.lang.Object obj, java.lang.String convType, boolean byReference, java.util.Locale locale, Hashtable parameters) throws DSETypeException
convertTo
in interface PropertyDescription
obj
- java.lang.ObjectconvType
- java.lang.Stringlocale
- Localeparameters
- com.ibm.dse.base.Hashtable
DSETypeException
- if the conversion type is not supportedpublic java.lang.String formatToString(java.lang.Object value, java.lang.String conversionType) throws DSETypeException
formatToString
in interface PropertyDescription
value
- ObjectconversionType
- String
DSETypeException
- Formatting is unsuccessful.public java.lang.String formatToString(java.lang.Object value, java.lang.String conversionType, Hashtable parameters) throws DSETypeException
formatToString
in interface PropertyDescription
value
- ObjectconversionType
- Stringparameters
- com.ibm.dse.base.Hashtable
DSETypeException
- Formatting is unsuccessful.public java.lang.String formatToString(java.lang.Object value, java.lang.String conversionType, java.util.Locale locale) throws DSETypeException
formatToString
in interface PropertyDescription
value
- ObjectconversionType
- Stringlocale
- Locale
DSETypeException
- Formatting is unsuccessful.public void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer) throws DSETypeException
formatToWriter
in interface PropertyDescription
value
- ObjectconversionType
- Stringwriter
- Writer
DSETypeException
- - Formatting is unsuccessfulpublic void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, Hashtable parameters) throws DSETypeException
value
- ObjectconversionType
- Stringparameters
- com.ibm.dse.base.Hashtablewriter
- Writer
DSETypeException
public void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, java.util.Locale locale) throws DSETypeException
formatToWriter
in interface PropertyDescription
value
- ObjectconversionType
- Stringwriter
- Writerlocale
- Locale
DSETypeException
- Formatting is unsuccessful.public void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, java.util.Locale locale, Hashtable parameters) throws DSETypeException
value
- ObjectconversionType
- Stringwriter
- Writerlocale
- Localeparameters
- com.ibm.dse.base.Hashtable
DSETypeException
- Formatting is unsuccessful.public Conversion getConversion(java.lang.String conversionType)
getConversion
in interface PropertyDescription
conversionType
- String
protected Conversion getConverterFromConversionType(java.lang.String conversionType) throws DSETypeException
DSETypeException
- if the requested conversionType is not supportedpublic java.util.Enumeration getConverters()
getConverters
in interface PropertyDescription
protected Conversion getDefaultConverter() throws DSETypeException
DSETypeException
- if the requested conversionType is not supportedpublic java.lang.String getDescription()
getDescription
in interface PropertyDescription
public java.lang.Class getImplClass() throws DSETypeException
getImplClass
in interface PropertyDescription
DSETypeException
public ElementState getInitialState()
getInitialState
in interface PropertyDescription
public java.lang.Object getInitialValue()
getInitialValue
in interface PropertyDescription
public java.lang.String getName()
getName
in interface PropertyDescription
public java.util.Hashtable getParameters()
getParameters
in interface PropertyDescription
public Type getType()
getType
in interface PropertyDescription
public Validation getValidator()
getValidator
in interface PropertyDescription
public TypedData initializeInstance(TypedData businessObject) throws DSETypeException
initializeInstance
in interface PropertyDescription
businessObject
- com.ibm.dse.base.TypedData
DSETypeException
protected void initializeState(ElementState iniState)
public void readExternal(java.io.ObjectInput s) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
s
- java.io.ObjectInput
java.io.IOException.
java.lang.ClassNotFoundException.
java.io.IOException
java.lang.ClassNotFoundException
public void setConversion(Conversion converter) throws DSETypeException
setConversion
in interface PropertyDescription
converter
- Conversion
DSETypeException
- Conversion type is already supported.public void setConversion(java.lang.String conversionType, Conversion converter) throws DSETypeException
setConversion
in interface PropertyDescription
conversionType
- Stringconverter
- Conversion
DSETypeException
- Conversion type is already supported.protected void setInitialState(ElementState iniState)
protected void setInitialValue(java.lang.Object value)
value
- Objectpublic void setName(java.lang.String aName)
aName
- java.lang.Stringpublic void setValidator(Validation validator) throws DSETypeException
setValidator
in interface PropertyDescription
validator
- Validation
DSETypeException
- Validator cannot validate the business object described.public java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType) throws DSETypeException
unformatFromReader
in interface PropertyDescription
reader
- ReaderconversionType
- String
DSETypeException
- Unformatting is unsuccessful.public java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType, java.util.Locale locale) throws DSETypeException
unformatFromReader
in interface PropertyDescription
reader
- ReaderconversionType
- Stringlocale
- Locale
DSETypeException
- Unformatting is unsuccessful.public java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType, java.util.Locale locale, Hashtable parameters) throws DSETypeException
reader
- ReaderconversionType
- Stringlocale
- Localeparameters
- com.ibm.dse.base.Hashtable
DSETypeException
- Unformatting is unsuccessful.public java.lang.Object unformatFromString(java.lang.String value, java.lang.String conversionType) throws DSETypeException
unformatFromString
in interface PropertyDescription
value
- StringconversionType
- String
DSETypeException
- Unformatting is unsuccessful.public java.lang.Object unformatFromString(java.lang.String value, java.lang.String conversionType, Hashtable parameters) throws DSETypeException
unformatFromString
in interface PropertyDescription
value
- StringconversionType
- Stringparameters
- com.ibm.dse.base.Hashtable
DSETypeException
- Unformatting is unsuccessful.public java.lang.Object unformatFromString(java.lang.String value, java.lang.String conversionType, java.util.Locale locale) throws DSETypeException
unformatFromString
in interface PropertyDescription
value
- StringconversionType
- Stringlocale
- Locale
DSETypeException
- Unformatting is unsuccessful.public java.lang.Object unformatFromString(java.lang.String value, java.lang.String conversionType, java.util.Locale locale, Hashtable parameters) throws DSETypeException
value
- StringconversionType
- Stringlocale
- Localeparameters
- com.ibm.dse.base.Hashtable
DSETypeException
- Unformatting is unsuccessful.public java.lang.Object validate(java.lang.Object toValidate) throws DSETypeException
validate
in interface PropertyDescription
toValidate
- Object
DSETypeException
- Validation is unsuccessful.public java.lang.Object validate(java.lang.Object toValidate, Hashtable parameters) throws DSETypeException
validate
in interface PropertyDescription
toValidate
- Objectparameters
- com.ibm.dse.base.Hashtable
DSETypeException
- Validation is unsuccessful.public java.lang.Object validate(java.lang.Object toValidate, java.lang.String convType) throws DSETypeException
validate
in interface PropertyDescription
toValidate
- ObjectconvType
- String
DSETypeException
- Validation is unsuccessful.public java.lang.Object validate(java.lang.Object toValidate, java.lang.String convType, Hashtable parameters) throws DSETypeException
validate
in interface PropertyDescription
toValidate
- ObjectconvType
- Stringparameters
- com.ibm.dse.base.Hashtable
DSETypeException
- Validation is unsuccessful.public java.lang.Object validate(java.lang.Object toValidate, java.lang.String convType, boolean useState) throws DSETypeException
validate
in interface PropertyDescription
toValidate
- ObjectconvType
- StringuseState
- boolean
DSETypeException
- Validation is unsuccessful.public java.lang.Object validate(java.lang.Object toValidate, java.lang.String convType, boolean useState, Hashtable parameters) throws DSETypeException
validate
in interface PropertyDescription
toValidate
- ObjectconvType
- StringuseState
- booleanparameters
- com.ibm.dse.base.Hashtable
DSETypeException
- Validation is unsuccessful.public java.lang.Object validate(java.lang.Object toValidate, boolean useState) throws DSETypeException
validate
in interface PropertyDescription
toValidate
- ObjectuseState
- boolean
DSETypeException
- Validation is unsuccessful.public void validateParams() throws DSETypeException
validateParams
in interface PropertyDescription
DSETypeException
- If parameter validation failspublic void validateParams(Hashtable parameters) throws DSETypeException
validateParams
in interface PropertyDescription
parameters
- com.ibm.dse.base.Hashtable
DSETypeException
- If parameter validation failspublic void writeExternal(java.io.ObjectOutput s) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
s
- java.io.ObjectOutput
java.io.IOException
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |