com.foxsmart.csu.config.global.policymap.classmap
Class BandwidthValue

java.lang.Object
  extended by com.foxsmart.csu.config.CiscoRouterConfigParser
      extended by com.foxsmart.csu.config.global.policymap.classmap.BandwidthValue
All Implemented Interfaces:
Bandwidth, java.io.Serializable

public class BandwidthValue
extends CiscoRouterConfigParser
implements Bandwidth

The BandwidthValue class represents a bandwidth in Kbps.

See Also:
Serialized Form

Field Summary
static java.lang.Integer MAX_BANDWIDTH_KBPS
          The maximum bandwidth in Kbps.
static java.lang.Integer MIN_BANDWIDTH_KBPS
          The minimum bandwidth in Kbps.
 
Fields inherited from class com.foxsmart.csu.config.CiscoRouterConfigParser
log, NO, tokenIndex
 
Constructor Summary
BandwidthValue()
          Constructs a bandwidth value object.
 
Method Summary
 java.lang.String generateDeleteIos(CiscoRouterConfig updatedCiscoRouterConfig)
           
 java.lang.String generateIos()
           
 java.lang.Integer getBandwidth()
          Gets the bandwidth value.
 void setBandwidth(java.lang.Integer bandwidth)
          Sets the bandwidth value in Kbps.
 void validate()
           
 
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

MIN_BANDWIDTH_KBPS

public static final java.lang.Integer MIN_BANDWIDTH_KBPS
The minimum bandwidth in Kbps.


MAX_BANDWIDTH_KBPS

public static final java.lang.Integer MAX_BANDWIDTH_KBPS
The maximum bandwidth in Kbps.

Constructor Detail

BandwidthValue

public BandwidthValue()
Constructs a bandwidth value object.

Method Detail

setBandwidth

public void setBandwidth(java.lang.Integer bandwidth)
Sets the bandwidth value in Kbps. Valid values are from 8-2000000.

Specified by:
setBandwidth in interface Bandwidth
Parameters:
bandwidth - The bandwidth.

getBandwidth

public java.lang.Integer getBandwidth()
Gets the bandwidth value.

Specified by:
getBandwidth in interface Bandwidth
Returns:
the bandwidth value.

validate

public void validate()
              throws InvalidConfigurationException
Specified by:
validate in interface Bandwidth
Throws:
InvalidConfigurationException - if the configuration is invalid.
See Also:
CiscoRouterConfigComponent

generateIos

public java.lang.String generateIos()
                             throws InvalidConfigurationException
Specified by:
generateIos in interface Bandwidth
Returns:
the generated IOS configuration for this "component".
Throws:
InvalidConfigurationException - if the configuration is invalid.
See Also:
CiscoRouterConfigComponent

generateDeleteIos

public java.lang.String generateDeleteIos(CiscoRouterConfig updatedCiscoRouterConfig)
                                   throws InvalidConfigurationException
Specified by:
generateDeleteIos in interface Bandwidth
Parameters:
updatedCiscoRouterConfig - the updated Cisco router configuration.
Returns:
the generated IOS to delete this "component".
Throws:
InvalidConfigurationException - if the configuration is invalid.
See Also:
MultiLineComponent


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