|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.xacml.finder.PolicyFinderModule nbi.xmlsec.xacml.profile.rbac.finder.RBACPolicyFinderModule
Implementation of the standard policy finder module for the RBAC profile.
Field Summary | |
protected Configuration |
configuration
Configuration part PolicyFinderModule for this module |
private static Logger |
logger
|
protected Set |
policies
The policy store of this policy Finder |
protected PolicyFinder |
policyFinder
PolicyFinder initialised with this module |
Constructor Summary | |
RBACPolicyFinderModule(Configuration config)
|
Method Summary | |
protected PolicyFinderResult |
createErrorResult(String code,
String message)
Creates a PolicyFinderResult instance with a
single code and message. |
PolicyFinderResult |
findPolicy(EvaluationCtx context)
Simply copied from FilePolicyModule.findPolicy(EvaluationCtx) . |
PolicyFinderResult |
findPolicy(URI idReference,
int type)
Tries to find a policy based on the Identifier built
from the idReference parameter. |
String |
getDomain()
Retrieves the domain from the current configuration. |
static IOFileFilter |
getFileFilter(Configuration config,
IOFileFilter defaultFilter)
Retrieves a FileFilter bases on the file suffixes in the configuration. |
String |
getPolicyBaseDir()
Retrieves the policy base directory from the current configuration. |
IOFileFilter |
getPolicyFileFilter()
Retrieves a FileFilter bases on the file suffixes of the configuration. |
void |
init(PolicyFinder finder)
Inits this PolicyFinder loading all policy files with the given file suffixes from all subdirectories of the policy base dir. |
boolean |
isIdReferenceSupported()
Signals that this policy finder module supports policy references. |
boolean |
isRequestSupported()
Signals that this policy finder module supports request. |
static List |
loadPolicies(File policyDir,
IOFileFilter filter,
PolicyFinder finder)
Loads policies from a given directory. |
void |
setDomain(String domain)
Sets the domain in the current configuration. |
void |
setPolicyBaseDir(String policyBaseDir)
Sets the policy base directory in the current configuration. |
Methods inherited from class com.sun.xacml.finder.PolicyFinderModule |
getIdentifier, invalidateCache |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final Logger logger
protected PolicyFinder policyFinder
protected Configuration configuration
PolicyFinderModule
for this module
protected Set policies
Constructor Detail |
public RBACPolicyFinderModule(Configuration config)
config
- Configuration of the type PolicyFinderModule
for this module.Method Detail |
public static List loadPolicies(File policyDir, IOFileFilter filter, PolicyFinder finder)
loadPolicy(String, PolicyFinder)
returns null
.
policyDir
- The directory to search for policies.filter
- The IOFileFilter
to select policy files.finder
- The PolicyFinder
to find policies.
public static IOFileFilter getFileFilter(Configuration config, IOFileFilter defaultFilter)
SuffixFileFilter
, if suffixes are
configured, otherwise TrueFileFilter
.public void init(PolicyFinder finder)
PolicyFinderModule.init(PolicyFinder)
public PolicyFinderResult findPolicy(EvaluationCtx context)
FilePolicyModule.findPolicy(EvaluationCtx)
.
FilePolicyModule.findPolicy(EvaluationCtx)
public boolean isRequestSupported()
PolicyFinderModule.isIdReferenceSupported()
protected PolicyFinderResult createErrorResult(String code, String message)
PolicyFinderResult
instance with a
single code and message.
code
- The status code string (see
Status
.message
- The error message.
PolicyFinderResult
with
Status
.public PolicyFinderResult findPolicy(URI idReference, int type)
Identifier
built
from the idReference
parameter. Errors are documentated in
the Status of the PolicyFinderResult
return
value.
PolicyFinderModule.findPolicy(URI, int)
public boolean isIdReferenceSupported()
PolicyFinderModule.isIdReferenceSupported()
public String getPolicyBaseDir()
public void setPolicyBaseDir(String policyBaseDir)
policyBaseDir
- The base directory for all policies.public String getDomain()
public void setDomain(String domain)
domain
- The domain label for all policies to find.public IOFileFilter getPolicyFileFilter()
SuffixFileFilter
, if suffixes are
configured, otherwise TrueFileFilter
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |