portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/impl RdbmsPolicy.java
Date Thu, 11 Mar 2004 05:03:50 GMT
dlestrat    2004/03/10 21:03:50

  Modified:    components/security/src/java/org/apache/jetspeed/security/impl
                        RdbmsPolicy.java
  Log:
  Refactored for Pico.
  
  Revision  Changes    Path
  1.2       +9 -17     jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/impl/RdbmsPolicy.java
  
  Index: RdbmsPolicy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/impl/RdbmsPolicy.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RdbmsPolicy.java	10 Mar 2004 06:07:47 -0000	1.1
  +++ RdbmsPolicy.java	11 Mar 2004 05:03:50 -0000	1.2
  @@ -23,6 +23,9 @@
   
   import javax.security.auth.Subject;
   
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
  +
   import org.apache.jetspeed.security.PermissionManager;
   
   /**
  @@ -39,6 +42,7 @@
    */
   public class RdbmsPolicy extends Policy
   {
  +    private static final Log log = LogFactory.getLog(RdbmsPolicy.class);
   
       /** <p>Default Policy.</p> */
       private static String defaultPolicy = "sun.security.provider.PolicyFile";
  @@ -49,21 +53,10 @@
       /**
        * <p>Default constructor.</p>
        */
  -    public RdbmsPolicy()
  +    public RdbmsPolicy(PermissionManager pms)
       {
  -        System.out.println("\t\t[RdbmsPolicy] Policy constructed.");
  -    }
  -
  -    /**
  -     * <p>Returns the {@link PermissionManagerService}.</p>
  -     * TODO This should be improved.
  -     */
  -    protected void getPermissionManagerService()
  -    {
  -        if (pms == null)
  -        {
  -            //pms = (PermissionManager) CommonPortletServices.getPortalService(PermissionManager.SERVICE_NAME);
  -        }
  +        if (log.isDebugEnabled()) log.debug("RdbmsPolicy constructed.");
  +        this.pms = pms;
       }
   
       /**
  @@ -71,7 +64,7 @@
        */
       public void refresh()
       {
  -        System.out.println("\t\t[RdbmsPolicy] Refresh called.");
  +        if (log.isDebugEnabled()) log.debug("RdbmsPolicy refresh called.");
       }
   
       /**
  @@ -88,7 +81,7 @@
        */
       public PermissionCollection getPermissions(CodeSource codeSource)
       {
  -        System.out.println("\t\t[RdbmsPolicy] getPermissions called for '" + codeSource
+ "'.");
  +        if (log.isDebugEnabled()) log.debug("getPermissions called for '" + codeSource
+ "'.");
   
           Permissions perms = null;
   
  @@ -99,7 +92,6 @@
           {
               // Add permission associated with the Subject Principals to Permissions.
               // Get the permissions
  -            getPermissionManagerService();
               perms = pms.getPermissions(user.getPrincipals());
           }
           if (null != perms)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message