|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.foxsmart.csu.config.CiscoRouterConfigParser
com.foxsmart.csu.config.CiscoRouterConfigComponent
com.foxsmart.csu.config.global.IpAccessListComponent
public class IpAccessListComponent
The IpAccessListComponent class represents all the named access lists defined on the router.
| Field Summary | |
|---|---|
static java.lang.String |
ACCESS_LIST
|
static java.lang.String |
EXTENDED
|
static java.lang.String |
EXTENDED_TYPE
Extended Access List Type |
static java.lang.String |
INTERVAL
|
static java.lang.String |
IP
|
static java.lang.String |
LOG_UPDATE
|
static java.lang.String |
LOGGING
|
static java.lang.Integer |
MAX_LOG_UPDATE_THRESHOLD_HITS
Maximum log update threshold number of hits |
static java.lang.Integer |
MAX_LOGGING_INTERVAL_MILLIS
Maximum logging interval |
static java.lang.Integer |
MIN_LOG_UPDATE_THRESHOLD_HITS
Minimum log update threshold number of hits |
static java.lang.Integer |
MIN_LOGGING_INTERVAL_MILLIS
Minimum logging interval in milliseconds |
static java.lang.String |
STANDARD
|
static java.lang.String |
STANDARD_TYPE
Standard Access List Type |
static java.lang.String |
THRESHOLD
|
| Fields inherited from class com.foxsmart.csu.config.CiscoRouterConfigComponent |
|---|
commentComponent, componentMap, log, parentComponent |
| Fields inherited from class com.foxsmart.csu.config.CiscoRouterConfigParser |
|---|
NO, tokenIndex |
| Constructor Summary | |
|---|---|
IpAccessListComponent()
Constructs an IP access list component object. |
|
| Method Summary | |
|---|---|
void |
addAccessListEntry(NameAccessListEntry accessListEntry)
Adds an access list entry. |
java.util.List |
buildFromIos(java.util.List configLines)
Parse and populate the specific CiscoRouterComponent object based on the passed in individual lines of the IOS configuration. |
void |
clearAccessListEntries(java.lang.String accessListName)
Removes any previously added name access lists etnries for the specified access list name. |
void |
disableAccessList(java.lang.String name)
Disables an access list name. |
void |
enableAccessList(java.lang.String name,
java.lang.String type)
Enables an access list name and specifies its type. |
Commands |
generateDeleteIos(CiscoRouterConfig updatedCiscoRouterConfig)
Generates the IOS configuration commands to delete this component. |
Commands |
generateIos()
Returns the IOS configuration commands for this component. |
protected Commands |
generateMultiLineUpdateConfiglet(CiscoRouterConfigComponent origComponent)
Generates the IOS commands that will handle the updating of a multi-line component. |
java.util.List |
getAccessListEntries(java.lang.String accessListName)
Returns a list of NameAccessListEntry object that have been added so far based on the specified access list name. |
java.lang.String |
getAccessListType(java.lang.String name)
Returns the access list type (i.e. |
java.lang.Integer |
getLoggingInterval()
Gets the logging interval. |
java.lang.Integer |
getLogUpdateThreshold()
Gets the log update threshold. |
boolean |
isAccessListEnabled(java.lang.String name)
Returns whether the specified access list name is enabled or not. |
void |
setLoggingInterval(java.lang.Integer loggingInterval)
Sets the logging interval in milliseconds. |
void |
setLogUpdateThreshold(java.lang.Integer logUpdateThreshold)
Sets the log update threshold number of hits. |
void |
validate()
Validates this object to ensure it contains a valid IOS configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String IP
public static final java.lang.String ACCESS_LIST
public static final java.lang.String LOGGING
public static final java.lang.String LOG_UPDATE
public static final java.lang.String INTERVAL
public static final java.lang.String THRESHOLD
public static final java.lang.String STANDARD
public static final java.lang.String EXTENDED
public static final java.lang.String STANDARD_TYPE
public static final java.lang.String EXTENDED_TYPE
public static final java.lang.Integer MIN_LOGGING_INTERVAL_MILLIS
public static final java.lang.Integer MAX_LOGGING_INTERVAL_MILLIS
public static final java.lang.Integer MIN_LOG_UPDATE_THRESHOLD_HITS
public static final java.lang.Integer MAX_LOG_UPDATE_THRESHOLD_HITS
| Constructor Detail |
|---|
public IpAccessListComponent()
| Method Detail |
|---|
public void addAccessListEntry(NameAccessListEntry accessListEntry)
throws InvalidConfigurationException
accessListEntry - The name access list entry.
InvalidConfigurationException - if the access list doesn't have a name set.
public void enableAccessList(java.lang.String name,
java.lang.String type)
throws InvalidConfigurationException
name - The access list nametype - The access list type. Must be STANDARD_TYPE or EXTENDED_TYPE.
InvalidConfigurationException - if the name or type are invalid.public void disableAccessList(java.lang.String name)
name - The access list name.public boolean isAccessListEnabled(java.lang.String name)
name - The access list name to check.
public java.lang.String getAccessListType(java.lang.String name)
name - The access list name.
public java.util.List getAccessListEntries(java.lang.String accessListName)
accessListName - The access list name to get the access list entries from.
public void clearAccessListEntries(java.lang.String accessListName)
accessListName - The access list name to remove all access lists entries from.public void setLoggingInterval(java.lang.Integer loggingInterval)
loggingInterval - The logging interval.public java.lang.Integer getLoggingInterval()
public void setLogUpdateThreshold(java.lang.Integer logUpdateThreshold)
logUpdateThreshold - The log update threshold.public java.lang.Integer getLogUpdateThreshold()
public void validate()
throws InvalidConfigurationException
CiscoRouterConfigComponent
validate in class CiscoRouterConfigComponentInvalidConfigurationException - if the configuration is invalid.CiscoRouterConfigComponent
public java.util.List buildFromIos(java.util.List configLines)
throws InvalidConfigurationException
CiscoRouterConfigComponent
buildFromIos in class CiscoRouterConfigComponentconfigLines - The list of IOS configuration lines.
InvalidConfigurationException - if the IOS configuration can not be parsed for any reason.CiscoRouterConfigComponent
public Commands generateIos()
throws InvalidConfigurationException
CiscoRouterConfigComponent
generateIos in class CiscoRouterConfigComponentInvalidConfigurationException - if the IOS configuration is invalid and the IOS string can not be generated.
The validate() method is used to determine if the configuration is valid.CiscoRouterConfigComponent
public Commands generateDeleteIos(CiscoRouterConfig updatedCiscoRouterConfig)
throws InvalidConfigurationException
CiscoRouterConfigComponent
generateDeleteIos in interface MultiLineComponentgenerateDeleteIos in class CiscoRouterConfigComponentupdatedCiscoRouterConfig - the updated Cisco router configuration.
InvalidConfigurationException - if the IOS configuration is invalid and the IOS string can not be generated.
The validate() method is used to determine if the configuration is valid.MultiLineComponent
protected Commands generateMultiLineUpdateConfiglet(CiscoRouterConfigComponent origComponent)
throws InvalidConfigurationException
CiscoRouterConfigComponent
generateMultiLineUpdateConfiglet in class CiscoRouterConfigComponentorigComponent - The original component.
InvalidConfigurationException - if either this or the passed in configuration are invalid.CiscoRouterConfigComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||