|
||||||||||
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
Base class for all RBACPolicySets.
Field Summary | |
private int |
policyRepresentationType
The policy representation type. |
static int |
REPRESENT_POLICIES_AS_NONE
Policy Representation Unknown. |
static int |
REPRESENT_POLICIES_AS_POLICY
Policy Representation Policy. |
static int |
REPRESENT_POLICIES_AS_POLICYREF
Policy Representation Policy Reference. |
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 | |
protected |
RBACPolicySet()
|
|
RBACPolicySet(Identifier id,
int type)
Create an RBACPolicyElement. |
|
RBACPolicySet(URI id,
int type)
Create an RBACPolicySet. |
Method Summary | |
void |
encode(File path)
Encodes this PolicySet and all included RBACPolicy or RBACPolicySet elements into its XML representation and writes them to the file path using the path parameter as parent directory and the
identifier's file representation as file name. |
int |
getPolicyRepresentationType()
Gets the policyRepresentationType |
void |
parse(PolicyTreeElement element)
Not implemented. |
protected void |
parse(PolicyTreeElement element,
Class policyClass,
Class policyReferenceClass,
Class policySetClass)
Default method to parse policy sets. |
void |
setPolicyRepresentationType(int policyRepresentationType)
Sets policyRepresentationType |
PolicyReference |
toPolicyRerence()
Returns the PolicyReference representation of
this policy set. |
PolicyTreeElement |
toPolicyTreeElement()
Default method to generate the PolicySet representation
of this RBACPolicySet. |
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, parse, setIdentifier, setIdentifier, setTarget, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int REPRESENT_POLICIES_AS_NONE
public static final int REPRESENT_POLICIES_AS_POLICYREF
public static final int REPRESENT_POLICIES_AS_POLICY
private int policyRepresentationType
Constructor Detail |
protected RBACPolicySet()
public RBACPolicySet(URI id, int type) throws ParsingException
id
- Identifier of this element (domain:assignment:label).type
- Type of the policyRepresentation
REPRESENT_POLICIES_AS_POLICYREF
or
REPRESENT_POLICIES_AS_POLICY
.
ParsingException
- Indicates a malformed identifier representation.public RBACPolicySet(Identifier id, int type)
id
- Identifier of this element (domain:assignment:label).type
- Type of the policyRepresentation
REPRESENT_POLICIES_AS_POLICYREF
or
REPRESENT_POLICIES_AS_POLICY
.Method Detail |
protected void parse(PolicyTreeElement element, Class policyClass, Class policyReferenceClass, Class policySetClass) throws ParsingException
parse(Target)
.Policy
,PolicyReference
or
PolicySet
, .policyClass
,
policyReferenceClass
or policySetClass
) is
created with the child element as single parameter. This instance is
added to the set of policy elements. If the related class parameter is
null
, then a ParsingException
is
thrown when the related child element type is parsed.
element
- The policy set to parse.policyClass
- Class to be instantiated for child elements instances of the
(@link Policy Policy} class.policyReferenceClass
- Class to be instantiated for child elements instances of the
(@link PolicyReference PolicyReference} class.policySetClass
- Class to be instantiated for child elements instances of the
(@link PolicySet PolicySet} class.
ParsingException
- If some parsing error occurs.public void parse(PolicyTreeElement element) throws ParsingException
parse
in class RBACPolicy
ParsingException
public PolicyTreeElement toPolicyTreeElement()
PolicySet
representation
of this RBACPolicySet. Set the policy algorithm to
PermitOverridesPolicyAlg
. For each
element of the policy set, adds the policy reference or policy
representation of the element to the policy set. The representation type
for policies is set according to the policy representation type. Policy
sets are represented as policy references.
toPolicyTreeElement
in class RBACPolicy
PolicySet
representation.RBACPolicyElement.toPolicyTreeElement()
public PolicyReference toPolicyRerence()
PolicyReference
representation of
this policy set. The default type of the policy reference is set to
PolicyReference.POLICYSET_REFERENCE
).
toPolicyRerence
in class RBACPolicy
PolicyReference
representation with type set to PolicyReference.POLICY_REFERENCE
).public void encode(File path) throws IOException
path
parameter as parent directory and the
identifier's file representation as file name. Creates directories if
missing.
encode
in class RBACPolicy
path
- Base directory path to the policies.
IOException
public int getPolicyRepresentationType()
public void setPolicyRepresentationType(int policyRepresentationType)
policyRepresentationType
- The policyRepresentationType to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |