|
||||||||||
| PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface defines behavioral and runtime metadata for ModelMBeans. A descriptor is a set of name-value pairs.
The DescriptorAccess (src) interface defines how to get and set
Descriptors for a ModelMBean's metadata classes.
The implementation must implement the following constructors.
Descriptor() returns an empty descriptor.
Descriptor(Descriptor) returns a copy of the decriptor.
Descriptor(String[], Object[]) a constructor that verifies the field names include a descriptorType and that predefined fields contain valid values.
DescriptorAccess (src) ,
ModelMBean (src) | Method Summary | |
java.lang.Object |
clone()
Returns a descriptor that is a duplicate of this one. |
java.lang.String[] |
getFieldNames()
Retrieves all the field names in this descriptor. |
java.lang.String[] |
getFields()
Retrieves all the fields in this descriptor. |
java.lang.Object |
getFieldValue(java.lang.String fieldName)
Retrieves the value of a field. |
java.lang.Object[] |
getFieldValues(java.lang.String[] fieldNames)
Retrieves all the field values for the passed field names. |
boolean |
isValid()
Checks to see that this descriptor is valid. |
void |
removeField(java.lang.String fieldName)
Remove a field from the descriptor. |
void |
setField(java.lang.String fieldName,
java.lang.Object fieldValue)
Sets the value of a field. |
void |
setFields(java.lang.String[] fieldNames,
java.lang.Object[] fieldValues)
Set multiple fields in this descriptor. |
| Method Detail |
public java.lang.Object getFieldValue(java.lang.String fieldName)
throws RuntimeOperationsException (src)
fieldName - the name of the field.
RuntimeOperationsException (src) - when the field name is not
valid.
public void setField(java.lang.String fieldName,
java.lang.Object fieldValue)
throws RuntimeOperationsException (src)
fieldName - the name of the field.fieldValue - the value of the field.
RuntimeOperationsException (src) - when the field name or value
is not valid.public java.lang.String[] getFields()
public java.lang.String[] getFieldNames()
public java.lang.Object[] getFieldValues(java.lang.String[] fieldNames)
When a fieldName does not exist, the corresponding element of the returned array is null.
fieldNames - the array of field names to retrieve. Pass null
to retrieve all fields.
public void removeField(java.lang.String fieldName)
fieldName - the field to remove. No exception is thrown
when the field is not in the descriptor.
public void setFields(java.lang.String[] fieldNames,
java.lang.Object[] fieldValues)
throws RuntimeOperationsException (src)
fieldNames - an array of fieldNames to set. Neither the array
or array elements can be null. The fieldName must exist.fieldValues - an array of fieldValues to set. Neither the array
or array elements can be null. The fieldValue must be valid for
the corresponding fieldName.
RuntimeOperationsException (src) - for not existent or fieldNames,
invalid or null fieldValues, the two arrays are different sizes or
the contructor fails for any reason.
public java.lang.Object clone()
throws RuntimeOperationsException (src)
RuntimeOperationsException (src) - for invalid fieldNames,
fieldValues or the contructor fails for any reason.
public boolean isValid()
throws RuntimeOperationsException (src)
RuntimeOperationsException (src) - for any error performing
the validation.
|
||||||||||
| PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||