|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Descriptor is cloneable since represent a snapshot of what the client passed in to the model mbean. This ensures that if the client nulls out some value, the descriptor is still valid, since it has been cloned prior the client modification. The client can always re-set the descriptor on the model mbean.
Method Summary | |
java.lang.Object |
clone()
Returns a new Descriptor of which is a duplicate of this Descriptor |
java.lang.String[] |
getFieldNames()
Return all the field names as an array of String. |
java.lang.String[] |
getFields()
Returns all the fields contained in this Descriptor as
an array. |
java.lang.Object |
getFieldValue(java.lang.String fieldName)
Returns the field value of a given field name. |
java.lang.Object[] |
getFieldValues(java.lang.String[] fieldNames)
Return all field values as an array using the given field names array. |
boolean |
isValid()
Returns true if fieldValues are checked to be sure they are legal for the fieldNames. |
void |
removeField(java.lang.String fieldName)
Remove a field using the given field name. |
void |
setField(java.lang.String fieldName,
java.lang.Object fieldValue)
Sets a field name and field value. |
void |
setFields(java.lang.String[] fieldNames,
java.lang.Object[] fieldValues)
Sets the given fieldNames against the givent fieldValues. |
Method Detail |
public java.lang.Object getFieldValue(java.lang.String fieldName) throws RuntimeOperationsException
fieldName
- The field name where the value being retrieved is for.
RuntimeOperationException
- if the value for field name is illegal
RuntimeOperationsException
public void setField(java.lang.String fieldName, java.lang.Object fieldValue) throws RuntimeOperationsException
fieldName
- The name of the field to set againtsfieldValue
- The value for the given field name being set
RuntimeOperationsException
- If values for fieldName or fieldValue
are illegal or the description construction fails, then
this exception will be thrownpublic void removeField(java.lang.String fieldName)
Note that this method will be silent if no such field is found.
fieldName
- The field name to be removed.public java.lang.String[] getFieldNames()
Note that this method will return an empty array if the
Descriptor
is empty.
public java.lang.Object[] getFieldValues(java.lang.String[] fieldNames)
Note that the order of the returned Object[] is the same as the order of the field name argument.
fieldNames
- The array of fieldnames
public java.lang.String[] getFields()
Descriptor
as
an array.
public void setFields(java.lang.String[] fieldNames, java.lang.Object[] fieldValues) throws RuntimeOperationsException
RuntimeOperationsException
- if fieldNames or fieldValues contains
illegal values.public java.lang.Object clone() throws RuntimeOperationsException
RuntimeOperationsException
public boolean isValid() throws RuntimeOperationsException
RuntimeOperationsException
- If the validity checking fails.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |