|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.ales.management.Resource
This class represents a resource object.
Field Summary | |
static int |
BINDING_NODE
|
static int |
INVALID_RESOURCE_NODE
|
static int |
ORGNIZATIONAL_NODE
|
static int |
RESOURCE_NODE
|
static java.lang.String |
ROOT_RESOURCE
|
Method Summary | |
void |
addAttribute(AttributeElement attr)
Add the attribute to this resource. |
Resource |
cloneTo(Resource destination)
Clone the resource and all its children to be child of another resource. |
Resource |
createChild(java.lang.String name)
Create a child node of this resource with relative name.Relative name the name has no parent resource info in it, For example, if fully qualified name is resources/aaa/bbb, then bbb is the relative name. |
Resource |
createChild(java.lang.String name,
java.lang.String description,
boolean isBinding,
boolean isDistributionPoint,
boolean isAllowVirtualResource)
Create the child resource with relative name. |
AttributeElement |
getAttribute(java.lang.String attrName,
int queryType)
Get the specific attribute of this resource by attribute name |
AttributeQueryResult |
getAttributes(int attrQueryType)
Get the attributes of this resource. |
java.lang.String |
getBoundSSM()
Get the bound SSM to this resource. |
java.lang.String |
getDescription()
Get the description of the resource |
ResourceQueryResult |
getDirectChildren(java.lang.String queryString)
Get the direct children of this resource |
java.lang.String |
getName()
Return the full qualified name of the resource. |
Resource |
getParent()
Get the parent resource of this resource. |
java.lang.String |
getRelativeName()
Get the relative name of the resource. |
java.lang.String |
getScopedName()
|
int |
getType()
Get the resource type |
boolean |
isBindingNode()
Check whether this resource is a binding node. |
boolean |
isChildBindingNodeAllowed()
Check if child resource can be a binding node. |
boolean |
isChildDistributionPointAllowed()
Check if the child of this resource can be a distribution point. |
boolean |
isDistributionPoint()
Check whether this resource is a distribution point. |
boolean |
isVirtualAllowed()
Check whether this resources is virtual resource. |
void |
modifyAttribute(AttributeElement oldAttr,
AttributeElement newAttr)
Modify the resource attribute. |
void |
moveTo(Resource destination)
Move the resource and all its children to be child of another resource. |
void |
moveTo(Resource destination,
boolean isForced)
Move the resource and all its children to be child of another resource. |
void |
removeAttribute(AttributeElement attr)
Remove the resource attribute. |
void |
removeAttribute(java.lang.String attrName)
Remove resource attribute with the specified name. |
void |
removeChild(Resource child)
Remove the child resource. |
void |
removeChild(Resource child,
boolean isCascade)
Remove the child resource in cascading way. |
void |
removeChild(java.lang.String name)
Remove the child resource by relative name. |
void |
removeChild(java.lang.String name,
boolean isCascade)
Remove the child resource by relative name in cascading way. |
void |
setBoundSSM(java.lang.String ssmName)
Bind the SSM to this resource. |
void |
setDescription(java.lang.String description)
Set the description of this resource. |
void |
setDistributionPoint(boolean isDistributionPoint)
Set this resource to be a distribution point or not. |
void |
setRelativeName(java.lang.String newRelativeName)
Rename the resource to the given name. |
void |
setVirtualResource(boolean virtualAllowed)
Set the resource to be virtual resource or not. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int INVALID_RESOURCE_NODE
public static final int ORGNIZATIONAL_NODE
public static final int BINDING_NODE
public static final int RESOURCE_NODE
public static final java.lang.String ROOT_RESOURCE
Method Detail |
public java.lang.String getName()
public void setRelativeName(java.lang.String newRelativeName) throws ManagementException
newRelativeName
- new relative name.
Relative name is the name without any path info. For example, relative name for
//resources/aa/bb/cc is cc. This parameter can not be null or zero length
string.public java.lang.String getRelativeName()
public Resource getParent() throws ManagementException
public ResourceQueryResult getDirectChildren(java.lang.String queryString) throws ManagementException
queryString
- the filter against the children's namepublic AttributeQueryResult getAttributes(int attrQueryType) throws ManagementException
attrQueryType
- either QueryType.DIRECT or QueryType.ALLpublic AttributeElement getAttribute(java.lang.String attrName, int queryType) throws ManagementException
attrName
- the name of the attribute. It can not be null or zero length string.queryType
- either QueryType.DIRECT or QueryType.ALLpublic void addAttribute(AttributeElement attr) throws ManagementException
attr
- the attributeElement to be added.public void modifyAttribute(AttributeElement oldAttr, AttributeElement newAttr) throws ManagementException
oldAttr
- the attribute to be modifiednewAttr
- the new attribute desired. It has the same name and type as the old one but with new vaule desired.public void removeAttribute(java.lang.String attrName) throws ManagementException
attrName
- name of the attribute to be removed. It can not be null or
zero length string.public void removeAttribute(AttributeElement attr) throws ManagementException
attr
- the attribute to be removed. It can not be null.public java.lang.String getDescription() throws ManagementException
public void setDescription(java.lang.String description) throws ManagementException
description
- the description to set.public boolean isBindingNode() throws ManagementException
public boolean isDistributionPoint() throws ManagementException
public void setDistributionPoint(boolean isDistributionPoint) throws ManagementException
isDistributionPoint
- true to set the resource to be a distribution point, or false to set it not to be.public boolean isVirtualAllowed() throws ManagementException
public void setVirtualResource(boolean virtualAllowed) throws ManagementException
virtualAllowed
- true for virtual resource, or false for non virtual resource.public java.lang.String getBoundSSM() throws ManagementException
public void setBoundSSM(java.lang.String ssmName) throws ManagementException
ssmName
- the name of SSM to be bound, null to remove bound ssm.public void removeChild(java.lang.String name) throws ManagementException
name
- the relative name of the child resource to be removed.public void removeChild(java.lang.String name, boolean isCascade) throws ManagementException
name
- the relative name of the child resource to remove.isCascade
- If true, the child resource, all its children and all policies on them will be removed. If
If false, policies on the children of the child resources are not allowed to remove. If there
are policies on the child resource and its children, the operation will fail.public void removeChild(Resource child) throws ManagementException
child
- the child resource to be removed.public void removeChild(Resource child, boolean isCascade) throws ManagementException
the
- child resource to be removed.isCascade
- If true, the child resource, all its children and all policies on them will be removed. If
If false, policies on the children of the child resources are not allowed to remove. If there
are policies on the child resource and its children, the operation will fail.public Resource createChild(java.lang.String name) throws ManagementException
name
- The relative name of the child to createpublic Resource createChild(java.lang.String name, java.lang.String description, boolean isBinding, boolean isDistributionPoint, boolean isAllowVirtualResource) throws ManagementException
name
- relative name of the child resource to be createddescription
- description for the new resourceisBinding
- true if the resource is binding node, or false for none binding node.isDistributionPoint
- true if the resource is distribution point, or false for none distribution point.isAllowVirtualResource
- true if the resource is virtual resource, or false for none virtual resource.public void moveTo(Resource destination, boolean isForced) throws ManagementException
destination
- destination resourceisForced
- true for removing those polcies and move if there are policies on the resource or its
descendants; false for not allowing removing those polices when moving, if there are policies on
the resource or its descendants, the operation fails.
fail.public void moveTo(Resource destination) throws ManagementException
destination
- destination resourcepublic Resource cloneTo(Resource destination) throws ManagementException
destination
- destination resourcepublic boolean isChildBindingNodeAllowed() throws ManagementException
public int getType() throws ManagementException
public boolean isChildDistributionPointAllowed() throws ManagementException
public java.lang.String getScopedName()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |