|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.xtreemos.xosd.vops.xacml.utils.SamplePolicyBuilder
public class SamplePolicyBuilder
This is an example program that shows how to build and generate an XACML Policy. This doesn't show all the available features, but it provides a good sample of commonly used functionality. Note that there's a fair amount of duplicate code in this class, since verbosity (in this case) makes the code a little easier to understand. An equivalent Polict to that generated here is found in the policy directory as generated.xml. The generated request can be used with this policy.
Constructor Summary | |
---|---|
SamplePolicyBuilder()
|
Method Summary | |
---|---|
static com.sun.xacml.Target |
createPolicyTarget()
Creates the Target used in the Policy. |
static com.sun.xacml.Rule |
createRule()
Creates the Rule used in the Policy. |
static com.sun.xacml.cond.Apply |
createRuleCondition()
Creates the Condition used in the Rule. |
static com.sun.xacml.Target |
createRuleTarget()
Creates the Target used in the Condition. |
static com.sun.xacml.TargetMatch |
createTargetMatch(int type,
java.lang.String functionId,
com.sun.xacml.attr.AttributeDesignator designator,
com.sun.xacml.attr.AttributeValue value)
Simple helper routine that creates a TargetMatch instance. |
static void |
main(java.lang.String[] args)
Command-line routine that bundles together all the information needed to create a Policy and then encodes the Policy, printing to standard out. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SamplePolicyBuilder()
Method Detail |
---|
public static com.sun.xacml.TargetMatch createTargetMatch(int type, java.lang.String functionId, com.sun.xacml.attr.AttributeDesignator designator, com.sun.xacml.attr.AttributeValue value)
type
- the type of matchfunctionId
- the matching function identifierdesignator
- the AttributeDesignator used in this matchvalue
- the AttributeValue used in this match
public static com.sun.xacml.Target createPolicyTarget() throws java.net.URISyntaxException
java.net.URISyntaxException
- if there is a problem with any of the URIspublic static com.sun.xacml.Target createRuleTarget() throws java.net.URISyntaxException
java.net.URISyntaxException
- if there is a problem with any of the URIspublic static com.sun.xacml.cond.Apply createRuleCondition() throws java.net.URISyntaxException
java.net.URISyntaxException
- if there is a problem with any of the URIspublic static com.sun.xacml.Rule createRule() throws java.net.URISyntaxException
java.net.URISyntaxException
- if there is a problem with any of the URIspublic static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |