public class URLPolicyFinderModule extends PolicyFinderModule
This module is provided as an example, but is still fully functional, and
should be useful for many simple applications. This is provided in the
support
package rather than the core codebase because it
implements non-standard behavior.
Constructor and Description |
---|
URLPolicyFinderModule()
Creates a
URLPolicyFinderModule . |
URLPolicyFinderModule(String schemaFile)
Creates a
URLPolicyFinderModule that may do schema
validation of policies. |
Modifier and Type | Method and Description |
---|---|
PolicyFinderResult |
findPolicy(URI idReference,
int type,
VersionConstraints constraints,
PolicyMetaData parentMetaData)
Attempts to find a policy by reference, based on the provided
parameters.
|
void |
init(PolicyFinder finder)
Initialize this module.
|
boolean |
isIdReferenceSupported()
Always returns
true since this module does support
finding policies based on reference. |
findPolicy, getIdentifier, invalidateCache, isRequestSupported
public URLPolicyFinderModule()
URLPolicyFinderModule
. The schema file used
to validate policies is specified by the property
PolicyReader.POLICY_SCHEMA_PROPERTY
. If the retrieved
property is null, then no schema validation will occur.public URLPolicyFinderModule(String schemaFile)
URLPolicyFinderModule
that may do schema
validation of policies.schemaFile
- the schema file to use for validation, or null if
validation isn't desiredpublic boolean isIdReferenceSupported()
true
since this module does support
finding policies based on reference.isIdReferenceSupported
in class PolicyFinderModule
public void init(PolicyFinder finder)
PolicyFinder
when a PDP is created.init
in class PolicyFinderModule
finder
- the PolicyFinder
using this modulepublic PolicyFinderResult findPolicy(URI idReference, int type, VersionConstraints constraints, PolicyMetaData parentMetaData)
findPolicy
in class PolicyFinderModule
idReference
- an identifier specifying some policytype
- type of reference (policy or policySet) as identified by
the fields in PolicyReference
constraints
- any optional constraints on the version of the
referenced policy (this will never be null, but
it may impose no constraints, and in fact will
never impose constraints when used from a pre-2.0
XACML policy)parentMetaData
- the meta-data from the parent policy, which
provides XACML version, factories, etc.Copyright © 2023 JBoss by Red Hat. All rights reserved.