|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nbi.xmlsec.xacml.profile.rbac.RBACPolicyElement nbi.xmlsec.xacml.profile.rbac.RBACPolicy nbi.xmlsec.xacml.profile.rbac.RBACPolicySet nbi.xmlsec.xacml.profile.rbac.RolePolicySet
This class implements a role policy set according to the XACML RBAC Profile.
It stores the permission policy set and may be represented as a
PolicySet
or parsed from a PolicySet
representation.
Field Summary | |
static String |
ATTRIBUTE_ID
|
Fields inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicySet |
REPRESENT_POLICIES_AS_NONE, REPRESENT_POLICIES_AS_POLICY, REPRESENT_POLICIES_AS_POLICYREF |
Fields inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicy |
elements, logger, permitRule |
Fields inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicyElement |
|
Constructor Summary | |
RolePolicySet(PolicySet policySet)
Creates a role policy set from its PolicySet
representation. |
|
RolePolicySet(String domain,
String label)
Creates a role policy set from its identifier. |
|
RolePolicySet(URI id)
Creates a role policy set from its identifier. |
Method Summary | |
boolean |
add(PermissionPolicy element)
Adds the permission policy to the permission policy set of this role policy set. |
boolean |
add(PermissionPolicyIdentifier id,
Permission element)
Adds the permission to the given permission policy of this role policy set. |
Set |
getPermissionPolicies()
|
PermissionPolicySet |
getPermissionPolicySet()
Gets the PermissionPolicySet of this RolePolicySet. |
String |
getRole()
Gets the label of this role from the identifier. |
void |
parse(PolicyTreeElement element)
Parses a role policy set from its PolicySet
representation. |
void |
parse(Target target)
Parses the target of an RolePolicySet. |
boolean |
remove(PermissionPolicy element)
Removes the permission policy to the permission policy set of this role policy set. |
boolean |
remove(PermissionPolicyIdentifier id,
Permission element)
Removes the permission from the given permission policy of this role policy set. |
Permission |
searchPermission(String domain,
String policy,
String label)
Retrieves a permission from an permission policy of the permission policy set from that role. |
PermissionPolicy |
searchPermissionPolicy(String domain,
String label)
Retrieves an permission policy of the permission policy set from that role. |
PermissionPolicySet |
searchPermissionPolicySet(String domain)
Retrieves the permission policy set of this role policy set. |
String |
toString()
|
Methods inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicySet |
encode, getPolicyRepresentationType, parse, setPolicyRepresentationType, toPolicyRerence, toPolicyTreeElement |
Methods inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicy |
add, encode, equals, getElements, isPermitRule, parse, remove, search, search, setPermitRule, toPolicyRerence, toPolicyTreeElement |
Methods inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicyElement |
getIdentifier, getTarget, hashCode, setIdentifier, setIdentifier, setTarget |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String ATTRIBUTE_ID
Constructor Detail |
public RolePolicySet(String domain, String label)
REPRESENT_POLICIES_AS_POLICYREF
.
domain
- Identifier's domain.label
- Identifier's label.public RolePolicySet(URI id) throws ParsingException
REPRESENT_POLICIES_AS_POLICYREF
.
id
- Identifier's URI representation.public RolePolicySet(PolicySet policySet) throws ParsingException
PolicySet
representation. The first policy parsed determines the policy
representation type of the policy set.
policySet
- PolicySet
representation.Method Detail |
public void parse(Target target) throws ParsingException
parse
in class RBACPolicyElement
target
- The target to parse.
ParsingException
- Signals errors during the parsing process.RBACPolicyElement.parse(Target)
public void parse(PolicyTreeElement element) throws ParsingException
PolicySet
representation. The first policy parsed determines the policy
representation type of the policy set.
parse
in class RBACPolicySet
element
- The policy set to parse.
ParsingException
- Indicates errors during the parsing process.public PermissionPolicySet searchPermissionPolicySet(String domain)
domain
- The domain to search for.
null
.RBACPolicy.search(Identifier).
public PermissionPolicy searchPermissionPolicy(String domain, String label)
domain
- The domain to search for.label
- The name of the permission policy to search for.
null
.RBACPolicy.search(Identifier).
public Permission searchPermission(String domain, String policy, String label)
domain
- The domain to search for.policy
- The name of the permission policy to search for.label
- The name of the permission to search for.
null
.RBACPolicy.search(Identifier).
public String getRole()
public boolean add(PermissionPolicy element)
element
- The permission policy to add.
true
, if the element was succesfully added or
successfully updates an existing element, false
otherwise.RBACPolicy.add(RBACPolicyElement)
public boolean remove(PermissionPolicy element)
element
- The permission policy to remove.
true
, if the element was succesfully removed,
false
otherwise.RBACPolicy.add(RBACPolicyElement)
public boolean add(PermissionPolicyIdentifier id, Permission element)
id
- The identifier of the permission policy to add to.element
- The permission to add.
true
, if the element was succesfully added or
successfully updates an existing element, false
otherwise.
ParsingException
RBACPolicy.remove(RBACPolicyElement).
public boolean remove(PermissionPolicyIdentifier id, Permission element)
id
- The identifier of the permission policy to remove from.element
- The permission to remove.
true
, if the element was succesfully added or
successfully updates an existing element, false
otherwise.RBACPolicy.remove(RBACPolicyElement).
public PermissionPolicySet getPermissionPolicySet()
public Set getPermissionPolicies()
public String toString()
toString
in class RBACPolicyElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |