|
||||||||||
| 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.line.PaddingComponent
public class PaddingComponent
The padding command sets padding for specified output characters.
| Field Summary | |
|---|---|
static java.lang.Integer |
MAX_DECIMAL_EQUIVALENT_VALUE
The maximum decimal equivalent value. |
static java.lang.Integer |
MAX_NUM_NULLS
The maximum number of nulls. |
static java.lang.Integer |
MIN_DECIMAL_EQUIVALENT_VALUE
The minimum decimal equivalent value. |
static java.lang.Integer |
MIN_NUM_NULLS
The minimum number of nulls. |
static java.lang.String |
PADDING
|
| 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 | |
|---|---|
PaddingComponent()
Constructs a padding object. |
|
| Method Summary | |
|---|---|
void |
addCharacter(java.lang.String character,
java.lang.Integer numNulls)
Adds a character to be padded and the number of nulls to output. |
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 |
generateDeleteIos(CiscoRouterConfig updatedCiscoRouterConfig)
Generates the IOS configuration commands to delete this component. |
Commands |
generateIos()
Returns the IOS configuration commands for this component. |
java.util.List |
getCharacters()
Gets the list of padding characters. |
java.lang.Integer |
getNumNulls(java.lang.String character)
Gets the number of nulls to be added for the specified padding character. |
boolean |
isCharacterSupported(java.lang.String character)
Returns whether a padding character is supported. |
void |
removeAllCharacters()
Removes all padding characters. |
void |
removeCharacter(java.lang.String character)
Removes a padding character. |
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 PADDING
public static final java.lang.Integer MIN_DECIMAL_EQUIVALENT_VALUE
public static final java.lang.Integer MAX_DECIMAL_EQUIVALENT_VALUE
public static final java.lang.Integer MIN_NUM_NULLS
public static final java.lang.Integer MAX_NUM_NULLS
| Constructor Detail |
|---|
public PaddingComponent()
| Method Detail |
|---|
public void addCharacter(java.lang.String character,
java.lang.Integer numNulls)
character - The padding character.numNulls - The number of nulls to add for the padding character.public void removeCharacter(java.lang.String character)
character - The padding character to remove.public void removeAllCharacters()
public java.util.List getCharacters()
public java.lang.Integer getNumNulls(java.lang.String character)
character - The padding character.
public boolean isCharacterSupported(java.lang.String character)
character - The padding character.
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 void validate()
throws InvalidConfigurationException
CiscoRouterConfigComponent
validate in class CiscoRouterConfigComponentInvalidConfigurationException - if the configuration is invalid.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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||