|
JBoss port of sunxacml 2.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.security.xacml.sunxacml.finder.PolicyFinderModule
org.jboss.security.xacml.sunxacml.support.finder.FilePolicyModule
public class FilePolicyModule
This module represents a collection of files containing polices, each of which will be searched through when trying to find a policy that is applicable to a specific request. It does not support policy references.
Note that this class used to be provided in the
com.sun.xacml.finder.impl
package with a warning that it
would move out of the core packages eventually. This is partly because
this class doesn't represent standard functionality, and partly because
it isn't designed to be generally useful as anything more than an
example. Because so many people have used this class, however, it stayed
in place until the 2.0 release.
As of the 2.0 release, you may still use this class (in its new location),
but you are encouraged to migrate to the new support modules that are
much richer and designed for general-purpose use. Also, note that the
loadPolicy
methods that used to be available from this class
have been removed. That functionality has been replaced by the much more
useful PolicyReader
class. If you need to load policies
directly, you should consider that new class.
Constructor Summary | |
---|---|
FilePolicyModule()
Constructor which retrieves the schema file to validate policies against from the PolicyReader.POLICY_SCHEMA_PROPERTY . |
|
FilePolicyModule(File schemaFile)
Constructor that uses the specified File as the schema
file for XML validation. |
|
FilePolicyModule(List fileNames)
Constructor that specifies a set of initial policy files to use. |
|
FilePolicyModule(List fileNames,
String schemaFile)
Constructor that specifies a set of initial policy files to use and the schema file used to validate the policies. |
|
FilePolicyModule(String schemaFile)
Constructor that uses the specified String as the schema
file for XML validation. |
Method Summary | |
---|---|
boolean |
addPolicy(String filename)
Adds a file (containing a policy) to the collection of filenames associated with this module. |
PolicyFinderResult |
findPolicy(EvaluationCtx context)
Finds a policy based on a request's context. |
void |
init(PolicyFinder finder)
Initializes the FilePolicyModule by loading
the policies contained in the collection of files associated
with this module. |
boolean |
isRequestSupported()
Indicates whether this module supports finding policies based on a request (target matching). |
Methods inherited from class org.jboss.security.xacml.sunxacml.finder.PolicyFinderModule |
---|
findPolicy, getIdentifier, invalidateCache, isIdReferenceSupported |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilePolicyModule()
PolicyReader.POLICY_SCHEMA_PROPERTY
. If the
retrieved property is null, then no schema validation will occur.
public FilePolicyModule(File schemaFile)
File
as the schema
file for XML validation. If schema validation is not desired, a null
value should be used.
schemaFile
- the schema file to validate policies against,
or null if schema validation is not desired.public FilePolicyModule(String schemaFile)
String
as the schema
file for XML validation. If schema validation is not desired, a null
value should be used.
schemaFile
- the schema file to validate policies against,
or null if schema validation is not desired.public FilePolicyModule(List fileNames)
PolicyReader.POLICY_SCHEMA_PROPERTY
. If the retrieved
property is null, then no schema validation will occur.
fileNames
- a List
of String
s that
identify policy filespublic FilePolicyModule(List fileNames, String schemaFile)
fileNames
- a List
of String
s that
identify policy filesschemaFile
- the schema file to validate policies against,
or null if schema validation is not desired.Method Detail |
---|
public boolean addPolicy(String filename)
init
method (which
is called automatically by the PolicyFinder
when the
system comes up).
filename
- the file to add to this module's collection of filespublic boolean isRequestSupported()
isRequestSupported
in class PolicyFinderModule
public void init(PolicyFinder finder)
FilePolicyModule
by loading
the policies contained in the collection of files associated
with this module. This method also uses the specified
PolicyFinder
to help in instantiating PolicySets.
init
in class PolicyFinderModule
finder
- a PolicyFinder used to help in instantiating PolicySetspublic PolicyFinderResult findPolicy(EvaluationCtx context)
findPolicy
in class PolicyFinderModule
context
- the representation of the request data
|
JBoss port of sunxacml 2.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |