com.foxsmart.csu.config.global
Class AccessListEntry

java.lang.Object
  extended by com.foxsmart.csu.config.CiscoRouterConfigParser
      extended by com.foxsmart.csu.config.global.AccessListEntry
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ExtIpAccessListEntry, ExtMacAddressNumberAccessListEntry, ProtocolNumberAccessListEntry, RemarkAccessListEntry, StdIpAccessListEntry, StdMacAddressNumberAccessListEntry

public abstract class AccessListEntry
extends CiscoRouterConfigParser
implements java.io.Serializable

The AccessListEntry class represents a single access list entry on the router.

See Also:
Serialized Form

Field Summary
static java.lang.String ANY
           
static java.lang.String DENY
           
static java.lang.String FILTER_TYPE_DENY
          Deny filter type.
static java.lang.String FILTER_TYPE_PERMIT
          Permit filter type.
static java.lang.String HOST
           
static java.lang.String LOG
           
static java.lang.String LOG_INPUT
           
static java.lang.String PERMIT
           
 
Fields inherited from class com.foxsmart.csu.config.CiscoRouterConfigParser
log, NO, tokenIndex
 
Constructor Summary
AccessListEntry()
          Constructs an access list entry object.
 
Method Summary
 java.lang.Object clone()
          Clones this access list entry.
 java.lang.String getFilterType()
          Gets the filter type.
protected  boolean isAccessNumberSupported(int accessListNumber, java.util.List ranges)
          Determines whether an access list number is supported by specified ranges.
 void setFilterType(java.lang.String filterType)
          Sets the filter type.
protected  void validateAccessListName(java.lang.String name)
          Validates the access list name.
protected  void validateAccessListNumber(java.lang.Integer accessListNumber, java.util.List ranges)
          Validates the access list number.
 void validateFilterType()
          Validates the filter type.
 
Methods inherited from class com.foxsmart.csu.config.CiscoRouterConfigParser
checkExists, checkLineComplete, checkNotEmpty, checkRange, checkTokenCount, checkTokenCount, checkTokenMatch, checkTokenMatch, decrementTokenIndex, generateCommands, getBigDecimalNumberFromString, getDoubleNumberFromString, getEnum, getHexadecimalNumberFromString, getIntegerNumberFromString, getIpAddressFromString, getLine, getLongNumberFromString, getMacAddressFromString, getNextOptionalToken, getNextToken, getToken, getTokenIndex, getTokens, getTotalIndentedLines, getTotalLines, incrementTokenIndex, invalidConfiguration, invalidTokenFound, isEmpty, moreIndentedLines, moreLines, moreTokens, removeLines, resetTokenIndex, setTokenIndex, tokensLeft
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERMIT

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

DENY

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

ANY

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

HOST

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

LOG

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

LOG_INPUT

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

FILTER_TYPE_PERMIT

public static final java.lang.String FILTER_TYPE_PERMIT
Permit filter type.

See Also:
Constant Field Values

FILTER_TYPE_DENY

public static final java.lang.String FILTER_TYPE_DENY
Deny filter type.

See Also:
Constant Field Values
Constructor Detail

AccessListEntry

public AccessListEntry()
Constructs an access list entry object.

Method Detail

setFilterType

public void setFilterType(java.lang.String filterType)
Sets the filter type. Allowed types: FILTER_TYPE_PERMIT and FILTER_TYPE_DENY.

Parameters:
filterType - The filter type.

getFilterType

public java.lang.String getFilterType()
Gets the filter type.

Returns:
the filter type.

isAccessNumberSupported

protected boolean isAccessNumberSupported(int accessListNumber,
                                          java.util.List ranges)
Determines whether an access list number is supported by specified ranges.

Parameters:
accessListNumber - The access list number to check
ranges - A list of Tuple. Each tuple should contain an access list number range to check.
Returns:
True if the access list number is supported by the specified ranges or false if not.

validateAccessListNumber

protected void validateAccessListNumber(java.lang.Integer accessListNumber,
                                        java.util.List ranges)
                                 throws InvalidConfigurationException
Validates the access list number.

Parameters:
accessListNumber - The access list number to check
ranges - A list of Tuple. Each tuple should contain an access list number range to check.
Throws:
InvalidConfigurationException - if the access list number is not set or invalid.

validateAccessListName

protected void validateAccessListName(java.lang.String name)
                               throws InvalidConfigurationException
Validates the access list name.

Parameters:
name - The access list name.
Throws:
InvalidConfigurationException - if the access list name is not set.

validateFilterType

public void validateFilterType()
                        throws InvalidConfigurationException
Validates the filter type.

Throws:
InvalidConfigurationException - if the filter type is not set of invalid.

clone

public java.lang.Object clone()
Clones this access list entry.

Overrides:
clone in class java.lang.Object
Returns:
The cloned object or null if there was a problem cloning the object.


Copyright © 2005-2008 Fox Smart, Inc. All Rights Reserved.