org.apache.lenya.ac.file
Class FileIPRangeManager

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.ac.file.FileItemManager
          extended by org.apache.lenya.ac.file.FileIPRangeManager
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled, org.apache.lenya.ac.IPRangeManager, org.apache.lenya.ac.ItemManager

public class FileIPRangeManager
extends FileItemManager
implements org.apache.lenya.ac.IPRangeManager

Manager for IP address ranges.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lenya.ac.file.FileItemManager
FileItemManager.DirectoryChangeNotifier
 
Field Summary
protected static java.lang.String SUFFIX
           
 
Method Summary
 org.apache.lenya.ac.IPRange add(java.lang.String id)
           
 org.apache.lenya.ac.IPRange getIPRange(java.lang.String rangeId)
          Get the IPRange with the given id.
 org.apache.lenya.ac.IPRange[] getIPRanges()
          Get all IP ranges.
protected  java.lang.String getSuffix()
          Returns the file extension to be used.
static FileIPRangeManager instance(org.apache.lenya.ac.AccreditableManager mgr, java.io.File configurationDirectory, org.apache.avalon.framework.logger.Logger logger)
          Return an instance of FileIPRangeManager
 void remove(org.apache.lenya.ac.IPRange range)
          Remove the given IP range
 
Methods inherited from class org.apache.lenya.ac.file.FileItemManager
add, addItemManagerListener, configure, contains, getAccreditableManager, getConfigurationDirectory, getFileFilter, getItem, getItemConfiguration, getItems, loadItem, loadItems, notifyAdded, notifyRemoved, remove, removeItem, removeItemManagerListener, update
 
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.ItemManager
addItemManagerListener, getAccreditableManager, removeItemManagerListener
 

Field Detail

SUFFIX

protected static final java.lang.String SUFFIX
See Also:
Constant Field Values
Method Detail

getSuffix

protected java.lang.String getSuffix()
Description copied from class: FileItemManager
Returns the file extension to be used.

Specified by:
getSuffix in class FileItemManager
Returns:
A string.
See Also:
FileItemManager.getSuffix()

instance

public static FileIPRangeManager instance(org.apache.lenya.ac.AccreditableManager mgr,
                                          java.io.File configurationDirectory,
                                          org.apache.avalon.framework.logger.Logger logger)
                                   throws org.apache.lenya.ac.AccessControlException
Return an instance of FileIPRangeManager

Parameters:
mgr - The accreditable manager.
configurationDirectory - a directory
logger - The logger.
Returns:
an IPRangeManager value
Throws:
org.apache.lenya.ac.AccessControlException - if an error occurs

getIPRanges

public org.apache.lenya.ac.IPRange[] getIPRanges()
Get all IP ranges.

Specified by:
getIPRanges in interface org.apache.lenya.ac.IPRangeManager
Returns:
an array of IP ranges.

add

public org.apache.lenya.ac.IPRange add(java.lang.String id)
                                throws org.apache.lenya.ac.AccessControlException
Specified by:
add in interface org.apache.lenya.ac.IPRangeManager
Throws:
org.apache.lenya.ac.AccessControlException

remove

public void remove(org.apache.lenya.ac.IPRange range)
            throws org.apache.lenya.ac.AccessControlException
Remove the given IP range

Specified by:
remove in interface org.apache.lenya.ac.IPRangeManager
Parameters:
range - IP range that is to be removed
Throws:
org.apache.lenya.ac.AccessControlException - when the notification failed.

getIPRange

public org.apache.lenya.ac.IPRange getIPRange(java.lang.String rangeId)
Get the IPRange with the given id.

Specified by:
getIPRange in interface org.apache.lenya.ac.IPRangeManager
Parameters:
rangeId - user id of requested IP range
Returns:
the requested IP range or null if there is no IP range with the given id


Copyright $ Apache Software Foundation. All Rights Reserved.