com.foxsmart.csu.config.global.classmap
Class MatchComponent

java.lang.Object
  extended by com.foxsmart.csu.config.CiscoRouterConfigParser
      extended by com.foxsmart.csu.config.CiscoRouterConfigComponent
          extended by com.foxsmart.csu.config.global.classmap.MatchComponent
All Implemented Interfaces:
java.io.Serializable

public class MatchComponent
extends CiscoRouterConfigComponent

The match command specified the match classification criteria.

See Also:
Serialized Form

Field Summary
static java.lang.String ACCESS_GROUP
           
static java.lang.String ANY
           
static java.lang.String CLASS_MAP
           
static java.lang.String COS
           
static java.lang.String DESTINATION_ADDRESS
           
static java.lang.String DSCP
           
static java.lang.String EXPERIMENTAL
           
static java.lang.String INPUT_INTERFACE
           
static java.lang.String IP
           
static java.lang.String MAC
           
static java.lang.String MATCH
           
static java.lang.String MPLS
           
static java.lang.String NAME
           
static java.lang.String NONE
           
static java.lang.String NOT
           
static java.lang.String PRECEDENCE
           
static java.lang.String PROTOCOL
           
static java.lang.String QOS_GROUP
           
static java.lang.String RTP
           
static java.lang.String SOURCE_ADDRESS
           
 
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
MatchComponent()
          Constructs a match component.
 
Method Summary
 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.
 Commands generateIos()
          Returns the IOS configuration commands for this component.
protected  Commands generateUpdateIos()
          Generates the update IOS commands.
 MatchInfo getMatchInfo()
          Gets the match information.
 void setMatchInfo(MatchInfo matchInfo)
          Sets the match information.
 void validate()
          Validates this object to ensure it contains a valid IOS configuration.
 
Methods inherited from class com.foxsmart.csu.config.CiscoRouterConfigComponent
addComponent, addComponent, checkComponentType, deleteOldConfigWhenUpdating, dumpComponents, generateChildrenUpdateConfiglet, generateCompositeIos, generateCompositeIos, generateDeleteIos, generateIos, generateIos, generateIos, generateMultiLineUpdateConfiglet, generateUpdateCompositeIos, generateUpdateIos, getAllComponents, getCiscoRouterConfig, getComment, getComponentClassName, getComponentClassName, getComponentKeys, getComponents, getComponents, getDeferredDelete, getFirstComponent, getFirstComponent, getParentComponent, getTotalComponents, getTotalComponents, getUpdateConfiglet, instantiateComponent, instantiateComponent, isValid, removeAllComponents, removeAllComponents, removeAllComponents, removeComponent, removeComponent, removeComponent, requiresCommentSeparator, setComment, setParentComponent, validateChildren
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MATCH

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

ACCESS_GROUP

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

MPLS

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

EXPERIMENTAL

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

NAME

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

PROTOCOL

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

INPUT_INTERFACE

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

NONE

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

ANY

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

CLASS_MAP

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

COS

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

DESTINATION_ADDRESS

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

MAC

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

IP

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

DSCP

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

PRECEDENCE

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

RTP

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

NOT

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

QOS_GROUP

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

SOURCE_ADDRESS

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

MatchComponent

public MatchComponent()
Constructs a match component.

Method Detail

setMatchInfo

public void setMatchInfo(MatchInfo matchInfo)
Sets the match information.

Parameters:
matchInfo - The match information.

getMatchInfo

public MatchInfo getMatchInfo()
Gets the match information.

Returns:
the match information.

buildFromIos

public java.util.List buildFromIos(java.util.List configLines)
                            throws InvalidConfigurationException
Description copied from class: CiscoRouterConfigComponent
Parse and populate the specific CiscoRouterComponent object based on the passed in individual lines of the IOS configuration. The passed in configuration lines should represent the first line in the configuration that applies to the specific component. The component should use all lines needed by its specific part of the configuration and return a List with the remaining lines that are not part of the component's configuration.

Specified by:
buildFromIos in class CiscoRouterConfigComponent
Parameters:
configLines - The list of IOS configuration lines.
Returns:
The rest of the lines that were not parsed by the component.
Throws:
InvalidConfigurationException - if the IOS configuration can not be parsed for any reason.
See Also:
CiscoRouterConfigComponent

validate

public void validate()
              throws InvalidConfigurationException
Description copied from class: CiscoRouterConfigComponent
Validates this object to ensure it contains a valid IOS configuration.

Specified by:
validate in class CiscoRouterConfigComponent
Throws:
InvalidConfigurationException - if the configuration is invalid.
See Also:
CiscoRouterConfigComponent

generateIos

public Commands generateIos()
                     throws InvalidConfigurationException
Description copied from class: CiscoRouterConfigComponent
Returns the IOS configuration commands for this component.

Specified by:
generateIos in class CiscoRouterConfigComponent
Returns:
The IOS configuration string as a list of Command objects. To generate a configlet from the list of Command objects, use Command.getConfiglet().
Throws:
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.
See Also:
CiscoRouterConfigComponent

generateUpdateIos

protected Commands generateUpdateIos()
                              throws InvalidConfigurationException
Generates the update IOS commands. This method is needed because the IOS statement used to update the match component with no match information (i.e. "match") is different from the view version (i.e. "match none").

Overrides:
generateUpdateIos in class CiscoRouterConfigComponent
Returns:
Command The commands to update this component.
Throws:
InvalidConfigurationException - if this component can't be updated.
See Also:
CiscoRouterConfigComponent


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