org.apache.lenya.ac.file
Class FileIPRange

java.lang.Object
  extended by org.apache.lenya.ac.impl.AbstractItem
      extended by org.apache.lenya.ac.impl.AbstractGroupable
          extended by org.apache.lenya.ac.impl.AbstractIPRange
              extended by org.apache.lenya.ac.file.FileIPRange
All Implemented Interfaces:
java.io.Serializable, Accreditable, Groupable, IPRange, Item

public class FileIPRange
extends AbstractIPRange
implements java.io.Serializable

IP range that is stored in a file.

See Also:
Serialized Form

Field Summary
static java.lang.String ELEMENT_NETWORK_ADDRESS
           
static java.lang.String ELEMENT_SUBNET_MASK
           
static java.lang.String IP_RANGE
           
 
Constructor Summary
FileIPRange()
          Ctor.
FileIPRange(java.io.File configurationDirectory, java.lang.String id)
          Ctor.
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration config)
          Configures this item.
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 bemoved 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.AbstractGroupable
addedToGroup, getAccreditables, getGroups, removedFromGroup, removeFromAllGroups
 
Methods inherited from class org.apache.lenya.ac.impl.AbstractItem
equals, getDescription, getId, getName, hashCode, isValidId, setDescription, setId, setName, toString
 
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, getName, setDescription, setName
 
Methods inherited from interface org.apache.lenya.ac.Groupable
addedToGroup, getGroups, removedFromGroup, removeFromAllGroups
 

Field Detail

IP_RANGE

public static final java.lang.String IP_RANGE
See Also:
Constant Field Values

ELEMENT_NETWORK_ADDRESS

public static final java.lang.String ELEMENT_NETWORK_ADDRESS
See Also:
Constant Field Values

ELEMENT_SUBNET_MASK

public static final java.lang.String ELEMENT_SUBNET_MASK
See Also:
Constant Field Values
Constructor Detail

FileIPRange

public FileIPRange()
Ctor.


FileIPRange

public FileIPRange(java.io.File configurationDirectory,
                   java.lang.String id)
Ctor.

Parameters:
configurationDirectory - The configuration directory.
id - The IP range ID.
Method Detail

main

public static void main(java.lang.String[] args)
Deprecated. This should bemoved to a JUnit test.

Main method.

Parameters:
args - The command-line arguments.

save

public void save()
          throws AccessControlException
Description copied from class: AbstractIPRange
Save the IP range

Specified by:
save in class AbstractIPRange
Throws:
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
Description copied from interface: Item
Configures this item.

Specified by:
configure in interface Item
Parameters:
config - The configuration.
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - when something went wrong.
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 © 1999-2005 Apache Software Foundation. All Rights Reserved.