org.apache.lenya.ac.file
Class FileIPRangeManager

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

public class FileIPRangeManager
extends FileItemManager
implements 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
           
 
Fields inherited from class org.apache.lenya.ac.file.FileItemManager
PATH
 
Constructor Summary
protected FileIPRangeManager(java.io.File configurationDirectory)
          Ctor.
 
Method Summary
 void add(IPRange range)
          Add the given IP range
 IPRange getIPRange(java.lang.String rangeId)
          Get the IPRange with the given id.
 IPRange[] getIPRanges()
          Get all IP ranges.
protected  java.lang.String getSuffix()
          Returns the file extension to be used.
static FileIPRangeManager instance(java.io.File configurationDirectory)
          Describe instance method here.
 void remove(IPRange range)
          Remove the given IP range
 
Methods inherited from class org.apache.lenya.ac.file.FileItemManager
add, addItemManagerListener, contains, getConfigurationDirectory, getFileFilter, getItem, getItemClass, getItemConfiguration, getItems, loadItem, loadItems, notifyAdded, notifyRemoved, remove, removeItem, removeItemManagerListener, update
 
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, removeItemManagerListener
 

Field Detail

SUFFIX

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

FileIPRangeManager

protected FileIPRangeManager(java.io.File configurationDirectory)
                      throws AccessControlException
Ctor.

Parameters:
configurationDirectory - The configuration directory.
Throws:
AccessControlException - when something went wrong.
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(java.io.File configurationDirectory)
                                   throws AccessControlException
Describe instance method here.

Parameters:
configurationDirectory - a directory
Returns:
an IPRangeManager value
Throws:
AccessControlException - if an error occurs

getIPRanges

public IPRange[] getIPRanges()
Get all IP ranges.

Specified by:
getIPRanges in interface IPRangeManager
Returns:
an array of IP ranges.

add

public void add(IPRange range)
         throws AccessControlException
Add the given IP range

Specified by:
add in interface IPRangeManager
Parameters:
range - IP range that is to be added
Throws:
AccessControlException - when the notification failed.

remove

public void remove(IPRange range)
            throws AccessControlException
Remove the given IP range

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

getIPRange

public IPRange getIPRange(java.lang.String rangeId)
Get the IPRange with the given id.

Specified by:
getIPRange in interface 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 © 1999-2005 Apache Software Foundation. All Rights Reserved.