|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface ResourceManipulator
provides
methods to determine the hierarchy of resource names.
Also it provides an interface to determine the service
type to which it be used. Service developers could
provide an implementation of this interface that will
determine its hierarchy during policy evaluation and
also its display in the GUI. A class that implements
this interface must have a empty constructor.
Method Summary | |
java.lang.String |
append(java.lang.String superResource,
java.lang.String subResource)
Appends sub-resource to super-resource. |
java.lang.String |
canonicalize(java.lang.String res)
Gets the canonicalized form of a resource string |
ResourceMatch |
compare(java.lang.String origRes,
java.lang.String compRes,
boolean wildcardCompare)
Compares two resources. |
java.util.Set |
getServiceTypeNames()
Gets the service type names for which the resoure name object can be used. |
java.lang.String |
getSubResource(java.lang.String res,
java.lang.String superRes)
Gets sub-resource from an original resource minus a super resource. |
void |
initialize(java.util.Map configParams)
Initializes the resource name with configuration information, usally set by the administrators |
java.lang.String[] |
split(java.lang.String res)
Method to split a resource into the smallest necessary subresource units |
Method Detail |
public java.util.Set getServiceTypeNames()
public void initialize(java.util.Map configParams)
configParams
- configuration parameters as a map.
The keys of the map are the configuration paramaters.
Each key is corresponding to one String
value
which specifies the configuration paramater value.public ResourceMatch compare(java.lang.String origRes, java.lang.String compRes, boolean wildcardCompare)
origRes
- name of the resource which will be comparedcompRes
- name of the resource which will be compared withwildcardCompare
- flag for wildcard comparisonResourceMatch
that
specifies if the resources are exact match, or
otherwise.
ResourceMatch.NO_MATCH means two resources don't match
ResourceMatch.EXACT_MATCH means two resources match
ResourceMatch.SUB_RESOURCE_MATCH means compRes is the
sub resource of the origRes
ResourceMatch.SUPER_RESOURCE_MATCH means compRes is the
super resource of the origRes
ResourceMatch.WILDCARD_MATCH means two resources match with
respect to the wildcardpublic java.lang.String append(java.lang.String superResource, java.lang.String subResource)
superRes
- name of the super-resource to be appended tosubRes
- name of the sub-resource to be appendedpublic java.lang.String getSubResource(java.lang.String res, java.lang.String superRes)
res
- name of the original resource consisting of
the second parameter superRes and the returned valuesubRes
- name of the super-resource which the first
parameter begins with.public java.lang.String canonicalize(java.lang.String res) throws PolicyException
res
- the resource string to be canonicalizedPolicyException
- if resource string is invalidpublic java.lang.String[] split(java.lang.String res)
res
- name of the resource to be split
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |