directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 10373 - incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role
Date Wed, 28 Apr 2004 19:56:54 GMT
Author: akarasulu
Date: Wed Apr 28 12:56:53 2004
New Revision: 10373

Added:
   incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/LoggingRoleDAOMonitor.java
  (contents, props changed)
Modified:
   incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/RoleDAOMonitor.java
   incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/RoleDAOMonitorAdapter.java
Log:
adding logger and correcting methods that used JeRoleDAO instead of RoleDAO

Added: incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/LoggingRoleDAOMonitor.java
==============================================================================
--- (empty file)
+++ incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/LoggingRoleDAOMonitor.java
Wed Apr 28 12:56:53 2004
@@ -0,0 +1,797 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permission and
+ *   limitations under the License.
+ *
+ */
+package org.apache.rms.je.role ;
+
+
+import java.util.Iterator ;
+import java.io.IOException ;
+
+import org.apache.rms.Role ;
+import org.apache.commons.logging.Log ;
+import org.apache.commons.logging.LogFactory ;
+
+import com.sleepycat.je.DatabaseEntry ;
+import com.sleepycat.bind.EntryBinding ;
+
+
+/**
+ * A logging monitor for Role data access objects.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class LoggingRoleDAOMonitor implements RoleDAOMonitor
+{
+    /** the entry <-> object binding used for prefetched entry transformation */
+    private final EntryBinding binding ;
+    /** the log used by this logging monitor */
+    private Log log = LogFactory.getLog( RoleDAO.class ) ;
+
+
+    /**
+     * Creates a Role DAO monitor using a Je Role EntryBinding.
+     *
+     * @param binding the role tuple binding
+     */
+    LoggingRoleDAOMonitor( JeRoleBinding binding )
+    {
+        this.binding = binding ;
+    }
+
+
+    /**
+     * Monitors events where the DAO fails to create a new Role.
+     *
+     * @param dao     the data access object that failed
+     * @param appName the name of the application
+     * @param name    the name of the role
+     * @param fault   the fault that caused the failure
+     */
+    public void failedOnCreate( RoleDAO dao, String appName,
+                                String name, Throwable fault )
+    {
+        try
+        {
+            if ( log.isErrorEnabled() )
+            {
+                log.error( "Creation of role with name " + name
+                        + " for application " + appName + " failed using " + dao,
+                        fault ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where the DAO fails to create a new Role
+     * because the role for the application by the name specified
+     * already exists.
+     *
+     * @param dao     the data access object that failed
+     * @param op the operation that was attempted
+     * @param appName the name of the application
+     * @param name    the name of the role
+     */
+    public void roleExists( RoleDAO dao, String op,
+                                  String appName, String name )
+    {
+        try {
+            if ( log.isWarnEnabled() )
+            {
+                log.warn( dao + "." + op + "() on role " + name
+                        + " for application " + appName + " failed"
+                        + " because a role by that name already exists" ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors event where the DAO creates a new Role.
+     *
+     * @param dao     the data access object that failed
+     * @param appName the name of the application
+     * @param name    the name of the role
+     */
+    public void roleCreated( RoleDAO dao, String appName,
+                                   String name )
+    {
+        try
+        {
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "Creation of role with name " + name
+                        + " for application " + appName + " succeeded using "
+                        + dao ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors the successful deletion of an application's Role.
+     *
+     * @param dao     the data access object that failed
+     * @param appName the name of the application
+     * @param name    the name of the role
+     */
+    public void roleDeleted( RoleDAO dao, String appName, String name )
+    {
+        try
+        {
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "Deletion of role with name " + name
+                        + " for application " + appName + " succeeded using "
+                        + dao ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors failures to delete a Role due to DAO failures.
+     *
+     * @param dao     the data access object that failed
+     * @param appName the name of the application
+     * @param name    the name of the role
+     * @param fault   the fault that caused the failure
+     */
+    public void deleteFailed( RoleDAO dao, String appName,
+                              String name, Throwable fault )
+    {
+        try
+        {
+            if ( log.isErrorEnabled() )
+            {
+                log.error( "Deletion of role with name " + name
+                        + " for application " + appName + " failed using "
+                        + dao, fault ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where an operation on an non-existant Role
+     * was attempted.
+     *
+     * @param dao     the data access object that failed
+     * @param op      the operation that was attempted
+     * @param appName the name of the application
+     */
+    public void roleDoesNotExist( RoleDAO dao, String op, String appName,
+                                  String roleName )
+    {
+        try
+        {
+            if ( log.isWarnEnabled() )
+            {
+                log.warn( "Attempt to " + op + " role with name " + roleName
+                    + " for application " + appName
+                    + " failed because no such role exists." ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where the rename of a Role failed.
+     *
+     * @param dao     the data access object that failed
+     * @param appName the name of the application
+     * @param name    the name of the role
+     * @param newName the new name for the role
+     * @param fault   the fault that caused the failure
+     */
+    public void failedOnRename( RoleDAO dao, String appName,
+                                String name, String newName, Throwable fault )
+    {
+        try
+        {
+            if ( log.isErrorEnabled() )
+            {
+                log.error( "Rename of role originally named " + name
+                        + " to new name of " + newName + " for application "
+                        + appName + " failed using " + dao, fault ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where the a Role was successfully renamed.
+     *
+     * @param dao     the data access object that failed
+     * @param appName the name of the application
+     * @param name    the name of the role
+     * @param newName the new name for the role
+     */
+    public void roleRenamed( RoleDAO dao, String appName, String name,
+                             String newName )
+    {
+        try
+        {
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "Rename of role originally named " + name
+                        + " to new name of " + newName + " for application "
+                        + appName + " succeeded using " + dao ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where a permission fails on lookup.
+     *
+     * @param dao     the data access object that failed
+     * @param appName the name of the application
+     * @param name    the name of the permission
+     * @param fault   the fault that caused the failure
+     */
+    public void failedRoleLookup( RoleDAO dao, String appName, String name,
+                                  Throwable fault )
+    {
+        try
+        {
+            if ( log.isErrorEnabled() )
+            {
+                log.error( "Lookup of role with name " + name
+                        + " for application " + appName + " failed using " + dao,
+                        fault ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors the successful lookup of a role by name
+     *
+     * @param dao  the data access object that failed
+     * @param role the role object looked up
+     */
+    public void roleLookedUp( RoleDAO dao, Role role )
+    {
+        try
+        {
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "Lookup of role named " + role.getName()
+                        + " for application " + role.getApplicationName()
+                        + " succeeded using " + dao ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where a cleanup operation on a resource fails.
+     *
+     * @param dao      the data access object that failed
+     * @param op       the cleanup operation that failed
+     * @param resource the resource being cleanup
+     * @param fault    the fault that caused the failure
+     */
+    public void failedOnCleanupOperation( RoleDAO dao, String op,
+                                          Object resource, Throwable fault )
+    {
+        try
+        {
+            if ( log.isWarnEnabled() )
+            {
+                log.warn( dao + " clean up of resource failed while calling "
+                        + resource + "." + op + "()", fault ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where a cleanup operation occured.
+     *
+     * @param dao      the data access object that failed
+     * @param op       the cleanup operation that failed
+     * @param resource the resource being cleanup
+     */
+    public void cleanedUp( RoleDAO dao, String op, Object resource )
+    {
+        try
+        {
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( dao + " cleaned up resource by calling " + resource
+                        + "." + op + "()" ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where an empty list is returned on a role [name]
+     * listing.
+     *
+     * @param dao       the data access object that failed
+     * @param listing   the Iterator created
+     * @param appName   the name of the role
+     * @param onlyNames true if the Iterator was to return names false if the
+     * Iterator perms
+     */
+    public void listingEmpty( RoleDAO dao, Iterator listing,
+                              String appName, boolean onlyNames )
+    {
+        try
+        {
+            if ( log.isDebugEnabled() )
+            {
+                String itemType = null ;
+
+                if ( onlyNames )
+                {
+                    itemType = "String name" ;
+                }
+                else
+                {
+                    itemType = "Role object" ;
+                }
+
+                log.debug( "Iterator " + listing + " was successfully created over"
+                        + " an empty set of " + itemType + "s for application "
+                        + appName ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events when an Iterator over the list of role names
+     * is sucessful.
+     *
+     * @param dao     the data access object that failed
+     * @param listing the Iterator created
+     * @param appName the name of the application
+     */
+    public void listingNamesOnly( RoleDAO dao, Iterator listing,
+                                  String appName )
+    {
+        try
+        {
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "Iterator " + listing + " was successfully created over"
+                        + " the set of Role names only for application "
+                        + appName ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events when an Iterator over the list of role objects
+     * is sucessful.
+     *
+     * @param dao     the data access object that failed
+     * @param listing the Iterator created
+     * @param appName the name of the application
+     */
+    public void listingRoles( RoleDAO dao, Iterator listing,
+                                    String appName )
+    {
+        try
+        {
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "Iterator " + listing + " was successfully created "
+                    + "over the set of Roles for application "
+                    + appName ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * @param dao       the data access object that failed
+     * @param listing   the Iterator created
+     * @param appName   the name of the application
+     * @param onlyNames true if the Iterator was to return names false if
+     * the Iterator returns roles
+     * @param fault     the fault that caused the failure
+     */
+    public void failedListing( RoleDAO dao, Iterator listing,
+                               String appName, boolean onlyNames,
+                               Throwable fault )
+    {
+        String itemType = null ;
+
+        try
+        {
+            if ( log.isErrorEnabled() )
+            {
+                if ( onlyNames )
+                {
+                    itemType = "String name" ;
+                }
+                else
+                {
+                    itemType = "Role object" ;
+                }
+
+                log.error( "Iterator " + listing + " created by " + dao
+                        + " to return items of " + itemType
+                        + " for application " + appName
+                        + " failed to initialize", fault ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors the successful prefetch of the next role name.
+     *
+     * @param dao        the data access object that failed
+     * @param listing    the Iterator created
+     * @param appName    the name of the application
+     * @param retVal     the next value to be returned
+     * @param prefetched the prefetched value if this Iterator prefetches
+     * the next value
+     */
+    public void successOnNextName( RoleDAO dao, Iterator listing,
+                                   String appName, Object retVal,
+                                   Object prefetched )
+    {
+        try
+        {
+            String name = null ;
+
+            if ( log.isDebugEnabled() )
+            {
+                if ( prefetched instanceof DatabaseEntry )
+                {
+                    DatabaseEntry entry = ( DatabaseEntry ) prefetched ;
+                    name = new String( entry.getData() ) ;
+                }
+                else if ( prefetched instanceof String )
+                {
+                    name = ( String ) prefetched ;
+                }
+                else
+                {
+                    throw new IllegalArgumentException( "unknow type "
+                            + prefetched.getClass() ) ;
+                }
+
+                log.debug( "Iterator " + listing + " created by " + dao
+                        + " successfully prefetch a Role name of " + name
+                        + " for application " + appName
+                        + " after retrieving the value " + retVal ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors the successful prefetch of the next role.
+     *
+     * @param dao        the data access object that failed
+     * @param listing    the Iterator created
+     * @param appName    the name of the application
+     * @param retVal     the next value to be returned
+     * @param prefetched the prefetched value if this Iterator prefetches
+     * the next value
+     */
+    public void successOnNextRole( RoleDAO dao, Iterator listing,
+                                   String appName, Object retVal,
+                                   Object prefetched )
+    {
+        Role role = null ;
+
+        try
+        {
+            if ( log.isDebugEnabled() )
+            {
+                if ( prefetched instanceof Role )
+                {
+                    role = ( Role ) prefetched ;
+                }
+                else if ( prefetched instanceof DatabaseEntry )
+                {
+                    try
+                    {
+                        role = ( Role )
+                                binding.entryToObject( ( DatabaseEntry ) prefetched ) ;
+                    }
+                    catch ( IOException e )
+                    {
+                        log.error( "Failed to bind database entry to Role" ) ;
+                    }
+                }
+
+                log.debug( "Iterator " + listing + " created by " + dao
+                        + " successfully prefetch a Role of " + role
+                        + " for application " + appName
+                        + " after retrieving the value " + retVal ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where the iterator fails to return the next element,
+     * or fails to prefetch an element to return on a subsequent next method
+     * call.
+     *
+     * @param dao       the data access object that failed
+     * @param listing   the Iterator created
+     * @param appName   the name of the application
+     * @param onlyNames true if the Iterator was to return names false if the
+     * Iterator returns role objects
+     * @param retVal    the next value to be returned
+     * @param fault     the fault that caused the failure
+     */
+    public void iteratorFailure( RoleDAO dao, Iterator listing,
+                                 String appName, boolean onlyNames,
+                                 Object retVal, Throwable fault )
+    {
+        String itemType = null ;
+
+        try
+        {
+            if ( log.isErrorEnabled() )
+            {
+                if ( onlyNames )
+                {
+                    itemType = "String name" ;
+                }
+                else
+                {
+                    itemType = "Role object" ;
+                }
+
+                log.error( "Iterator " + listing + " created by " + dao
+                        + " failed on prefetch of " + itemType
+                        + " for application " + appName
+                        + " after retrieving the value " + retVal, fault ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where the iterator runs out of elements to prefetch.
+     *
+     * @param dao       the data access object that failed
+     * @param listing   the Iterator created
+     * @param appName   the name of the application
+     * @param onlyNames true if the Iterator was to return names false if
+     * the Iterator returns role objects
+     * @param lastVal   the last value to be returned on the subsequent
+     * (final) next() call
+     */
+    public void iteratorExhausted( RoleDAO dao, Iterator listing,
+                                   String appName, boolean onlyNames,
+                                   Object lastVal )
+    {
+        String itemType = null ;
+
+        try
+        {
+            if ( log.isDebugEnabled() )
+            {
+                if ( onlyNames )
+                {
+                    itemType = "String names" ;
+                }
+                else
+                {
+                    itemType = "Role objects" ;
+                }
+
+                log.debug( "Iterator " + listing + " created by " + dao
+                        + " exhaused all " + itemType + " for application "
+                        + appName + ".  Will return final value of " + lastVal ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where a lookup of the grants of an application role fail.
+     *
+     * @param dao      the data access object
+     * @param appName  the name of the application
+     * @param roleName the name of the role
+     * @param fault    the fault that caused the failure
+     */
+    public void failedGrantsLookup( RoleDAO dao, String appName, String roleName,
+                                    Throwable fault )
+    {
+        try
+        {
+            if ( log.isErrorEnabled() )
+            {
+                log.error( "Failed to get the grants of role " + roleName
+                        + " for application " + appName + " using " + dao,
+                        fault ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where the grants of an application role are succesfully looked up.
+     *
+     * @param dao      the data access object
+     * @param appName  the name of the application
+     * @param roleName the name of the role
+     * @param grants   the grants for the role that were successfully looked up
+     */
+    public void grantsLookedUp( RoleDAO dao, String appName, String roleName,
+                                byte[] grants )
+    {
+        try
+        {
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "Looked up grants for role " + roleName
+                        + " created by " + dao + " for application "
+                        + appName ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where the grants of an application role are succesfully altered.
+     *
+     * @param dao      the data access object
+     * @param appName  the name of the application
+     * @param roleName the name of the role
+     * @param grants   the newly set grants for the role
+     */
+    public void roleGrantsAltered( RoleDAO dao, String appName,
+                                   String roleName, byte[] grants )
+    {
+        try
+        {
+            if ( log.isDebugEnabled() )
+            {
+                log.debug( "Altered grants for role " + roleName
+                        + " created by " + dao + " for application "
+                        + appName ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+
+
+    /**
+     * Monitors events where changes to the grants of an application role fail.
+     *
+     * @param dao      the data access object
+     * @param appName  the name of the application
+     * @param roleName the name of the role
+     * @param fault    the fault that caused the failure
+     */
+    public void failedOnSetGrants( RoleDAO dao, String appName,
+                                   String roleName, Throwable fault )
+    {
+        try
+        {
+            if ( log.isErrorEnabled() )
+            {
+                log.error( "Failed to set the grants of role " + roleName
+                        + " for application " + appName + " using " + dao,
+                        fault ) ;
+            }
+        }
+        catch ( Throwable t )
+        {
+            log.warn( "monitor failure", t ) ;
+        }
+    }
+}

Modified: incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/RoleDAOMonitor.java
==============================================================================
--- incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/RoleDAOMonitor.java	(original)
+++ incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/RoleDAOMonitor.java	Wed
Apr 28 12:56:53 2004
@@ -60,7 +60,7 @@
      * @param roleName the name of the role
      * @param fault the fault that caused the failure
      */
-    void failedOnCreate( JeRoleDAO dao, String appName, String roleName,
+    void failedOnCreate( RoleDAO dao, String appName, String roleName,
                          Throwable fault ) ;
 
     /**
@@ -71,7 +71,7 @@
      * @param appName the name of the application
      * @param roleName the name of the role
      */
-    void roleCreated( JeRoleDAO dao, String appName, String roleName ) ;
+    void roleCreated( RoleDAO dao, String appName, String roleName ) ;
 
     /**
      * Monitors events where the DAO attempts to perform an operation but
@@ -82,7 +82,7 @@
      * @param appName the name of the application
      * @param roleName the name of the role
      */
-    void roleExists( JeRoleDAO dao, String op, String appName, String roleName ) ;
+    void roleExists( RoleDAO dao, String op, String appName, String roleName ) ;
 
     /**
      * Monitors events where an application role lookup fails for an operation
@@ -93,7 +93,7 @@
      * @param appName the name of the application
      * @param roleName the name of the role
      */
-    void roleDoesNotExist( JeRoleDAO dao, String op, String appName,
+    void roleDoesNotExist( RoleDAO dao, String op, String appName,
                            String roleName ) ;
 
     /**
@@ -104,7 +104,7 @@
      * @param roleName the name of the role
      * @param fault the fault that caused the failure
      */
-    void failedRoleLookup( JeRoleDAO dao, String appName, String roleName,
+    void failedRoleLookup( RoleDAO dao, String appName, String roleName,
                            Throwable fault ) ;
 
     /**
@@ -113,7 +113,7 @@
      * @param dao the data access object
      * @param role the application role that is looked up
      */
-    void roleLookedUp( JeRoleDAO dao, Role role ) ;
+    void roleLookedUp( RoleDAO dao, Role role ) ;
 
     /**
      * Monitors events where a role for an application is successfully deleted.
@@ -122,7 +122,7 @@
      * @param appName the name of the application
      * @param roleName the name of the role
      */
-    void roleDeleted( JeRoleDAO dao, String appName, String roleName ) ;
+    void roleDeleted( RoleDAO dao, String appName, String roleName ) ;
 
     /**
      * Monitors events where an application role deletion fails.
@@ -132,7 +132,7 @@
      * @param roleName the name of the role
      * @param fault the fault that caused the failure
      */
-    void deleteFailed( JeRoleDAO dao, String appName, String roleName,
+    void deleteFailed( RoleDAO dao, String appName, String roleName,
                        Throwable fault ) ;
 
     /**
@@ -144,7 +144,7 @@
      * @param oldName the original name of the role
      * @param newName the new name to set for the role
      */
-    void roleRenamed( JeRoleDAO dao, String appName, String oldName,
+    void roleRenamed( RoleDAO dao, String appName, String oldName,
                       String newName ) ;
 
     /**
@@ -157,7 +157,7 @@
      * @param newName the new name to set for the role
      * @param fault the fault that caused the failure
      */
-    void failedOnRename( JeRoleDAO dao, String appName, String oldName,
+    void failedOnRename( RoleDAO dao, String appName, String oldName,
                          String newName, Throwable fault ) ;
 
     /**
@@ -169,7 +169,7 @@
      * @param roleName the name of the role
      * @param fault the fault that caused the failure
      */
-    void failedGrantsLookup( JeRoleDAO dao, String appName, String roleName,
+    void failedGrantsLookup( RoleDAO dao, String appName, String roleName,
                              Throwable fault ) ;
 
     /**
@@ -181,7 +181,7 @@
      * @param roleName the name of the role
      * @param grants the grants for the role that were successfully looked up
      */
-    void grantsLookedUp( JeRoleDAO dao, String appName, String roleName,
+    void grantsLookedUp( RoleDAO dao, String appName, String roleName,
                          byte[] grants ) ;
 
     /**
@@ -193,7 +193,7 @@
      * @param roleName the name of the role
      * @param grants the newly set grants for the role
      */
-    void roleGrantsAltered( JeRoleDAO dao, String appName, String roleName,
+    void roleGrantsAltered( RoleDAO dao, String appName, String roleName,
                             byte[] grants ) ;
 
     /**
@@ -205,7 +205,7 @@
      * @param roleName the name of the role
      * @param fault the fault that caused the failure
      */
-    void failedOnSetGrants( JeRoleDAO dao, String appName, String roleName,
+    void failedOnSetGrants( RoleDAO dao, String appName, String roleName,
                             Throwable fault ) ;
 
     /**
@@ -219,7 +219,7 @@
      * Iterator returns role objects
      */
 
-    void listingEmpty( JeRoleDAO dao, Iterator listing, String appName,
+    void listingEmpty( RoleDAO dao, Iterator listing, String appName,
                        boolean onlyNames ) ;
 
     /**
@@ -230,7 +230,7 @@
      * @param listing the Iterator created
      * @param appName the name of the application
      */
-    void listingNamesOnly( JeRoleDAO dao, Iterator listing, String appName ) ;
+    void listingNamesOnly( RoleDAO dao, Iterator listing, String appName ) ;
 
     /**
      * Monitors events when an Iterator over the list of role objects
@@ -240,7 +240,7 @@
      * @param listing the Iterator created
      * @param appName the name of the application
      */
-    void listingRoles( JeRoleDAO dao, Iterator listing, String appName ) ;
+    void listingRoles( RoleDAO dao, Iterator listing, String appName ) ;
 
     /**
      * @param dao       the data access object that failed
@@ -250,7 +250,7 @@
      * the Iterator return role objects
      * @param fault     the fault that caused the failure
      */
-    void failedListing( JeRoleDAO dao, Iterator listing, String appName,
+    void failedListing( RoleDAO dao, Iterator listing, String appName,
                         boolean onlyNames, Throwable fault ) ;
 
     /**
@@ -264,7 +264,7 @@
      * @param lastVal   the last value to be returned on the subsequent
      * (final) next() call
      */
-    void iteratorExhausted( JeRoleDAO dao, Iterator listing, String appName,
+    void iteratorExhausted( RoleDAO dao, Iterator listing, String appName,
                             boolean onlyNames, Object lastVal ) ;
 
     /**
@@ -277,7 +277,7 @@
      * @param prefetched the prefetched value if this Iterator prefetches
      * the next value
      */
-    void successOnNextName( JeRoleDAO dao, Iterator listing, String appName,
+    void successOnNextName( RoleDAO dao, Iterator listing, String appName,
                             Object retVal, Object prefetched ) ;
 
     /**
@@ -290,7 +290,7 @@
      * @param prefetched the prefetched value if this Iterator prefetches
      * the next value
      */
-    void successOnNextRole( JeRoleDAO dao, Iterator listing, String appName,
+    void successOnNextRole( RoleDAO dao, Iterator listing, String appName,
                             Object retVal, Object prefetched ) ;
 
     /**
@@ -306,6 +306,6 @@
      * @param retVal    the next value to be returned
      * @param fault     the fault that caused the failure
      */
-    void iteratorFailure( JeRoleDAO dao, Iterator listing, String appName,
+    void iteratorFailure( RoleDAO dao, Iterator listing, String appName,
                           boolean onlyNames, Object retVal, Throwable fault ) ;
 }

Modified: incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/RoleDAOMonitorAdapter.java
==============================================================================
--- incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/RoleDAOMonitorAdapter.java
(original)
+++ incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/role/RoleDAOMonitorAdapter.java
Wed Apr 28 12:56:53 2004
@@ -72,7 +72,7 @@
      * @param roleName the name of the role
      * @param fault    the fault that caused the failure
      */
-    public void failedOnCreate( JeRoleDAO dao, String appName, String roleName,
+    public void failedOnCreate( RoleDAO dao, String appName, String roleName,
                                 Throwable fault )
     {
         if ( fault != null )
@@ -90,7 +90,7 @@
      * @param appName  the name of the application
      * @param roleName the name of the role
      */
-    public void roleCreated( JeRoleDAO dao, String appName, String roleName )
+    public void roleCreated( RoleDAO dao, String appName, String roleName )
     {
     }
 
@@ -104,7 +104,7 @@
      * @param appName  the name of the application
      * @param roleName the name of the role
      */
-    public void roleExists( JeRoleDAO dao, String op, String appName,
+    public void roleExists( RoleDAO dao, String op, String appName,
                             String roleName )
     {
     }
@@ -119,7 +119,7 @@
      * @param appName  the name of the application
      * @param roleName the name of the role
      */
-    public void roleDoesNotExist( JeRoleDAO dao, String op, String appName,
+    public void roleDoesNotExist( RoleDAO dao, String op, String appName,
                                   String roleName )
     {
     }
@@ -133,7 +133,7 @@
      * @param roleName the name of the role
      * @param fault    the fault that caused the failure
      */
-    public void failedRoleLookup( JeRoleDAO dao, String appName, String roleName,
+    public void failedRoleLookup( RoleDAO dao, String appName, String roleName,
                                   Throwable fault )
     {
         if ( fault != null )
@@ -149,7 +149,7 @@
      * @param dao  the data access object
      * @param role the application role that is looked up
      */
-    public void roleLookedUp( JeRoleDAO dao, Role role )
+    public void roleLookedUp( RoleDAO dao, Role role )
     {
     }
 
@@ -161,7 +161,7 @@
      * @param appName  the name of the application
      * @param roleName the name of the role
      */
-    public void roleDeleted( JeRoleDAO dao, String appName, String roleName )
+    public void roleDeleted( RoleDAO dao, String appName, String roleName )
     {
     }
 
@@ -174,7 +174,7 @@
      * @param roleName the name of the role
      * @param fault    the fault that caused the failure
      */
-    public void deleteFailed( JeRoleDAO dao, String appName, String roleName,
+    public void deleteFailed( RoleDAO dao, String appName, String roleName,
                               Throwable fault )
     {
         if ( fault != null )
@@ -193,7 +193,7 @@
      * @param oldName the original name of the role
      * @param newName the new name to set for the role
      */
-    public void roleRenamed( JeRoleDAO dao, String appName, String oldName,
+    public void roleRenamed( RoleDAO dao, String appName, String oldName,
                              String newName )
     {
     }
@@ -209,7 +209,7 @@
      * @param newName the new name to set for the role
      * @param fault   the fault that caused the failure
      */
-    public void failedOnRename( JeRoleDAO dao, String appName, String oldName,
+    public void failedOnRename( RoleDAO dao, String appName, String oldName,
                                 String newName, Throwable fault )
     {
         if ( fault != null )
@@ -227,7 +227,7 @@
      * @param roleName the name of the role
      * @param fault    the fault that caused the failure
      */
-    public void failedGrantsLookup( JeRoleDAO dao, String appName, String roleName,
+    public void failedGrantsLookup( RoleDAO dao, String appName, String roleName,
                                     Throwable fault )
     {
         if ( fault != null )
@@ -245,7 +245,7 @@
      * @param roleName the name of the role
      * @param grants   the grants for the role that were successfully looked up
      */
-    public void grantsLookedUp( JeRoleDAO dao, String appName, String roleName,
+    public void grantsLookedUp( RoleDAO dao, String appName, String roleName,
                                 byte[] grants )
     {
     }
@@ -260,7 +260,7 @@
      * @param roleName the name of the role
      * @param grants   the newly set grants for the role
      */
-    public void roleGrantsAltered( JeRoleDAO dao, String appName,
+    public void roleGrantsAltered( RoleDAO dao, String appName,
                                    String roleName, byte[] grants )
     {
     }
@@ -274,7 +274,7 @@
      * @param roleName the name of the role
      * @param fault    the fault that caused the failure
      */
-    public void failedOnSetGrants( JeRoleDAO dao, String appName,
+    public void failedOnSetGrants( RoleDAO dao, String appName,
                                    String roleName, Throwable fault )
     {
         if ( fault != null )
@@ -294,7 +294,7 @@
      * @param onlyNames true if the Iterator was to return names false if the
      * Iterator returns role objects
      */
-    public void listingEmpty( JeRoleDAO dao, Iterator listing,
+    public void listingEmpty( RoleDAO dao, Iterator listing,
                               String appName, boolean onlyNames )
     {
     }
@@ -308,7 +308,7 @@
      * @param listing the Iterator created
      * @param appName the name of the application
      */
-    public void listingNamesOnly( JeRoleDAO dao, Iterator listing,
+    public void listingNamesOnly( RoleDAO dao, Iterator listing,
                                   String appName )
     {
     }
@@ -322,7 +322,7 @@
      * @param listing the Iterator created
      * @param appName the name of the application
      */
-    public void listingRoles( JeRoleDAO dao, Iterator listing,
+    public void listingRoles( RoleDAO dao, Iterator listing,
                                     String appName )
     {
     }
@@ -336,7 +336,7 @@
      * the Iterator return role objects
      * @param fault     the fault that caused the failure
      */
-    public void failedListing( JeRoleDAO dao, Iterator listing,
+    public void failedListing( RoleDAO dao, Iterator listing,
                                String appName, boolean onlyNames,
                                Throwable fault )
     {
@@ -357,7 +357,7 @@
      * @param prefetched the prefetched value if this Iterator prefetches
      * the next value
      */
-    public void successOnNextName( JeRoleDAO dao, Iterator listing,
+    public void successOnNextName( RoleDAO dao, Iterator listing,
                                    String appName, Object retVal,
                                    Object prefetched )
     {
@@ -374,7 +374,7 @@
      * @param prefetched the prefetched value if this Iterator prefetches
      * the next value
      */
-    public void successOnNextRole( JeRoleDAO dao, Iterator listing,
+    public void successOnNextRole( RoleDAO dao, Iterator listing,
                                    String appName, Object retVal,
                                    Object prefetched )
     {
@@ -394,7 +394,7 @@
      * @param retVal    the next value to be returned
      * @param fault     the fault that caused the failure
      */
-    public void iteratorFailure( JeRoleDAO dao, Iterator listing,
+    public void iteratorFailure( RoleDAO dao, Iterator listing,
                                  String appName, boolean onlyNames,
                                  Object retVal, Throwable fault )
     {
@@ -416,7 +416,7 @@
      * @param lastVal   the last value to be returned on the subsequent
      * (final) next() call
      */
-    public void iteratorExhausted( JeRoleDAO dao, Iterator listing,
+    public void iteratorExhausted( RoleDAO dao, Iterator listing,
                                    String appName, boolean onlyNames,
                                    Object lastVal )
     {

Mime
View raw message