[jboss-cvs] jbosssx/src/main/org/jboss/security/authorization/modules ...

Anil Saldhana anil.saldhana at jboss.com
Tue Jul 25 23:35:54 EDT 2006


  User: asaldhana
  Date: 06/07/25 23:35:53

  Modified:    src/main/org/jboss/security/authorization/modules    
                        AbstractAuthorizationModule.java
                        XACMLAuthorizationModule.java
  Added:       src/main/org/jboss/security/authorization/modules    
                        AuthorizationModuleDelegate.java
  Removed:     src/main/org/jboss/security/authorization/modules    
                        AuthorizationModuleHelper.java
  Log:
  JBAS-3324: Be consistent in naming of delegates
  
  Revision  Changes    Path
  1.5       +5 -5      jbosssx/src/main/org/jboss/security/authorization/modules/AbstractAuthorizationModule.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: AbstractAuthorizationModule.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/authorization/modules/AbstractAuthorizationModule.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- AbstractAuthorizationModule.java	19 Jul 2006 18:25:02 -0000	1.4
  +++ AbstractAuthorizationModule.java	26 Jul 2006 03:35:53 -0000	1.5
  @@ -34,13 +34,13 @@
   import org.jboss.security.authorization.AuthorizationModule;
   import org.jboss.security.authorization.Resource;
   
  -//$Id: AbstractAuthorizationModule.java,v 1.4 2006/07/19 18:25:02 asaldhana Exp $
  +//$Id: AbstractAuthorizationModule.java,v 1.5 2006/07/26 03:35:53 asaldhana Exp $
   
   /**
    *  Abstraction of Authorization Module
    *  @author <a href="mailto:Anil.Saldhana at jboss.org">Anil Saldhana</a>
    *  @since  Jun 14, 2006 
  - *  @version $Revision: 1.4 $
  + *  @version $Revision: 1.5 $
    */
   public abstract class AbstractAuthorizationModule implements AuthorizationModule
   {
  @@ -129,7 +129,7 @@
         String delegateStr = (String)delegateMap.get(layer);
         if(delegateStr == null)
            throw new IllegalStateException("Delegate is missing for layer="+layer);
  -      AuthorizationModuleHelper delegate = null;
  +      AuthorizationModuleDelegate delegate = null;
         try
         {
            delegate = getDelegate(delegateStr); 
  @@ -151,12 +151,12 @@
       * @return Delegate Instance
       * @throws Exception
       */
  -   protected AuthorizationModuleHelper getDelegate(String delegateStr) 
  +   protected AuthorizationModuleDelegate getDelegate(String delegateStr) 
      throws Exception
      {
         ClassLoader tcl = Thread.currentThread().getContextClassLoader();
         Class clazz = tcl.loadClass(delegateStr);
  -      return (AuthorizationModuleHelper)clazz.newInstance();
  +      return (AuthorizationModuleDelegate)clazz.newInstance();
      }
      
      /**
  
  
  
  1.7       +4 -4      jbosssx/src/main/org/jboss/security/authorization/modules/XACMLAuthorizationModule.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: XACMLAuthorizationModule.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/authorization/modules/XACMLAuthorizationModule.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- XACMLAuthorizationModule.java	19 Jul 2006 18:25:02 -0000	1.6
  +++ XACMLAuthorizationModule.java	26 Jul 2006 03:35:53 -0000	1.7
  @@ -25,13 +25,13 @@
   import org.jboss.security.authorization.AuthorizationModule;
   import org.jboss.security.authorization.Resource; 
   
  -//$Id: XACMLAuthorizationModule.java,v 1.6 2006/07/19 18:25:02 asaldhana Exp $
  +//$Id: XACMLAuthorizationModule.java,v 1.7 2006/07/26 03:35:53 asaldhana Exp $
   
   /**
    *  Authorization Module that utilizes XACML
    *  @author <a href="mailto:Anil.Saldhana at jboss.org">Anil Saldhana</a>
    *  @since  Jun 11, 2006 
  - *  @version $Revision: 1.6 $
  + *  @version $Revision: 1.7 $
    */
   public class XACMLAuthorizationModule extends AbstractAuthorizationModule
   { 
  @@ -41,9 +41,9 @@
      {
         log = Logger.getLogger(getClass());
         delegateMap.put(Resource.WEB,
  -          "org.jboss.web.tomcat.security.authorization.WebXACMLPolicyModuleHelper");
  +          "org.jboss.web.tomcat.security.authorization.delegates.WebXACMLPolicyModuleDelegate");
         delegateMap.put(Resource.EJB,
  -      "org.jboss.security.authorization.modules.ejb.EJBXACMLPolicyModuleHelper");
  +      "org.jboss.security.authorization.modules.ejb.EJBXACMLPolicyModuleDelegate");
      }  
   
      /**
  
  
  
  1.1      date: 2006/07/26 03:35:53;  author: asaldhana;  state: Exp;jbosssx/src/main/org/jboss/security/authorization/modules/AuthorizationModuleDelegate.java
  
  Index: AuthorizationModuleDelegate.java
  ===================================================================
  /*
    * JBoss, Home of Professional Open Source
    * Copyright 2005, JBoss Inc., and individual contributors as indicated
    * by the @authors tag. See the copyright.txt in the distribution for a
    * full listing of individual contributors.
    *
    * This is free software; you can redistribute it and/or modify it
    * under the terms of the GNU Lesser General Public License as
    * published by the Free Software Foundation; either version 2.1 of
    * the License, or (at your option) any later version.
    *
    * This software is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    * Lesser General Public License for more details.
    *
    * You should have received a copy of the GNU Lesser General Public
    * License along with this software; if not, write to the Free
    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
    */
  package org.jboss.security.authorization.modules;
   
  import org.jboss.logging.Logger;
  import org.jboss.security.authorization.PolicyRegistration;
  import org.jboss.security.authorization.Resource;
  
  //$Id: AuthorizationModuleDelegate.java,v 1.1 2006/07/26 03:35:53 asaldhana Exp $
  
  /**
   *  Delegate for Authorization Module
   *  @author <a href="mailto:Anil.Saldhana at jboss.org">Anil Saldhana</a>
   *  @since  Jun 19, 2006 
   *  @version $Revision: 1.1 $
   */
  public abstract class AuthorizationModuleDelegate
  {
     protected static Logger log = Logger.getLogger(AuthorizationModuleDelegate.class);
     protected boolean trace = false;
     
     /**
      * Policy Registration Manager Injected
      */
     protected PolicyRegistration authzManager = null;
     
     /**
      * @see AuthorizationModule#authorize(Resource)
      * @param resource
      * @return
      */
     public abstract int authorize(Resource resource); 
     
     /**
      * Set the PolicyRegistration manager 
      * Will be used to query for the policies
      * @param authzManager
      */
     public abstract void setPolicyRegistrationManager(PolicyRegistration authzManager);
  }
  
  
  



More information about the jboss-cvs-commits mailing list