org.apache.lenya.ac.file
Class FileIPRange
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.lenya.ac.impl.AbstractItem
org.apache.lenya.ac.impl.AbstractGroupable
org.apache.lenya.ac.impl.AbstractIPRange
org.apache.lenya.ac.file.FileIPRange
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable, org.apache.avalon.framework.logger.LogEnabled, org.apache.lenya.ac.Accreditable, org.apache.lenya.ac.Groupable, org.apache.lenya.ac.IPRange, org.apache.lenya.ac.Item
public class FileIPRange
- extends AbstractIPRange
- implements java.io.Serializable
IP range that is stored in a file.
- See Also:
- Serialized Form
Constructor Summary |
FileIPRange(org.apache.lenya.ac.ItemManager itemManager,
org.apache.avalon.framework.logger.Logger logger)
Ctor. |
FileIPRange(org.apache.lenya.ac.ItemManager itemManager,
org.apache.avalon.framework.logger.Logger logger,
java.lang.String id)
Ctor. |
Method Summary |
void |
configure(org.apache.avalon.framework.configuration.Configuration config)
|
protected org.apache.avalon.framework.configuration.Configuration |
createConfiguration()
Create a configuration from the current user details. |
protected java.io.File |
getFile()
Returns the configuration file. |
static void |
main(java.lang.String[] args)
Deprecated. This should be moved to a JUnit test. |
void |
save()
Save the IP range |
Methods inherited from class org.apache.lenya.ac.impl.AbstractIPRange |
contains, delete, getConfigurationDirectory, getNetworkAddress, getSubnetMask, isValidSubnet, setConfigurationDirectory, setNetworkAddress, setNetworkAddress, setSubnetMask, setSubnetMask |
Methods inherited from class org.apache.lenya.ac.impl.AbstractItem |
compareTo, equals, getAccreditableManager, getDescription, getId, getItemManager, getName, hashCode, setDescription, setId, setName, toString |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.lenya.ac.Accreditable |
getAccreditables |
Methods inherited from interface org.apache.lenya.ac.Item |
getDescription, getId, getItemManager, getName, setDescription, setName |
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled |
enableLogging |
Methods inherited from interface org.apache.lenya.ac.Groupable |
addedToGroup, getGroups, removedFromGroup, removeFromAllGroups |
IP_RANGE
protected static final java.lang.String IP_RANGE
- See Also:
- Constant Field Values
ELEMENT_NETWORK_ADDRESS
protected static final java.lang.String ELEMENT_NETWORK_ADDRESS
- See Also:
- Constant Field Values
ELEMENT_SUBNET_MASK
protected static final java.lang.String ELEMENT_SUBNET_MASK
- See Also:
- Constant Field Values
FileIPRange
public FileIPRange(org.apache.lenya.ac.ItemManager itemManager,
org.apache.avalon.framework.logger.Logger logger)
- Ctor.
- Parameters:
itemManager
- The item manager.logger
- The logger.
FileIPRange
public FileIPRange(org.apache.lenya.ac.ItemManager itemManager,
org.apache.avalon.framework.logger.Logger logger,
java.lang.String id)
- Ctor.
- Parameters:
itemManager
- The item manager.logger
- The logger.id
- The IP range ID.
main
public static void main(java.lang.String[] args)
- Deprecated. This should be moved to a JUnit test.
- Main method.
- Parameters:
args
- The command-line arguments.
save
public void save()
throws org.apache.lenya.ac.AccessControlException
- Description copied from class:
AbstractIPRange
- Save the IP range
- Specified by:
save
in interface org.apache.lenya.ac.IPRange
- Specified by:
save
in class AbstractIPRange
- Throws:
org.apache.lenya.ac.AccessControlException
- if the save failed- See Also:
AbstractIPRange.save()
getFile
protected java.io.File getFile()
- Returns the configuration file.
- Returns:
- A file object.
configure
public void configure(org.apache.avalon.framework.configuration.Configuration config)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Specified by:
configure
in interface org.apache.lenya.ac.Item
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
- See Also:
Item.configure(org.apache.avalon.framework.configuration.Configuration)
createConfiguration
protected org.apache.avalon.framework.configuration.Configuration createConfiguration()
- Create a configuration from the current user details. Can be used for saving.
- Returns:
- a
Configuration
Copyright © $ Apache Software Foundation. All Rights Reserved.