|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A MetaObject
represents a generic hierarchical object. The object under the same
tree has the same type. The attributes can be inherited from bottom to top or from top to bottom.
A root node instance of MetaObject can be created through MetaObjectFactory with type specified.
Multiple types of root node can be created in the same application.
Method Summary | |
void |
addAttribute(AttributeElement attribute)
Add the specified attribute to this meta object. |
void |
addAttribute(java.lang.String name,
java.lang.String value)
Create an attribute with specified name and value for this meta object. |
MetaObject |
cloneTo(MetaObject newParent)
Clone the copy of this object to be under the object specified. |
MetaObject |
createChild(java.lang.String name)
Create a child object of this object. |
MetaObjectQueryResult |
getAllAncestors(java.lang.String filterString)
Return query result on this MetaObject that contains all ancestors match the pattern specified. |
MetaObjectQueryResult |
getAllDescendants()
Return descendants query result on this MetaObject, |
MetaObjectQueryResult |
getAllDescendants(java.lang.String filterString)
Return query result on the MetaObject that contains all children object match the pattern specified. |
AttributeElement |
getAttribute(java.lang.String attributeName)
Find an attribute with the specified name. |
AttributeQueryResult |
getAttributes(int attrQueryType)
Find all attributes which has the attrQueryType of this meta object. |
MetaObject |
getChildByName(java.lang.String objName)
Get child object of this object by name. |
MetaObjectQueryResult |
getChildren()
Return query result contains all children of this MetaObject. |
java.util.Collection |
getChildrenWithAttribute(AttributeElement attribute)
Return all children of this object with a given attribute. |
int |
getInheritanceModel()
Get the inheritance model of this object |
java.lang.String |
getName()
Get the name of the MetaObject. |
MetaObject |
getParent()
Return the parent of this object. |
java.lang.String |
getRootName()
Return the root name of the MetaObject. |
java.lang.String |
getType()
Return the type of the MetaObject |
void |
modifyAttribute(AttributeElement attribute)
Modify the value of an attribute on this meta object using the given attribute element. |
void |
modifyAttribute(java.lang.String name,
java.lang.String newValue)
Modify the value of an attribute with the specified name from this meta object. |
void |
moveTo(MetaObject newParent)
Move this object to be under the object specified. |
void |
removeAttribute(AttributeElement attr)
Remove the specified attribute from this meta object. |
void |
removeAttribute(java.lang.String name)
Remove an attribute by name. |
void |
removeChild(MetaObject obj)
Remove the given child and all children's descendants from this MetaObject. |
void |
removeChild(java.lang.String objName)
Remove the child object with name and all the child's descendants from this MetaObject. |
void |
rename(java.lang.String newName)
Rename this object with the given newName . |
Method Detail |
public java.lang.String getRootName()
public java.lang.String getType()
public int getInheritanceModel() throws ManagementException
public void rename(java.lang.String newName) throws ManagementException
newName
. Root object can not renamed.
newName
- the desired new name.public MetaObject createChild(java.lang.String name) throws ManagementException
name
- the relative name of child object.public MetaObject getChildByName(java.lang.String objName) throws ManagementException
objName
- the name of the child objectpublic void removeChild(java.lang.String objName) throws ManagementException
objName
- the name of the child to remove in string format.public void removeChild(MetaObject obj) throws ManagementException
obj
- the MetaObject to remove from this object.public MetaObjectQueryResult getChildren() throws ManagementException
public java.util.Collection getChildrenWithAttribute(AttributeElement attribute) throws ManagementException
attribute
- the attribute that the child object should have.public MetaObjectQueryResult getAllDescendants() throws ManagementException
public MetaObjectQueryResult getAllDescendants(java.lang.String filterString) throws ManagementException
public MetaObject getParent() throws ManagementException
public MetaObjectQueryResult getAllAncestors(java.lang.String filterString) throws ManagementException
public java.lang.String getName()
public MetaObject cloneTo(MetaObject newParent) throws ManagementException
newParent
with same name existed, the operation will fail.
newParent
- the object which the copied instance will be underpublic void moveTo(MetaObject newParent) throws ManagementException
newParent
with same name existed, the operation will fail.
newParent
- the object which will be parent of this objectpublic void addAttribute(java.lang.String name, java.lang.String value) throws ManagementException
name
- name of attribute.value
- value of attribute.public void addAttribute(AttributeElement attribute) throws ManagementException
attribute
- the attribute to be addedpublic void removeAttribute(java.lang.String name) throws ManagementException
name
- name of attribute to be removed.public void removeAttribute(AttributeElement attr) throws ManagementException
attr
- the attribute to be removed.public void modifyAttribute(java.lang.String name, java.lang.String newValue) throws ManagementException
name
- name of the attribute.newValue
- new attribute value desired.public void modifyAttribute(AttributeElement attribute) throws ManagementException
attribute
- The name of this passed in attribute is used to find attribute to be set of the meta object.
The value of this passed in attribute is set to the value of the found attribute of the meta object.public AttributeElement getAttribute(java.lang.String attributeName) throws ManagementException
attributeName
- name of the attribute.public AttributeQueryResult getAttributes(int attrQueryType) throws ManagementException
attrQueryType
of this meta object.
attrQueryType
- the attribute type.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |