Update of /cvsroot/sunxacml/sunxacml/com/sun/xacml/finder
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25674/com/sun/xacml/finder
Modified Files:
AttributeFinderModule.java PolicyFinderModule.java
ResourceFinderModule.java
Log Message:
added a few new management methods
Index: ResourceFinderModule.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/finder/ResourceFinderModule.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ResourceFinderModule.java 30 Apr 2004 17:56:43 -0000 1.3
--- ResourceFinderModule.java 17 May 2004 20:34:37 -0000 1.4
***************
*** 55,58 ****
--- 55,71 ----
/**
+ * Returns this module's identifier. A module does not need to provide
+ * a unique identifier, but it is a good idea, especially in support of
+ * management software. Common identifiers would be the full package
+ * and class name (the default if this method isn't overridden), just the
+ * class name, or some other well-known string that identifies this class.
+ *
+ * @return this module's identifier
+ */
+ public String getIdentifier() {
+ return getClass().getName();
+ }
+
+ /**
* Returns true if this module supports finding resources with the
* "Children" scope. By default this method returns false.
***************
*** 75,78 ****
--- 88,113 ----
/**
+ * This is an experimental method that asks the module to invalidate any
+ * cache values it may contain. This is not used by any of the core
+ * processing code, but it may be used by management software that wants
+ * to have some control over these modules. Since a module is free to
+ * decide how or if it caches values, and whether it is capable of
+ * updating values once in a cache, a module is free to intrepret this
+ * message in any way it sees fit (including igoring the message). It
+ * is preferable, however, for a module to make every effort to clear
+ * any dynamically cached values it contains.
+ * <p>
+ * This method has been introduced to see what people think of this
+ * functionality, and how they would like to use it. It may be removed
+ * in future versions, or it may be changed to a more general
+ * message-passing system (if other useful messages are identified).
+ *
+ * @since 1.2
+ */
+ public void invalidateCache() {
+
+ }
+
+ /**
* Tries to find the child Resource Ids associated with the parent. If
* this module cannot handle the given identifier, then an empty result is
Index: AttributeFinderModule.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/finder/AttributeFinderModule.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AttributeFinderModule.java 12 May 2004 21:26:23 -0000 1.4
--- AttributeFinderModule.java 17 May 2004 20:34:37 -0000 1.5
***************
*** 63,66 ****
--- 63,79 ----
/**
+ * Returns this module's identifier. A module does not need to provide
+ * a unique identifier, but it is a good idea, especially in support of
+ * management software. Common identifiers would be the full package
+ * and class name (the default if this method isn't overridden), just the
+ * class name, or some other well-known string that identifies this class.
+ *
+ * @return this module's identifier
+ */
+ public String getIdentifier() {
+ return getClass().getName();
+ }
+
+ /**
* Returns true if this module supports retrieving attributes based on the
* data provided in an AttributeDesignatorType. By default this method
***************
*** 112,115 ****
--- 125,150 ----
/**
+ * This is an experimental method that asks the module to invalidate any
+ * cache values it may contain. This is not used by any of the core
+ * processing code, but it may be used by management software that wants
+ * to have some control over these modules. Since a module is free to
+ * decide how or if it caches values, and whether it is capable of
+ * updating values once in a cache, a module is free to intrepret this
+ * message in any way it sees fit (including igoring the message). It
+ * is preferable, however, for a module to make every effort to clear
+ * any dynamically cached values it contains.
+ * <p>
+ * This method has been introduced to see what people think of this
+ * functionality, and how they would like to use it. It may be removed
+ * in future versions, or it may be changed to a more general
+ * message-passing system (if other useful messages are identified).
+ *
+ * @since 1.2
+ */
+ public void invalidateCache() {
+
+ }
+
+ /**
* Tries to find attribute values based on the given designator data.
* The result, if successful, must always contain a
Index: PolicyFinderModule.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/finder/PolicyFinderModule.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PolicyFinderModule.java 17 Mar 2004 18:03:39 -0000 1.2
--- PolicyFinderModule.java 17 May 2004 20:34:37 -0000 1.3
***************
*** 55,58 ****
--- 55,71 ----
/**
+ * Returns this module's identifier. A module does not need to provide
+ * a unique identifier, but it is a good idea, especially in support of
+ * management software. Common identifiers would be the full package
+ * and class name (the default if this method isn't overridden), just the
+ * class name, or some other well-known string that identifies this class.
+ *
+ * @return this module's identifier
+ */
+ public String getIdentifier() {
+ return getClass().getName();
+ }
+
+ /**
* Returns true if the module supports finding policies based on a
* request (ie, target matching). By default this method returns false.
***************
*** 75,83 ****
--- 88,128 ----
/**
+ * Initializes this module for use by the given finder. Typically this
+ * is called when a <code>PDP</code> is initialized with a
+ * <code>PDPConfig</code> containing the given <code>PolicyFinder</code>.
+ * Because <code>PolicyFinderModule</code>s usually need to parse
+ * policies, and this requires knowing their <code>PolicyFinder<code>,
+ * parsing is usually done at or after this point in the lifetime
+ * of this module. This might also be a good time to reset any internal
+ * caches or temporary data. Note that this method may be called more
+ * than once in the lifetime of a module.
*
+ * @param finder the <code>PolicyFinder</code> using this module
*/
public abstract void init(PolicyFinder finder);
/**
+ * This is an experimental method that asks the module to invalidate any
+ * cache values it may contain. This is not used by any of the core
+ * processing code, but it may be used by management software that wants
+ * to have some control over these modules. Since a module is free to
+ * decide how or if it caches values, and whether it is capable of
+ * updating values once in a cache, a module is free to intrepret this
+ * message in any way it sees fit (including igoring the message). It
+ * is preferable, however, for a module to make every effort to clear
+ * any dynamically cached values it contains.
+ * <p>
+ * This method has been introduced to see what people think of this
+ * functionality, and how they would like to use it. It may be removed
+ * in future versions, or it may be changed to a more general
+ * message-passing system (if other useful messages are identified).
+ *
+ * @since 1.2
+ */
+ public void invalidateCache() {
+
+ }
+
+ /**
* Tries to find one and only one matching policy given the request
* represented by the context data. If more than one policy is found,
|