|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.events.catalog.ExtendedDataElementDescription
Describes an extended data element that an event can contain. The information includes:
It may also include:
EventDefinition
, Serialized FormConstructor Summary | |
ExtendedDataElementDescription(java.lang.String name,
int type)
Creates a description for an extended data element identified by its name. |
Method Summary | |
void |
addChild(ExtendedDataElementDescription description)
Adds a description of a child extended data element. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object represents the same extended data element description as this object. |
ExtendedDataElementDescription |
getChild(java.lang.String name)
Returns the description of a child extended data element. |
ExtendedDataElementDescription[] |
getChildren()
Returns all descriptions of child extended data elements. |
byte[] |
getDefaultHexValue()
Returns the value set as the hexadecimal default for the extended data element. |
java.lang.String[] |
getDefaultValues()
Returns the values set as the defaults for the extended data element. |
int |
getMaxOccurs()
Returns the maximum number of times the extended data element must occur. |
int |
getMinOccurs()
Returns the minimum number of times the extended data element must occur. |
java.lang.String |
getName()
Returns the name of the extended data element (the value of its name property). |
int |
getType()
Returns a value that indicates the type of the extended data element (the value of its type property). |
java.lang.String |
getTypeAsString()
Returns the type of the extended data element (the value of its type property) as a string. |
void |
setDefaultHexValue(byte[] value)
Sets a value to be the hexadecimal default for the extended data element. |
void |
setDefaultValues(java.lang.String[] values)
Sets the values to be the defaults for the extended data element. |
void |
setMaxOccurs(int maxOccurs)
Sets the maximum number of times the extended data element must occur. |
void |
setMinOccurs(int minOccurs)
Sets the minimum number of times the extended data element must occur. |
java.lang.String |
toString()
Returns a string representation of this extended data element description. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ExtendedDataElementDescription(java.lang.String name, int type) throws ArgumentNotValidException, ValueTooLongException
name
- The name of the extended data element.type
- The type of the extended data element. It must be one of the
integer TYPE_<type>_VALUE
constants defined
in the class ExtendedDataElement
, for
example TYPE_INT_VALUE
.ArgumentNotValidException
- If type
is not one of the
proper values.ValueTooLongException
- If name
is too long. The
maximum length is set by the Common Base Event Specification at
64 characters.Method Detail |
public ExtendedDataElementDescription getChild(java.lang.String name)
An extended data element can contain other extended data elements nested to any depth. These are known as children and are themselves described by extended data element descriptions. This method returns the description of the named immediate child of the subject extended data element.
name
- The name of the child extended data element.public ExtendedDataElementDescription[] getChildren()
An extended data element can contain other extended data elements nested to any depth. These are known as children and are themselves described by extended data element descriptions. This method returns the descriptions of the extended data elements that are the immediate children of the subject extended data element.
public void setDefaultHexValue(byte[] value) throws OperationNotValidException, ValueTooLongException
setDefaultValues(java.lang.String[])
instead.
The value is specified as an array of bytes. Byte values in the range 0 to 127 represent the hexadecimal pairs 00 to 7F. Byte values in the range -128 to -1 represent the hexadecimal pairs 80 to FF.
value
- The hexadecimal value to set as an array of bytes.
Specifying null or an empty array clears any value that was
previously set.OperationNotValidException
- If the extended data element's type
is not hexBinary.ValueTooLongException
- If value
is too long. The
maximum length is 4000 bytes and is limited by a restriction of
the event catalog database field in which the value is stored.public byte[] getDefaultHexValue()
The value is returned as an array of bytes. Hexadecimal pairs in the range 00 to 7F are represented by byte values 0 to 127. Hexadecimal pairs in the range 80 to FF are represented by byte values -128 to -1.
public void setDefaultValues(java.lang.String[] values) throws ArgumentNotValidException, OperationNotValidException, ValueTooLongException
setDefaultHexValue(byte[])
method
instead.
The values are supplied as strings. The using application must ensure that the values represented by the strings are valid for the extended data element's type. For example, if the type is float, it is not appropriate to supply the value "apple".
values
- An array of the values to set. Specifying null or an empty
array clears any values that were previously set.ArgumentNotValidException
- If the number of values given is not
appropriate for the type of the extended data element or if any
value is null or empty.OperationNotValidException
- If the extended data element's type
is hexBinary.ValueTooLongException
- If any value is too long. The maximum
length is set by the Common Base Event Specification at 1024
characters.public java.lang.String[] getDefaultValues()
The values are returned as strings. The using application must convert the values as necessary to the type defined for the extended data element.
public void setMaxOccurs(int maxOccurs) throws ArgumentNotValidException
maxOccurs
- The number to set. It must be a non-negative integer
greater than or equal to the corresponding minimum (see setMinOccurs(int)
). Use the value java.lang.Integer.MAX_VALUE to
indicate no upper limit ("unbounded" in XML terminology).ArgumentNotValidException
- If maxOccurs
is not
valid.public int getMaxOccurs()
public void setMinOccurs(int minOccurs) throws ArgumentNotValidException
minOccurs
- The number to set. It must be a non-negative integer
less than or equal to the corresponding maximum (see setMaxOccurs(int)
).ArgumentNotValidException
- If minOccurs
is not
valid.public int getMinOccurs()
public java.lang.String getName()
public int getType()
TYPE_<type>_VALUE
constants defined in the class
ExtendedDataElement
, for
example TYPE_INT_VALUE
.public java.lang.String getTypeAsString()
public void addChild(ExtendedDataElementDescription description) throws ArgumentNotValidException, DescriptionExistsException
An extended data element can contain other extended data elements nested to any depth. These are known as children and are themselves described by extended data element descriptions. This method adds a description for an immediate child of the subject extended data element.
description
- The extended data element description to add.ArgumentNotValidException
- If description
is null.DescriptionExistsException
- If description
describes
an extended data element that is already a child of the subject
extended data element.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The reference object to compare to.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |