org.apache.lenya.ac.impl
Class AbstractAccreditableManager

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.ac.impl.AbstractAccreditableManager
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.logger.LogEnabled, org.apache.lenya.ac.AccreditableManager, org.apache.lenya.ac.ItemManagerListener
Direct Known Subclasses:
FileAccreditableManager

public abstract class AbstractAccreditableManager
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements org.apache.lenya.ac.AccreditableManager, org.apache.lenya.ac.ItemManagerListener

Abstract base class for accreditable managers.


Field Summary
 
Fields inherited from interface org.apache.lenya.ac.AccreditableManager
ROLE
 
Constructor Summary
AbstractAccreditableManager(org.apache.avalon.framework.logger.Logger logger)
           
 
Method Summary
 void addItemManagerListener(org.apache.lenya.ac.ItemManagerListener listener)
          Attaches an item manager listener to this accreditable manager.
 org.apache.lenya.ac.GroupManager getGroupManager()
           
 org.apache.lenya.ac.IPRangeManager getIPRangeManager()
           
 org.apache.lenya.ac.RoleManager getRoleManager()
           
 org.apache.lenya.ac.UserManager getUserManager()
           
protected abstract  org.apache.lenya.ac.GroupManager initializeGroupManager()
          Initializes the group manager.
protected abstract  org.apache.lenya.ac.IPRangeManager initializeIPRangeManager()
          Initializes the IP range manager.
protected abstract  org.apache.lenya.ac.RoleManager initializeRoleManager()
          Initializes the role manager.
protected abstract  org.apache.lenya.ac.UserManager initializeUserManager()
          Initializes the user manager.
 void itemAdded(org.apache.lenya.ac.Item item)
           
 void itemRemoved(org.apache.lenya.ac.Item item)
           
protected  void notifyAdded(org.apache.lenya.ac.Item item)
          Notifies the listeners that an item was added.
protected  void notifyRemoved(org.apache.lenya.ac.Item item)
          Notifies the listeners that an item was removed.
 void removeItemManagerListener(org.apache.lenya.ac.ItemManagerListener listener)
          Removes an item manager listener from this accreditable manager.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.lenya.ac.AccreditableManager
getConfigurationCollectionUri, getId
 

Constructor Detail

AbstractAccreditableManager

public AbstractAccreditableManager(org.apache.avalon.framework.logger.Logger logger)
Parameters:
logger - The logger.
Method Detail

addItemManagerListener

public void addItemManagerListener(org.apache.lenya.ac.ItemManagerListener listener)
Attaches an item manager listener to this accreditable manager.

Specified by:
addItemManagerListener in interface org.apache.lenya.ac.AccreditableManager
Parameters:
listener - An item manager listener.

removeItemManagerListener

public void removeItemManagerListener(org.apache.lenya.ac.ItemManagerListener listener)
Removes an item manager listener from this accreditable manager.

Specified by:
removeItemManagerListener in interface org.apache.lenya.ac.AccreditableManager
Parameters:
listener - An item manager listener.

notifyAdded

protected void notifyAdded(org.apache.lenya.ac.Item item)
                    throws org.apache.lenya.ac.AccessControlException
Notifies the listeners that an item was added.

Parameters:
item - The item that was added.
Throws:
org.apache.lenya.ac.AccessControlException - when a notified listener threw this exception.

notifyRemoved

protected void notifyRemoved(org.apache.lenya.ac.Item item)
                      throws org.apache.lenya.ac.AccessControlException
Notifies the listeners that an item was removed.

Parameters:
item - The item that was removed.
Throws:
org.apache.lenya.ac.AccessControlException - when a notified listener threw this exception.

itemAdded

public void itemAdded(org.apache.lenya.ac.Item item)
               throws org.apache.lenya.ac.AccessControlException
Specified by:
itemAdded in interface org.apache.lenya.ac.ItemManagerListener
Throws:
org.apache.lenya.ac.AccessControlException
See Also:
ItemManagerListener.itemAdded(org.apache.lenya.ac.Item)

itemRemoved

public void itemRemoved(org.apache.lenya.ac.Item item)
                 throws org.apache.lenya.ac.AccessControlException
Specified by:
itemRemoved in interface org.apache.lenya.ac.ItemManagerListener
Throws:
org.apache.lenya.ac.AccessControlException
See Also:
ItemManagerListener.itemRemoved(org.apache.lenya.ac.Item)

getUserManager

public org.apache.lenya.ac.UserManager getUserManager()
                                               throws org.apache.lenya.ac.AccessControlException
Specified by:
getUserManager in interface org.apache.lenya.ac.AccreditableManager
Throws:
org.apache.lenya.ac.AccessControlException
See Also:
AccreditableManager.getUserManager()

getGroupManager

public org.apache.lenya.ac.GroupManager getGroupManager()
                                                 throws org.apache.lenya.ac.AccessControlException
Specified by:
getGroupManager in interface org.apache.lenya.ac.AccreditableManager
Throws:
org.apache.lenya.ac.AccessControlException
See Also:
AccreditableManager.getGroupManager()

getRoleManager

public org.apache.lenya.ac.RoleManager getRoleManager()
                                               throws org.apache.lenya.ac.AccessControlException
Specified by:
getRoleManager in interface org.apache.lenya.ac.AccreditableManager
Throws:
org.apache.lenya.ac.AccessControlException
See Also:
AccreditableManager.getRoleManager()

getIPRangeManager

public org.apache.lenya.ac.IPRangeManager getIPRangeManager()
                                                     throws org.apache.lenya.ac.AccessControlException
Specified by:
getIPRangeManager in interface org.apache.lenya.ac.AccreditableManager
Throws:
org.apache.lenya.ac.AccessControlException
See Also:
AccreditableManager.getIPRangeManager()

initializeGroupManager

protected abstract org.apache.lenya.ac.GroupManager initializeGroupManager()
                                                                    throws org.apache.lenya.ac.AccessControlException
Initializes the group manager.

Returns:
A group manager.
Throws:
org.apache.lenya.ac.AccessControlException - when something went wrong.

initializeIPRangeManager

protected abstract org.apache.lenya.ac.IPRangeManager initializeIPRangeManager()
                                                                        throws org.apache.lenya.ac.AccessControlException
Initializes the IP range manager.

Returns:
An IP range manager.
Throws:
org.apache.lenya.ac.AccessControlException - when something went wrong.

initializeRoleManager

protected abstract org.apache.lenya.ac.RoleManager initializeRoleManager()
                                                                  throws org.apache.lenya.ac.AccessControlException
Initializes the role manager.

Returns:
A role manager.
Throws:
org.apache.lenya.ac.AccessControlException - when something went wrong.

initializeUserManager

protected abstract org.apache.lenya.ac.UserManager initializeUserManager()
                                                                  throws org.apache.lenya.ac.AccessControlException
Initializes the user manager.

Returns:
A user manager.
Throws:
org.apache.lenya.ac.AccessControlException - when something went wrong.


Copyright $ Apache Software Foundation. All Rights Reserved.