com.foxsmart.csu.config.global
Class MapClassAtmComponent

java.lang.Object
  extended by com.foxsmart.csu.config.CiscoRouterConfigParser
      extended by com.foxsmart.csu.config.CiscoRouterConfigComponent
          extended by com.foxsmart.csu.config.global.MapClassAtmComponent
All Implemented Interfaces:
CompositeComponent, MultiInstanceComponent, java.io.Serializable

public class MapClassAtmComponent
extends CiscoRouterConfigComponent
implements CompositeComponent, MultiInstanceComponent

The Map Class Atm class represents an Asynchronous Transfer Mode static map class. Any attributes of the map class atm are stored as child components.

See Also:
Serialized Form

Field Summary
static java.lang.String ATM
           
static java.lang.String MAP_CLASS
           
 
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
MapClassAtmComponent()
          Constructs a map class atm object.
 
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.
 boolean equalsComponentInstance(CiscoRouterConfigComponent component)
          Determines if this component and the passed in component are the same instance of component that can be compared from an IOS configuration standpoint.
 java.lang.String generateHeaderIos()
          Returns the header IOS configuration string for this component.
 Commands generateIos()
          Returns the IOS configuration commands for this component.
protected  Commands generateUpdateIos()
          Generates the IOS commands that will handle the updating of this component.
 java.util.List getChildComponentKeys()
          Returns the list of child keys of this composite component.
static java.util.List getChildComponentKeysStatic()
          Gets the child component keys via a static convenience method.
 java.util.List getChildComponentUpdateKeys()
          Returns the list of child keys of this composite component.
static java.util.List getChildComponentUpdateKeysStatic()
          Gets the child component update keys via a static convenience method.
 java.lang.String getName()
          Gets the map class atm name.
 java.util.List getPackages()
          Gets a list of the packages used to instantiate components (e.g.
static java.util.List getPackagesStatic()
          Gets the child component keys via a static convenience method.
static void setChildComponentKeysStatic(java.util.List componentKeys)
          Sets the child component keys for this component via a static convenience method.
static void setChildComponentUpdateKeysStatic(java.util.List componentUpdateKeys)
          Sets the child component update keys for this component via a static convenience method.
 void setName(java.lang.String name)
          Sets the map class atm name.
static void setPackagesStatic(java.util.List packages)
          Sets the packages for this component via a static convenience method.
 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
 
Methods inherited from interface com.foxsmart.csu.config.MultiInstanceComponent
requiresCommentSeparator
 

Field Detail

MAP_CLASS

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

ATM

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

MapClassAtmComponent

public MapClassAtmComponent()
Constructs a map class atm object.

Method Detail

setPackagesStatic

public static void setPackagesStatic(java.util.List packages)
Sets the packages for this component via a static convenience method.

Parameters:
packages - the list of packages

getPackagesStatic

public static java.util.List getPackagesStatic()
Gets the child component keys via a static convenience method.

Returns:
the child component keys.

getPackages

public java.util.List getPackages()
Description copied from interface: CompositeComponent
Gets a list of the packages used to instantiate components (e.g. "com.foxsmart.csu.config"). The packages will be used in the order they are listed.

Specified by:
getPackages in interface CompositeComponent
Returns:
the packages.
See Also:
CompositeComponent.getPackages()

setChildComponentKeysStatic

public static void setChildComponentKeysStatic(java.util.List componentKeys)
Sets the child component keys for this component via a static convenience method.

Parameters:
componentKeys - the child component keys.

getChildComponentKeysStatic

public static java.util.List getChildComponentKeysStatic()
Gets the child component keys via a static convenience method.

Returns:
the child component keys.

getChildComponentKeys

public java.util.List getChildComponentKeys()
Description copied from interface: CompositeComponent
Returns the list of child keys of this composite component. The keys are stored in the order that they should be processed for generating IOS statements. Class objects (e.g. Length.class) should be used for supported components while strings (e.g. "ip") should be used for unsupported components.

Specified by:
getChildComponentKeys in interface CompositeComponent
Returns:
The list of child component keys for generating IOS statements.
See Also:
CompositeComponent.getChildComponentKeys()

setChildComponentUpdateKeysStatic

public static void setChildComponentUpdateKeysStatic(java.util.List componentUpdateKeys)
Sets the child component update keys for this component via a static convenience method.

Parameters:
componentUpdateKeys - the child component keys.

getChildComponentUpdateKeysStatic

public static java.util.List getChildComponentUpdateKeysStatic()
Gets the child component update keys via a static convenience method.

Returns:
the child component update keys.

getChildComponentUpdateKeys

public java.util.List getChildComponentUpdateKeys()
Description copied from interface: CompositeComponent
Returns the list of child keys of this composite component. The keys are stored in the order that they should be processed for updating IOS statements. Class objects (e.g. Length.class) should be used for supported components while strings (e.g. "ip") should be used for unsupported components. In most cases, this list will be the same as getChildComponentKeys with the exception being when the order of updates matters and is different from the order listed in a "show configuration" router command.

Specified by:
getChildComponentUpdateKeys in interface CompositeComponent
Returns:
The list of child component keys for updating IOS statements.
See Also:
CompositeComponent.getChildComponentUpdateKeys()

setName

public void setName(java.lang.String name)
Sets the map class atm name.

Parameters:
name - The map class atm name.

getName

public java.lang.String getName()
Gets the map class atm name.

Returns:
the map class atm name.

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

generateHeaderIos

public java.lang.String generateHeaderIos()
                                   throws InvalidConfigurationException
Description copied from interface: CompositeComponent
Returns the header IOS configuration string for this component. The header is the line of IOS that is used to distinguish the parent from its children.

Specified by:
generateHeaderIos in interface CompositeComponent
Returns:
The header IOS configuration string.
Throws:
InvalidConfigurationException - if the IOS configuration is invalid and the header IOS string can not be generated. The validate() method is used to determine if the configuration is valid.
See Also:
CompositeComponent

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
Description copied from class: CiscoRouterConfigComponent
Generates the IOS commands that will handle the updating of this component. This implementation will simply delegate to generateIos. Specific components that have a different set of IOS commands to update the component than the IOS statements to view the component should override this method.

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

equalsComponentInstance

public boolean equalsComponentInstance(CiscoRouterConfigComponent component)
                                throws InvalidConfigurationException
Determines if this component and the passed in component are the same instance of component that can be compared from an IOS configuration standpoint.

Specified by:
equalsComponentInstance in interface MultiInstanceComponent
Parameters:
component - The component to compare to this component.
Returns:
True if the components are of the same instance or false if not.
Throws:
InvalidConfigurationException - if either this or the passed in component aren't valid.


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