[jboss-cvs] JBossAS SVN: r71491 - projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/authorization.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Mar 31 13:59:36 EDT 2008


Author: anil.saldhana at jboss.com
Date: 2008-03-31 13:59:36 -0400 (Mon, 31 Mar 2008)
New Revision: 71491

Modified:
   projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/authorization/PolicyRegistration.java
Log:
SECURITY-122: PolicyRegistration considers type of policy as well as a new method to consider config files that list policy locations

Modified: projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/authorization/PolicyRegistration.java
===================================================================
--- projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/authorization/PolicyRegistration.java	2008-03-31 16:54:30 UTC (rev 71490)
+++ projects/security/security-spi/trunk/authorization/src/main/org/jboss/security/authorization/PolicyRegistration.java	2008-03-31 17:59:36 UTC (rev 71491)
@@ -36,32 +36,64 @@
 public interface PolicyRegistration
 {
    /**
+    * Represents an xacml policy
+    */
+   String XACML = "XACML";
+   
+   /**
+    * Represents a JACC policy
+    */
+   String JACC = "JACC";
+   
+   /**
+    * Represents a ACL policy
+    */
+   String ACL = "ACL";
+
+   /**
+    * Represents a Custom policy
+    */
+   String CUSTOM = "CUSTOM";
+   
+   /**
     * Register a policy given the location and a context id
-    * @param contextID
+    * @param contextID an unique id representing the context
+    * @param type type of policy
     * @param location location of the Policy File
     */
-   void registerPolicy(String contextID, URL location);
+   void registerPolicy(String contextID, String type, URL location);
    
    /**
     * 
     * Register a policy given a xml based stream and a context id
     * 
-    * @param contextID
+    * @param contextID an unique id representing the context
+    * @param type type of policy
     * @param stream InputStream that is an XML stream
     */
-   void registerPolicy(String contextID, InputStream stream);
+   void registerPolicy(String contextID, String type, InputStream stream);
    
    /**
+    * Register a policy config file (that lists locations of policies)
+    * @param contextId an unique id representing the context
+    * @param type type of policy
+    * @param stream xml stream
+    */
+   void registerPolicyConfigFile(String contextId, String type, InputStream stream);
+   
+   /**
     * Unregister a policy  
     * @param contextID Context ID
+    * @param type the type of policy
     */
-   void deRegisterPolicy(String contextID); 
+   void deRegisterPolicy(String contextID, String type); 
    
    /**
     * Obtain the registered policy for the context id
     * @param contextID Context ID
+    * @param type the type of policy (xacml, jacc, custom etc)
     * @param contextMap A map that can be used by the implementation
     *           to determine the policy choice (typically null)
     */
-   Object getPolicy(String contextID, Map<String,Object> contextMap);
-}
+   <T> T getPolicy(String contextID, String type, Map<String,Object> contextMap);
+}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list