|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wles.blm.BLMComponentManager
com.wles.blm.BLMApplicationManager
Manages all the operations on resources. In addition
to creating, renaming, removing and reporting functions the class also manages
retrieving the engine bound to the specific resource binding nodes.
Resource names are specified in a qualified format, the format is //app/policy/resourceA/resourceB/resourceC
. Resource names must start with the prefix //app/policy/
, which is the root of the resource tree.
Use a BLMContextManager
to obtain an instance of a
BLMApplicationManager
.
BLMContextManager
Field Summary | |
static int |
ATTRIBUTE_QUERY_TYPE_DIRECT
Attribute query type specifiying the attribute value assinged directly to the resource. |
static int |
ATTRIBUTE_QUERY_TYPE_ENFORCED
Attribute query type specifiying the attribute value based on resource attribute inheritance. |
static int |
ATTRIBUTE_QUERY_TYPE_INHERITED
Attribute query type specifiying the attribute value assinged to an ancestor of the resource. |
static int |
BINDING_TYPE_ALL
Specifies any binding type. |
static int |
BINDING_TYPE_BOUND
Specifies unbound bindinding type. |
static int |
BINDING_TYPE_UNBOUND
Specifies bound binding type. |
static java.lang.String |
RESOURCE_TYPE_APPLICATION
Application resource type, used to designate the logical root of an application. |
static java.lang.String |
RESOURCE_TYPE_BASIC
Basic resource type, a resoure below a binding node. |
static java.lang.String |
RESOURCE_TYPE_BINDING
Binding resource type, used to designate a resource which may be bound to an SSM. |
static java.lang.String |
RESOURCE_TYPE_ORGINIZATIONAL
Orginization resource type is used to designate top level resources. |
Method Summary | |
void |
copyObjects(java.lang.String nodeName,
java.lang.String pasteUnderNodeName)
Copies resources and their attributes and pastes them under another resource. |
void |
create(java.lang.String name,
boolean isBinding)
Create a new resource. |
java.lang.String |
filter(java.lang.String findPattern)
Finds a set of matching resource names based on a filter pattern. |
boolean |
find(java.lang.String cID,
java.lang.String name)
Checks for a resource in a resource collection. |
java.lang.String |
getApplicationNodes(java.lang.String filterString)
Finds application node resources matching a specified filter pattern. |
java.lang.String |
getAttributes(java.lang.String name,
int attrQueryType)
Finds the attributes for a resource. |
java.lang.String |
getBindingNodes(java.lang.String filterString,
int bindingType)
Finds all binding nodes matching a specified filter pattern. |
int |
getCount(java.lang.String cID)
Returns the size of the resource or resource attribute collection. |
java.lang.String |
getDeletedObjects(java.lang.String objectPrefix)
Finds all resources which have been deleted but the deletion notification has not yet been distributed. |
java.lang.String |
getDescription(java.lang.String name)
Get a description for an application resource. |
java.lang.String |
getDirectDescendantsApplications(java.lang.String name,
java.lang.String filterString)
Finds the resources who are direct decendents of the specified resource. |
java.lang.String |
getDistributionPointNodes(java.lang.String filterString)
Find distribution point resources matching a specified filter pattern. |
java.lang.String |
getNewObjects(java.lang.String objectPrefix)
Finds all newly created resources which have not yet been deployed. |
java.lang.String[] |
getReport(java.lang.String cID)
Returns a report on a a resource collection. |
java.lang.String[] |
getReport(java.lang.String cID,
int iStart,
int iCount)
Returns a report on a subset of a resource collection. |
AttributeElement[] |
getReportOnAppAttributes(java.lang.String cID)
Returns a report on a resource attribute collection. |
AttributeElement[] |
getReportOnAppAttributes(java.lang.String cID,
int iStart,
int iCount)
Returns a report on a subset of a resource attribute collection. |
AttributeElement |
getResourceAttribute(java.lang.String name,
java.lang.String attrName,
int attrQueryType)
Gets a resource's attribute value. |
java.lang.String |
getSSM(java.lang.String resourceName)
Returns the name of the SSM to which the resource is bound. |
java.lang.String |
getType(java.lang.String name)
Gets the type code of the resource |
boolean |
isApplicationNode(java.lang.String name)
Determine if the specified resource is an application resource. |
boolean |
isBindingNode(java.lang.String name)
Determines if the specified resource is a binding resource. |
boolean |
isDistributionPoint(java.lang.String name)
Determines if the specified resource is a distribution point. |
boolean |
isGuarded(java.lang.String name)
Checks if the specified resource is bound to an engine. |
boolean |
isLeaf(java.lang.String name)
Determines if the specified resource is a leaf, i.e. resource with no defined children. |
boolean |
isVirtualResourceAllowed(java.lang.String name)
Determines if the specified resource may have virtual children. |
void |
release(java.lang.String cID)
Releases the a resource or resource attribute collection. |
void |
remove(java.lang.String name)
Removes a resource from the system. |
void |
removeCascade(java.lang.String name)
Removes a resource and all related elements from the system. |
void |
removeResourceAttribute(java.lang.String name,
java.lang.String attrName)
Removes an attribute assignment from a resource. |
void |
rename(java.lang.String oldName,
java.lang.String newName)
Renames a resource in the system. |
void |
setApplicationNode(java.lang.String name,
boolean isApplication)
Specifies a resource as an application, or unset it. |
void |
setDescription(java.lang.String name,
java.lang.String description)
Adds or resets a description for an application resource. |
void |
setDistributionPoint(java.lang.String name,
boolean isDistributionPoint)
Specifies a resource as a distribution point, or undeclare it. |
void |
setResourceAttribute(java.lang.String name,
AttributeElement attrElem)
Creates or reset an attribute value for a resource. |
void |
setVirtualResourceAllowed(java.lang.String name,
boolean allowVirtualChildren)
Specifies if a resource may have virtual children or not. |
void |
unsetVirtualResourceAllowed(java.lang.String name)
Unsets a resources virtual resource setting. |
Methods inherited from class com.wles.blm.BLMComponentManager |
create |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ATTRIBUTE_QUERY_TYPE_DIRECT
public static final int ATTRIBUTE_QUERY_TYPE_ENFORCED
public static final int ATTRIBUTE_QUERY_TYPE_INHERITED
public static final int BINDING_TYPE_ALL
public static final int BINDING_TYPE_BOUND
public static final int BINDING_TYPE_UNBOUND
public static final java.lang.String RESOURCE_TYPE_APPLICATION
public static final java.lang.String RESOURCE_TYPE_BASIC
public static final java.lang.String RESOURCE_TYPE_BINDING
public static final java.lang.String RESOURCE_TYPE_ORGINIZATIONAL
Method Detail |
public void copyObjects(java.lang.String nodeName, java.lang.String pasteUnderNodeName) throws BLMException
nodeName
- The resource name to copy, all child resources will be copied as well.
Use fully qualified object name.pasteUnderNodeName
- Resource under which to paste the selected resources.
Use fully qualified object name.
BLMException
- on failurepublic void create(java.lang.String name, boolean isBinding) throws BLMException
//app/policy/foo
must exist in order to create //app/policy/foo/bar
name
- Fully qualified name of the resource to be createdisBinding
- specify if this is a binding node
BLMException
public java.lang.String filter(java.lang.String findPattern) throws BLMException
filter
in class BLMComponentManager
findPattern
- Pattern for the filter eg. "//app/policy/MyApp/*"
BLMException
getReport(String cID)
,
getReport(String cID, int iStart, int iCount)
,
getCount(String CID)
,
release(String cID)
,
find(String cID, String name)
public boolean find(java.lang.String cID, java.lang.String name) throws BLMException
find
in class BLMComponentManager
cID
- collection ID of the collectionname
- fully qualified name of the resource
BLMException
public java.lang.String getApplicationNodes(java.lang.String filterString) throws BLMException
filterString
- filter pattern for resource names
BLMException
getReport(String cID)
,
getReport(String cID, int iStart, int iCount)
,
getCount(String CID)
,
release(String cID)
,
find(String cID, String name)
public java.lang.String getAttributes(java.lang.String name, int attrQueryType) throws BLMException
name
- Fully qualified name of the resourceattrQueryType
- one of
ATTRIBUTE_QUERY_TYPE_DIRECT, ATTRIBUTE_QUERY_TYPE_INHERITED, ATTRIBUTE_QUERY_TYPE_ENFORCED
BLMException
getReportOnAppAttributes(String cID)
,
getReportOnAppAttributes(String cID, int iStart, int iCount)
,
getCount(String cID)
,
release(String cID)
,
ATTRIBUTE_QUERY_TYPE_DIRECT
,
ATTRIBUTE_QUERY_TYPE_INHERITED
,
ATTRIBUTE_QUERY_TYPE_ENFORCED
public java.lang.String getBindingNodes(java.lang.String filterString, int bindingType) throws BLMException
filterString
- filter pattern for resource namesbindingType
- either BINDING_TYPE_ALL, BINDING_TYPE_BOUND, BINDING_TYPE_UNBOUND
BLMException
getReport(String cID)
,
getReport(String cID, int iStart, int iCount)
,
getCount(String CID)
,
release(String cID)
,
find(String cID, String name)
,
BINDING_TYPE_ALL
,
BINDING_TYPE_BOUND
,
BINDING_TYPE_UNBOUND
public int getCount(java.lang.String cID) throws BLMException
getCount
in class BLMComponentManager
cID
- ID of the collection, either resource or resource attribute collection IDs may be used.
BLMException
public java.lang.String getDeletedObjects(java.lang.String objectPrefix) throws BLMException
objectPrefix
- Prefix of the resources that should be used during the search,
e.g. //app/policy/BindingPoint/MyResources
.
The method will return resources that start with
the objectPrefix
prefix only.
BLMException
getReport(String cID)
,
getReport(String cID, int iStart, int iCount)
,
getCount(String CID)
,
release(String cID)
,
find(String cID, String name)
public java.lang.String getDescription(java.lang.String name) throws BLMException
name
- Fully qualified name of the resource
BLMException
public java.lang.String getDirectDescendantsApplications(java.lang.String name, java.lang.String filterString) throws BLMException
name
- Fully qualified name of the resource
BLMException
getReport(String cID)
,
getReport(String cID, int iStart, int iCount)
,
getCount(String CID)
,
release(String cID)
,
find(String cID, String name)
public java.lang.String getDistributionPointNodes(java.lang.String filterString) throws BLMException
filterString
- filter pattern for resource names.
BLMException
getReport(String cID)
,
getReport(String cID, int iStart, int iCount)
,
getCount(String CID)
,
release(String cID)
,
find(String cID, String name)
public java.lang.String getNewObjects(java.lang.String objectPrefix) throws BLMException
objectPrefix
- Prefix of the resources that should be used during the search,
e.g. //app/policy/BindingPoint/MyResources
.
The method will return resources that start with
the objectPrefix
prefix only.
BLMException
getReport(String cID)
,
getReport(String cID, int iStart, int iCount)
,
getCount(String CID)
,
release(String cID)
,
find(String cID, String name)
public java.lang.String[] getReport(java.lang.String cID) throws BLMException
cID
- ID of the collection
BLMException
public java.lang.String[] getReport(java.lang.String cID, int iStart, int iCount) throws BLMException
cID
- ID of the collectioniStart
- Start index in the collectioniCount
- Number of objects. Set -1
for all objects.
BLMException
public AttributeElement[] getReportOnAppAttributes(java.lang.String cID) throws BLMException, BadParameterException
cID
- ID of a resource attribute collection
BLMException
BadParameterException
public AttributeElement[] getReportOnAppAttributes(java.lang.String cID, int iStart, int iCount) throws BLMException, BadParameterException
cID
- ID of a resource attribute collectioniStart
- Start index in the collectioniCount
- Number of objects. Set -1
for all objects.
BLMException
BadParameterException
public AttributeElement getResourceAttribute(java.lang.String name, java.lang.String attrName, int attrQueryType) throws BLMException, BadParameterException
name
- Fully qualified name of the resourceattrName
- Attribute nameattrQueryType
- Attribute query type, one of ATTRIBUTE_QUERY_TYPE_DIRECT, ATTRIBUTE_QUERY_TYPE_INHERITED, ATTRIBUTE_QUERY_TYPE_ENFORCED
null
is returned if the specified attribute is not defined for this resource.
BLMException
BadParameterException
ATTRIBUTE_QUERY_TYPE_DIRECT
,
ATTRIBUTE_QUERY_TYPE_INHERITED
,
ATTRIBUTE_QUERY_TYPE_ENFORCED
public java.lang.String getSSM(java.lang.String resourceName) throws BLMException
resourceName
- a fully qualified name of the resource
BLMException
public java.lang.String getType(java.lang.String name) throws BLMException
name
- Fully qualified name of the resource
RESOURCE_TYPE_ORGINIZATIONAL, RESOURCE_TYPE_APPLICATION, RESOURCE_TYPE_BINDING, RESOURCE_TYPE_BASIC
BLMException
RESOURCE_TYPE_ORGINIZATIONAL
,
RESOURCE_TYPE_APPLICATION
,
RESOURCE_TYPE_BINDING
,
RESOURCE_TYPE_BASIC
public boolean isApplicationNode(java.lang.String name) throws BLMException
name
- Fully qualified name of resource
BLMException
public boolean isBindingNode(java.lang.String name) throws BLMException
name
- Fully qualified name of resource
BLMException
public boolean isDistributionPoint(java.lang.String name) throws BLMException
name
- Fully qualified name of resource
BLMException
public boolean isGuarded(java.lang.String name) throws BLMException
name
- Fully qualified name of resource
BLMException
public boolean isLeaf(java.lang.String name) throws BLMException
name
- Fully qualified name of resource
BLMException
public boolean isVirtualResourceAllowed(java.lang.String name) throws BLMException, BadParameterException
name
- Fully qualified name of resource
BLMException
BadParameterException
public void release(java.lang.String cID) throws BLMException
null
collection id will cause all held collections to be released.
release
in class BLMComponentManager
cID
- ID of the collection
BLMException
public void remove(java.lang.String name) throws BLMException
remove
in class BLMComponentManager
name
- Fully qualified name of the resource
BLMException
public void removeCascade(java.lang.String name) throws BLMException
name
- Fully qualified name of the resource
BLMException
public void removeResourceAttribute(java.lang.String name, java.lang.String attrName) throws BLMException, BadParameterException
name
- Fully qualified name of the resourceattrName
- the name of the attribute to remove
BLMException
BadParameterException
public void rename(java.lang.String oldName, java.lang.String newName) throws BLMException
rename
in class BLMComponentManager
oldName
- Fully qualified old name of the resourcenewName
- Fully qualified new name of the resource
BLMException
public void setApplicationNode(java.lang.String name, boolean isApplication) throws BLMException
name
- Fully qualified name of the resourceisApplication
- true/false
BLMException
public void setDescription(java.lang.String name, java.lang.String description) throws BLMException
name
- Fully qualified name of the resourcedescription
- the resource description. When blank or null any existing description will be deleted.
BLMException
public void setDistributionPoint(java.lang.String name, boolean isDistributionPoint) throws BLMException
name
- Fully qualified name of the resourceisDistributionPoint
- true/false
BLMException
public void setResourceAttribute(java.lang.String name, AttributeElement attrElem) throws BLMException, BadParameterException
name
- Fully qualified name of the resourceattrElem
- the attribute to create or reset
BLMException
BadParameterException
public void setVirtualResourceAllowed(java.lang.String name, boolean allowVirtualChildren) throws BLMException, BadParameterException
name
- Fully qualified name of the resourceallowVirtualChildren
- true/false
BLMException
BadParameterException
public void unsetVirtualResourceAllowed(java.lang.String name) throws BLMException, BadParameterException
name
- Fully qualified name of the resource
BLMException
BadParameterException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |