|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Variable
An interface to variables supporting dynamic attributes, operations and notifications exposed through the DynamicMBean interface.
Note that internal attributes of implemented interfaces have higher precedence than dynamic attributes in operations of the DynamicMBean interface, but typically they are not available in operations of the Variable interface.
| Field Summary | |
|---|---|
static String |
ADD_VALIDATED_ELEMENT
Add validated element method. |
static String |
ADD_VALIDATED_ELEMENT_DESCRIPTION
Add validated element description. |
static String |
APPLY_ATTRIBUTE_EXPORTER
Apply attribute exporter method. |
static String |
APPLY_ATTRIBUTE_EXPORTER_DESCRIPTION
Apply attribute exporter description. |
static String |
APPLY_ATTRIBUTE_IMPORTER
Apply attribute importer method. |
static String |
APPLY_ATTRIBUTE_IMPORTER_DESCRIPTION
Apply attribute importer description. |
static String |
APPLY_ATTRIBUTE_VALIDATOR
Apply attribute validator method. |
static String |
APPLY_ATTRIBUTE_VALIDATOR_DESCRIPTION
Apply attribute validator description. |
static String |
ATTRIBUTE_INFO
Attribute info method. |
static String |
ATTRIBUTE_INFO_DESCRIPTION
Attribute info description. |
static String |
ATTRIBUTE_LENGTH
Attribute length method. |
static String |
ATTRIBUTE_LENGTH_DESCRIPTION
Attribute length description. |
static String |
ATTRIBUTE_LIST
Attribute list method. |
static String |
ATTRIBUTE_LIST_DESCRIPTION
Attribute list description. |
static String |
CLEAR_ATTRIBUTE_VALUES
Clear attribute values method. |
static String |
CLEAR_ATTRIBUTE_VALUES_DESCRIPTION
Clear attribute values description. |
static String |
CONTAINS_ATTRIBUTE
Contains attribute method. |
static String |
CONTAINS_ATTRIBUTE_DESCRIPTION
Contains attribute description. |
static String |
EXPORT_ATTRIBUTES
Export attributes method. |
static String |
EXPORT_ATTRIBUTES_DESCRIPTION
Export attributes description. |
static String |
GET_ATTRIBUTE_VALUE
Get attribute value method. |
static String |
GET_ATTRIBUTE_VALUE_DESCRIPTION
Get attribute value description. |
static String |
GET_VALIDATED_ELEMENT
Get validated element method. |
static String |
GET_VALIDATED_ELEMENT_DESCRIPTION
Get validated element description. |
static String |
GET_VALIDATED_VALUE
Get validated value method. |
static String |
GET_VALIDATED_VALUE_DESCRIPTION
Get validated value description. |
static String |
IMPORT_ATTRIBUTES
Import attributes method. |
static String |
IMPORT_ATTRIBUTES_DESCRIPTION
Import attributes description. |
static String |
REMOVE_VALIDATED_ELEMENT
Remove valiadted element method. |
static String |
REMOVE_VALIDATED_ELEMENT_DESCRIPTION
Remove validated element description. |
static String |
RESET_VALIDATED_VALUES
Reset validated values method. |
static String |
RESET_VALIDATED_VALUES_DESCRIPTION
Reset validated values description. |
static String |
SET_ATTRIBUTE_VALUE
Set attribute value method. |
static String |
SET_ATTRIBUTE_VALUE_DESCRIPTION
Set attribute value description. |
static String |
SET_VALIDATED_ELEMENT
Set validated element method. |
static String |
SET_VALIDATED_ELEMENT_DESCRIPTION
Set validated element description. |
static String |
SET_VALIDATED_VALUE
Set validated value method. |
static String |
SET_VALIDATED_VALUE_DESCRIPTION
Set validated value description. |
static String |
VALIDATE_ATTRIBUTE_VALUES
Validate attribute values method. |
static String |
VALIDATE_ATTRIBUTE_VALUES_DESCRIPTION
Validate attribute values description. |
static String |
VALIDATED_VALUES
Validated values attribute. |
static String |
VALIDATED_VALUES_DESCRIPTION
Validated values description. |
static String |
VARIABLE_ID
Variable id attribute. |
static String |
VARIABLE_ID_DESCRIPTION
Variable id description. |
static String |
VARIABLE_TYPE
Variable type attribute. |
static String |
VARIABLE_TYPE_DESCRIPTION
Variable type description. |
| Fields inherited from interface org.norther.tammi.core.base.ReferableMBean |
|---|
DEFAULT_ID, ID, MBEAN, MBEAN_DESCRIPTION, TYPE |
| Method Summary | |
|---|---|
void |
addValidatedElement(String name,
int index,
Object value)
Adds an indexed element to an array attribute with validation. |
void |
addValidatedElement(String name,
Object value)
Adds an element to an array attribute with validation. |
void |
applyAttributeExporter(AttributeExporter exporter)
Applies an attribute exporter. |
void |
applyAttributeImporter(AttributeImporter importer)
Applies an attribute importer. |
void |
applyAttributeValidator(AttributeValidator validator)
Applies an attribute validator. |
VariableAttributeInfo |
attributeInfo(String name)
Returns attribute info for a named attribute. |
VariableAttributeInfo |
attributeInfo(String name,
boolean unlocked)
Returns optionally unlocked attribute info for a named attribute. |
int |
attributeLength(String name)
Returns the length of an array attribute. |
List |
attributeList()
Returns attribute info for all attributes in the definition order without internal attributes. |
List |
attributeList(boolean unlocked)
Returns optionally unlocked attribute info for all attributes in the definition order without internal attributes. |
List |
attributeList(String group)
Returns attribute info for attributes of the specified group in the definition order without internal attributes. |
List |
attributeList(String group,
boolean unlocked)
Returns optionally unlocked attribute info for attributes of the specified group in the definition order without internal attributes. |
void |
clearAttributeValues()
Clears attribute values of the current attributes. |
Object |
clone()
Clones this variable. |
boolean |
containsAttribute(String name)
Checks whether the named attribute exists. |
AttributeList |
exportAttributes(Identity id,
Object source,
boolean foreign)
Exports attribute values to another variable identified by the specified Identity and obtained from an external source by applying
the exporter of this variable. |
AttributeList |
exportAttributes(Object target)
Exports attribute values to another object. |
AttributeList |
exportAttributes(Object target,
AttributeFilter filter)
Exports filtered attribute values to another object. |
AttributeList |
exportAttributes(Variable other,
Object source,
boolean foreign)
Exports attribute values to another variable obtained from an external source by applying the exporter of this variable. |
Object |
getAttribute(String name)
Gets the value of the named internal or dynamic attribute without access checks and any variable specific validation. |
AttributeList |
getAttributes(String[] names)
Gets the values of the named internal or dynamic attributes without access checks and any variable specific validation. |
Object |
getAttributeValue(String name)
Gets the value of the named dynamic attribute without access checks and any variable specific validation. |
Object |
getValidatedElement(String name,
int index)
Gets the indexed element of an array attribute with validation. |
Object |
getValidatedValue(String name)
Gets the value of a named dynamic attribute with validation. |
Map |
getValidatedValues()
Gets attribute values as a map of name value bindings with validation. |
Object |
getVariableId()
Gets the id of this variable corresponding its primary attributes. |
String |
getVariableType()
Gets the type of this variable in the variable registry. |
AttributeList |
importAttributes(Identity id,
Object source,
boolean foreign)
Imports attribute values from another variable identified by the specified Identity and obtained from an external source by
applying the importer of this variable. |
AttributeList |
importAttributes(Object source)
Imports attribute values from another object. |
AttributeList |
importAttributes(Object source,
AttributeFilter filter)
Imports filtered attribute values from another object. |
AttributeList |
importAttributes(Variable other,
Object source,
boolean foreign)
Imports attribute values from another variable obtained from an external source by applying the importer of this variable. |
Object |
removeValidatedElement(String name,
int index)
Removes the indexed element from an array attribute. |
boolean |
removeValidatedElement(String name,
Object value)
Removes an element from an array attribute. |
Map |
resetValidatedValues(Map attributes)
Resets attribute values in a map of name value bindings with validation. |
void |
setAttribute(Attribute attr)
Sets the value of the given internal or dynamic attribute without access checks and any variable specific validation. |
AttributeList |
setAttributes(AttributeList attrs)
Sets the values of the listed internal or dynamic attributes without access checks and any variable specific validation. |
void |
setAttributeValue(String name,
Object value)
Sets the value of the named dynamic attribute without access checks and any variable specific validation. |
void |
setValidatedElement(String name,
int index,
Object value)
Sets the indexed element of an array attribute with validation. |
void |
setValidatedValue(String name,
Object value)
Sets the value of an attribute as a name value pair with validation. |
void |
setValidatedValues(Map attributes)
Sets attribute values in a map of name value bindings with validation. |
void |
setVariableId(Object id)
Sets the id of this variable corresponding its primary attributes. |
Map |
validateAttributeValues()
Validates attribute values of the current attributes. |
Map |
validateAttributeValues(Map attributes)
Validates attribute values in a map of name value bindings. |
| Methods inherited from interface org.norther.tammi.core.base.ReferableMBean |
|---|
getMBean |
| Methods inherited from interface javax.management.DynamicMBean |
|---|
getMBeanInfo, invoke |
| Field Detail |
|---|
static final String VALIDATED_VALUES
static final String VARIABLE_TYPE
static final String VARIABLE_ID
static final String GET_ATTRIBUTE_VALUE
static final String SET_ATTRIBUTE_VALUE
static final String RESET_VALIDATED_VALUES
static final String VALIDATE_ATTRIBUTE_VALUES
static final String CLEAR_ATTRIBUTE_VALUES
static final String GET_VALIDATED_VALUE
static final String SET_VALIDATED_VALUE
static final String GET_VALIDATED_ELEMENT
static final String SET_VALIDATED_ELEMENT
static final String ADD_VALIDATED_ELEMENT
static final String REMOVE_VALIDATED_ELEMENT
static final String ATTRIBUTE_LENGTH
static final String CONTAINS_ATTRIBUTE
static final String ATTRIBUTE_INFO
static final String ATTRIBUTE_LIST
static final String APPLY_ATTRIBUTE_VALIDATOR
static final String APPLY_ATTRIBUTE_IMPORTER
static final String APPLY_ATTRIBUTE_EXPORTER
static final String IMPORT_ATTRIBUTES
static final String EXPORT_ATTRIBUTES
static final String VALIDATED_VALUES_DESCRIPTION
static final String VARIABLE_TYPE_DESCRIPTION
static final String VARIABLE_ID_DESCRIPTION
static final String GET_ATTRIBUTE_VALUE_DESCRIPTION
static final String SET_ATTRIBUTE_VALUE_DESCRIPTION
static final String RESET_VALIDATED_VALUES_DESCRIPTION
static final String VALIDATE_ATTRIBUTE_VALUES_DESCRIPTION
static final String CLEAR_ATTRIBUTE_VALUES_DESCRIPTION
static final String GET_VALIDATED_VALUE_DESCRIPTION
static final String SET_VALIDATED_VALUE_DESCRIPTION
static final String GET_VALIDATED_ELEMENT_DESCRIPTION
static final String SET_VALIDATED_ELEMENT_DESCRIPTION
static final String ADD_VALIDATED_ELEMENT_DESCRIPTION
static final String REMOVE_VALIDATED_ELEMENT_DESCRIPTION
static final String ATTRIBUTE_LENGTH_DESCRIPTION
static final String CONTAINS_ATTRIBUTE_DESCRIPTION
static final String ATTRIBUTE_INFO_DESCRIPTION
static final String ATTRIBUTE_LIST_DESCRIPTION
static final String APPLY_ATTRIBUTE_VALIDATOR_DESCRIPTION
static final String APPLY_ATTRIBUTE_IMPORTER_DESCRIPTION
static final String APPLY_ATTRIBUTE_EXPORTER_DESCRIPTION
static final String IMPORT_ATTRIBUTES_DESCRIPTION
static final String EXPORT_ATTRIBUTES_DESCRIPTION
| Method Detail |
|---|
Object clone()
Object getAttribute(String name)
throws AttributeNotFoundException,
ReflectionException,
MBeanException
getAttribute in interface DynamicMBeanname - the attribute name.
AttributeNotFoundException - if the name is unknown.
ReflectionException - if a getter is not found.
MBeanException - if getting of the value fails.
void setAttribute(Attribute attr)
throws AttributeNotFoundException,
InvalidAttributeValueException,
ReflectionException,
MBeanException
setAttribute in interface DynamicMBeanattr - the attribute to set.
AttributeNotFoundException - if the name is unknown.
InvalidAttributeValueException - if the value is invalid.
ReflectionException - if a getter is not found.
MBeanException - if getting of the value fails.AttributeList getAttributes(String[] names)
getAttributes in interface DynamicMBeannames - an array of attribute names.
AttributeList setAttributes(AttributeList attrs)
setAttributes in interface DynamicMBeanattrs - the attributes to set.
Object getAttributeValue(String name)
throws AttributeNotFoundException
name - the attribute name.
AttributeNotFoundException - if the name is unknown.
void setAttributeValue(String name,
Object value)
throws AttributeNotFoundException,
InvalidAttributeValueException
name - the attribute name.value - the attribute value.
AttributeNotFoundException - if the name is unknown.
InvalidAttributeValueException - if the value is invalid.Map getValidatedValues()
void setValidatedValues(Map attributes)
attributes - the attributes map.Map resetValidatedValues(Map attributes)
Invalid attributes are returned in a map binding an invalid attribute name to a validation exception. An empty map indicates that all attributes were valid.
Note that if the attributes map does not contain any settable values, null is returned.
attributes - the attributes map.
Map validateAttributeValues(Map attributes)
Invalid attributes are returned in a map binding an invalid attribute name to a validation exception. An empty map indicates that all attributes were valid.
Note that if the attributes map does not contain any settable values, null is returned.
attributes - the attributes map.
Map validateAttributeValues()
Invalid attributes are returned in a map binding an invalid attribute name to a validation exception. An empty map indicates that all attributes were valid.
void clearAttributeValues()
Object getValidatedValue(String name)
throws AttributeNotFoundException
name - the attribute name.
AttributeNotFoundException - if the name is unknown.
void setValidatedValue(String name,
Object value)
throws AttributeNotFoundException,
InvalidAttributeValueException
name - the attribute name.value - the attribute value.
AttributeNotFoundException - if the name is unknown.
InvalidAttributeValueException - if the value is invalid.
Object getValidatedElement(String name,
int index)
throws AttributeNotFoundException
name - the attribute name.index - the element index.
AttributeNotFoundException - if the name is unknown.
void setValidatedElement(String name,
int index,
Object value)
throws AttributeNotFoundException,
InvalidAttributeValueException
name - the attribute name.index - the element index.value - the value of the element.
AttributeNotFoundException - if the name is unknown.
InvalidAttributeValueException - if the value is invalid.
void addValidatedElement(String name,
Object value)
throws AttributeNotFoundException,
InvalidAttributeValueException
name - the attribute name.value - the value of the element.
AttributeNotFoundException - if the name is unknown.
InvalidAttributeValueException - if the value is invalid.
void addValidatedElement(String name,
int index,
Object value)
throws AttributeNotFoundException,
InvalidAttributeValueException
name - the attribute name.index - the element index.value - the value of the element.
AttributeNotFoundException - if the name is unknown.
InvalidAttributeValueException - if the value is invalid.
boolean removeValidatedElement(String name,
Object value)
throws AttributeNotFoundException
name - the attribute name.value - the value of the element.
AttributeNotFoundException - if the name is unknown.
Object removeValidatedElement(String name,
int index)
throws AttributeNotFoundException
name - the attribute name.index - the element index.
AttributeNotFoundException - if the name is unknown.
int attributeLength(String name)
throws AttributeNotFoundException
name - the attribute name.
AttributeNotFoundException - if the name is unknown.boolean containsAttribute(String name)
name - the name of the attribute.
VariableAttributeInfo attributeInfo(String name)
name - the name of the attribute.
VariableAttributeInfo attributeInfo(String name,
boolean unlocked)
name - the name of the attribute.unlocked - true for unlocked, false otherwise.
List attributeList()
List attributeList(boolean unlocked)
unlocked - true for unlocked, false otherwise.
List attributeList(String group)
group - the group.
List attributeList(String group,
boolean unlocked)
group - the group.unlocked - true for unlocked, false otherwise.
String getVariableType()
Object getVariableId()
void setVariableId(Object id)
throws AttributeNotFoundException,
InvalidAttributeValueException
id - the variable id or null if not defined.
AttributeNotFoundException - if the id is unknown.
InvalidAttributeValueException - if the id is invalid.void applyAttributeValidator(AttributeValidator validator)
validator - the attribute validator.void applyAttributeImporter(AttributeImporter importer)
importer - the attribute importer.void applyAttributeExporter(AttributeExporter exporter)
exporter - the attribute exporter.
AttributeList importAttributes(Identity id,
Object source,
boolean foreign)
Identity and obtained from an external source by
applying the importer of this variable.
id - the identity.source - the source object.foreign - true for a foreign import, otherwise false.
AttributeList importAttributes(Variable other,
Object source,
boolean foreign)
other - the other variable.source - the source object.foreign - true for a foreign import, otherwise false.
AttributeList importAttributes(Object source)
Note that attributes of compatible types are accepted directly without validation.
source - the source object.
AttributeList importAttributes(Object source,
AttributeFilter filter)
Note that attributes of compatible types are accepted directly without validation.
source - the source object.filter - the attribute filter to apply.
AttributeList exportAttributes(Identity id,
Object source,
boolean foreign)
Identity and obtained from an external source by applying
the exporter of this variable.
id - the identity.source - the source object.foreign - true for a foreign export, otherwise false.
AttributeList exportAttributes(Variable other,
Object source,
boolean foreign)
other - the other variable.source - the source object.foreign - true for a foreign export, otherwise false.
AttributeList exportAttributes(Object target)
tar