|
||||||||||
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.PermissionPolicy
This class implements a permission policy according to the XACML RBAC
Profile. It manages permissions, which may be represented as a
Policy
or parsed from a Policy
representation.
Field Summary | |
(package private) static Logger |
logger
|
Fields inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicy |
elements, permitRule |
Fields inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicyElement |
|
Constructor Summary | |
PermissionPolicy(Policy policy)
Create an permission policy instance from its Policy
representation. |
|
PermissionPolicy(PolicyReference policy)
Create an permission policy instance from its PolicyPolicyReference representation. |
|
PermissionPolicy(String domain,
String label)
Creates permission policy with its identifier. |
|
PermissionPolicy(URI id)
Creates permission policy with its identifier. |
Method Summary | |
boolean |
add(RBACPolicyElement element)
If the element is an Permission , the element is added
to the set of elements. |
Set |
getPermissions()
Gets the permissions of this role. |
void |
parse(PolicyTreeElement element)
Parses a role assignment policy from its Policy
representation. |
void |
parse(Target target)
Parses the target of an PermissionPolicySet. |
boolean |
remove(RBACPolicyElement element)
If the element is an Permission , the element is
removed from the set of elements. |
Permission |
searchPermission(String permLabel)
Searches a Permission within this PermissionPolicy. |
PolicyReference |
toPolicyReference()
Returns the PolicyRefence to this the role
assignment policy. |
PolicyTreeElement |
toPolicyTreeElement()
Returns the Policy representation of the role assignment
policy. |
String |
toString()
|
Methods inherited from class nbi.xmlsec.xacml.profile.rbac.RBACPolicy |
encode, encode, equals, getElements, isPermitRule, parse, search, search, setPermitRule, toPolicyRerence, 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 |
static Logger logger
Constructor Detail |
public PermissionPolicy(String domain, String label)
domain
- Identifier's domain.label
- Identifier's label.public PermissionPolicy(URI id) throws ParsingException
id
- Identifier's URI representation.public PermissionPolicy(Policy policy) throws ParsingException
Policy
representation.
policy
- Policy
representation.public PermissionPolicy(PolicyReference policy) throws ParsingException
PolicyPolicyReference
representation.
policy
- Policy
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(com.sun.xacml.Target)
public void parse(PolicyTreeElement element) throws ParsingException
Policy
representation.
parse
in class RBACPolicy
element
- The policy to parse.
ParsingException
- Indicates a malformed Policy
representation.public PolicyTreeElement toPolicyTreeElement()
Policy
representation of the role assignment
policy.
toPolicyTreeElement
in class RBACPolicy
Policy
representation.RBACPolicyElement.toPolicyTreeElement()
public PolicyReference toPolicyReference()
PolicyRefence
to this the role
assignment policy.
PolicyReference
.public boolean add(RBACPolicyElement element)
Permission
, the element is added
to the set of elements.
add
in class RBACPolicy
element
- The element to be added.
true
, if the permission was succesfully added,
false
otherwise.RBACPolicy.add(RBACPolicyElement)
public boolean remove(RBACPolicyElement element)
Permission
, the element is
removed from the set of elements.
remove
in class RBACPolicy
element
- The element to remove.
true
, if the permission was succesfully removed,
false
otherwise.RBACPolicy.remove(RBACPolicyElement)
public Permission searchPermission(String permLabel)
permLabel
- Label of the Permission to search for
public Set getPermissions()
public String toString()
toString
in class RBACPolicyElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |