|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.xtreemos.xosd.vops.xacml.utils.VopsPDP
public class VopsPDP
Field Summary | |
---|---|
private com.sun.xacml.PDP |
pdp
|
private static java.lang.String |
POLICY_FILE
|
private static java.lang.String |
REQUEST_FILE
|
Constructor Summary | |
---|---|
VopsPDP()
Default constructor. |
|
VopsPDP(java.lang.String[] policySources)
Constructor that takes an array of strings (policies), each of which contains an XACML policy, and sets up a PDP with access
to these policies only. |
Method Summary | |
---|---|
com.sun.xacml.ctx.ResponseCtx |
evaluate(com.sun.xacml.ctx.RequestCtx request)
|
com.sun.xacml.ctx.ResponseCtx |
evaluateFromFile(java.lang.String requestFile)
Evaluates the given request and returns the Response that the PDP will hand back to the PEP. |
com.sun.xacml.ctx.ResponseCtx |
evaluateFromRequest(com.sun.xacml.ctx.RequestCtx request)
Evaluates the given request and returns the Response that the PDP will hand back to the PEP. |
static void |
main(java.lang.String[] args)
Main-line driver for this sample code. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String REQUEST_FILE
private static final java.lang.String POLICY_FILE
private com.sun.xacml.PDP pdp
Constructor Detail |
---|
public VopsPDP() throws java.lang.Exception
SimplePDP
with a
PDP
based on the configuration defined by the runtime
property com.sun.xcaml.PDPConfigFile.
java.lang.Exception
public VopsPDP(java.lang.String[] policySources) throws java.lang.Exception
PDP
with access
to these policies only. The PDP
is configured
programatically to have only a few specific modules.
policyFiles
- an array of filenames that specify policies
java.lang.Exception
Method Detail |
---|
public com.sun.xacml.ctx.ResponseCtx evaluateFromFile(java.lang.String requestFile) throws java.io.IOException, com.sun.xacml.ParsingException
requestFile
- the name of a file that contains a Request
java.io.IOException
- if there is a problem accessing the file
com.sun.xacml.ParsingException
- if the Request is invalidpublic com.sun.xacml.ctx.ResponseCtx evaluateFromRequest(com.sun.xacml.ctx.RequestCtx request) throws java.io.IOException, com.sun.xacml.ParsingException
requestFile
- the name of a file that contains a Request
java.io.IOException
- if there is a problem accessing the file
com.sun.xacml.ParsingException
- if the Request is invalidpublic com.sun.xacml.ctx.ResponseCtx evaluate(com.sun.xacml.ctx.RequestCtx request)
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- the input arguments to the class. They are either the
flag "-config" followed by a request file, or a request
file followed by one or more policy files. In the case
that the configuration flag is used, the configuration
file must be specified in the standard java property,
com.sun.xacml.PDPConfigFile.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |