| 
SunTM's XACML Implementation for JavaTM | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xacml.finder.PolicyFinderModule
com.sun.xacml.finder.impl.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.
Note: this module is provided only as an example and for testing purposes. It is not part of the standard, and it should not be relied upon for production systems. In the future, this will likely be moved into a package with other similar example and testing code.
| Field Summary | |
static String | 
JAXP_SCHEMA_LANGUAGE
 | 
static String | 
JAXP_SCHEMA_SOURCE
 | 
static String | 
POLICY_SCHEMA_PROPERTY
The property which is used to specify the schema file to validate against (if any)  | 
static String | 
W3C_XML_SCHEMA
 | 
| Constructor Summary | |
FilePolicyModule()
Constructor which retrieves the schema file to validate policies against from the POLICY_SCHEMA_PROPERTY.  | 
|
FilePolicyModule(File schemaFile)
Constructor that uses the specified input as the schema file to validate policies against.  | 
|
FilePolicyModule(List fileNames)
Constructor that specifies a set of initial policy files to use.  | 
|
| Method Summary | |
 boolean | 
addPolicy(String filename)
Adds a file (containing a policy) to the collection of filenames associated with this module.  | 
 void | 
error(SAXParseException exception)
Standard handler routine for the XML parsing.  | 
 void | 
fatalError(SAXParseException exception)
Standard handler routine for the XML parsing.  | 
 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).  | 
static AbstractPolicy | 
loadPolicy(String filename,
           PolicyFinder finder)
Loads a policy from the specified filename and uses the specified PolicyFinder to help with instantiating PolicySets. | 
static AbstractPolicy | 
loadPolicy(String filename,
           PolicyFinder finder,
           File schemaFile,
           ErrorHandler handler)
Loads a policy from the specified filename, using the specified PolicyFinder to help with instantiating PolicySets,
 and using the specified input as the schema file to validate
 policies against. | 
 void | 
warning(SAXParseException exception)
Standard handler routine for the XML parsing.  | 
| Methods inherited from class com.sun.xacml.finder.PolicyFinderModule | 
findPolicy, getIdentifier, invalidateCache, isIdReferenceSupported | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final String POLICY_SCHEMA_PROPERTY
public static final String JAXP_SCHEMA_LANGUAGE
public static final String W3C_XML_SCHEMA
public static final String JAXP_SCHEMA_SOURCE
| Constructor Detail | 
public FilePolicyModule()
public FilePolicyModule(File schemaFile)
schemaFile - the schema file to validate policies against,
                   or null if schema validation is not desired.public FilePolicyModule(List fileNames)
fileNames - a List of Strings that
                  identify policy files| Method Detail | 
public boolean isRequestSupported()
isRequestSupported in class PolicyFinderModulepublic 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 PolicyFinderModulefinder - a PolicyFinder used to help in instantiating PolicySetspublic boolean addPolicy(String filename)
filename - the file to add to this module's collection of files
public static AbstractPolicy loadPolicy(String filename,
                                        PolicyFinder finder)
PolicyFinder to help with instantiating PolicySets.
filename - the file to load the policy fromfinder - a PolicyFinder used to help in instantiating PolicySets
public static AbstractPolicy loadPolicy(String filename,
                                        PolicyFinder finder,
                                        File schemaFile,
                                        ErrorHandler handler)
PolicyFinder to help with instantiating PolicySets,
 and using the specified input as the schema file to validate
 policies against. If schema validation is not desired, a null
 value should be used for schemaFile
filename - the file to load the policy fromfinder - a PolicyFinder used to help in instantiating PolicySetsschemaFile - the schema file to validate policies against, or
                   null if schema validation is not desiredhandler - an error handler used to print warnings and errors
                during parsing
public PolicyFinderResult findPolicy(EvaluationCtx context)
findPolicy in class PolicyFinderModulecontext - the representation of the request data
public void warning(SAXParseException exception)
             throws SAXException
warning in interface ErrorHandlerexception - information on what caused the problem
SAXException
public void error(SAXParseException exception)
           throws SAXException
error in interface ErrorHandlerexception - information on what caused the problem
SAXException - always to halt parsing on errors
public void fatalError(SAXParseException exception)
                throws SAXException
fatalError in interface ErrorHandlerexception - information on what caused the problem
SAXException - always to halt parsing on errors
  | 
Sun's XACML Implementation Version 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.