com.ibm.dse.automaton.html
Class HtmlIndexedCollection
java.lang.Object
|
+--com.ibm.dse.base.DataElement
|
+--com.ibm.dse.base.DataCollection
|
+--com.ibm.dse.base.IndexedCollection
|
+--com.ibm.dse.automaton.html.HtmlIndexedCollection
- public class HtmlIndexedCollection
- extends IndexedCollection
This is a special untyped IndexedCollection (i.e. with no descriptor) to validate fields coming from a
HTML browser. The infrastructure finds out that certain data elements
coming in the request data belong to an IndexedCollection. Then, a Vector
of DataFields are passed to this instance of HtmlIndexedCollection in order
to validate that the DataFields contain elements that have been defined
in the IndexedCollection. The actual object inside the DataFields is a final
object inside the data structure defined inside the IndexedCollection. Since
this structure may be complex, it may contain nested KeyedCollections with
as many DataElements inside. This means that the DataFields that the infrastructure
is trying to validate will contain as name the full qualified path name,
so this HtmlIndexedCollection may search for the actual final DataField
in the created DataElement inside the IndexedCollection.
- See Also:
- Serialized Form
Method Summary |
void |
updateErrorInfo(java.lang.Object inputObject,
DSETypeException e)
Update the ErrorInfo attribute with the contents of the Exception |
java.lang.Object |
validate(DataField toValidate)
Validates the object passed (that must be a DataField) and if successful,
the object is returned, otherwise an appropriate exception is thrown. |
java.lang.Object |
validate(IndexedCollection iColl)
Validates the object passed (that must be an indexed collection) and if successful,
the object is returned, otherwise an appropriate exception is thrown. |
java.lang.Object |
validate(java.lang.Object toValidate)
Validates the object passed (that must be an indexed collection or a vector) and if successful,
the object is returned, otherwise an appropriate exception is thrown. |
java.lang.Object |
validate(Vector elements)
Validates the set of objects passed (that must be DataField's) and if successful,
the set is returned, otherwise an appropriate exception is thrown. |
Methods inherited from class com.ibm.dse.base.IndexedCollection |
addElement,
clone,
getDataElement,
getElementAt,
getElementAt,
getElements,
getElementSubTag,
getEnumeration,
getValue,
initializeFrom,
nestedQualifiedElements,
readExternal,
removeAll,
removeElementAt,
removeElementAt,
setDataElement,
setElements,
setElementSubTag,
setValue,
size,
toString,
toStrings,
toTags,
writeExternal |
Methods inherited from class com.ibm.dse.base.DataElement |
externalizer,
getDescription,
getDescriptor,
getErrorInfo,
getExternalizer,
getKey,
getName,
getState,
getTagName,
readExternal,
readObject,
removeExternal,
setDescription,
setDescriptor,
setErrorInfo,
setExternalizer,
setName,
setState,
writeExternal |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
HtmlIndexedCollection
public HtmlIndexedCollection()
- HtmlIndexedCollection constructor
HtmlIndexedCollection
public HtmlIndexedCollection(java.lang.String aName)
throws java.io.IOException
- HtmlIndexedCollection constructor
- Parameters:
aName
- java.lang.String- Throws:
- java.io.IOException -
updateErrorInfo
public void updateErrorInfo(java.lang.Object inputObject,
DSETypeException e)
- Update the ErrorInfo attribute with the contents of the Exception
- Parameters:
inputObject
- Objecte
- DSETypeException
validate
public java.lang.Object validate(DataField toValidate)
throws DSETypeException
- Validates the object passed (that must be a DataField) and if successful,
the object is returned, otherwise an appropriate exception is thrown.
The DataField contains the name of the final DataField that must be created
in the IndexedCollection.
The format of the name should be: index+"."+"path to the final DataField"
This method will:
- Create as many elements in the iColl as needed to have an element at the
index passed as the name of the element.
- Let the new created DataField to validate the input value
- If validation succeeds, the field is kept in the IColl
- Otherwise, the ErrorInfo object of the IColl is updated with the
Exception contents and the DataField is removed (only if it was created)
- Parameters:
toValidate
- DataField- Returns:
- java.lang.Object
- Throws:
- DSETypeException - Thrown if the validation is unsuccessful.
validate
public java.lang.Object validate(IndexedCollection iColl)
throws DSETypeException
- Validates the object passed (that must be an indexed collection) and if successful,
the object is returned, otherwise an appropriate exception is thrown.
- Parameters:
iColl
- Object- Throws:
- DSETypeException - Thrown if the validation is unsuccessful.
validate
public java.lang.Object validate(Vector elements)
throws DSETypeException
- Validates the set of objects passed (that must be DataField's) and if successful,
the set is returned, otherwise an appropriate exception is thrown.
The DataField's contain the name of the final DataField that must be created
in the IndexedCollection.
The format of the name should be: index+"."+"path to the final DataField"
This method will:
- Create the elements inside this IColl, unless they already exist
- Let the new created DataFields to validate the input value
- If validation succeeds, the fields are kept in the IColl
- Otherwise, the ErrorInfo object of the IColl is updated with the
Exception contents and the DataFields are removed (only if they were created)
- Parameters:
elements
- Vector- Returns:
- java.lang.Object
- Throws:
- DSETypeException - Thrown if the validation is unsuccessful.
validate
public java.lang.Object validate(java.lang.Object toValidate)
throws DSETypeException
- Validates the object passed (that must be an indexed collection or a vector) and if successful,
the object is returned, otherwise an appropriate exception is thrown.
- Overrides:
- validate in class IndexedCollection
- Parameters:
toValidate
- Objectdescriptor
- PropertyDescription- Throws:
- DSETypeException - Thrown if the validation is unsuccessful.