|
||||||||||
| 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.LineComponent
public class LineComponent
The Line class represents a terminal line. All attributes of the line are stored as child components.
| Field Summary | |
|---|---|
static java.lang.String |
AUX
|
static java.lang.String |
CON
|
static java.lang.String |
CONSOLE
|
static java.lang.String |
LINE
|
static java.lang.String |
TTY
|
static java.lang.String |
VTY
|
| 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 | |
|---|---|
LineComponent()
Constructs a line 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. |
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.Integer |
getFirstLine()
Gets the first line. |
java.lang.Integer |
getLastLine()
Gets the last line. |
java.lang.String |
getLineType()
Gets the line type. |
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. |
boolean |
requiresCommentSeparator()
Determines if a comment separator should be generated between the various instances of this component when generateIos is called and more than one component of this type exists. |
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 |
setFirstLine(java.lang.Integer firstLine)
Sets the first line. |
void |
setLastLine(java.lang.Integer lastLine)
Sets the last line. |
void |
setLineType(java.lang.String lineType)
Sets the line type. |
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. |
void |
validate(boolean validateChildren)
Validates this component. |
| 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 LINE
public static final java.lang.String AUX
public static final java.lang.String CON
public static final java.lang.String CONSOLE
public static final java.lang.String TTY
public static final java.lang.String VTY
| Constructor Detail |
|---|
public LineComponent()
| Method Detail |
|---|
public static void setPackagesStatic(java.util.List packages)
packages - the list of packagespublic static java.util.List getPackagesStatic()
public java.util.List getPackages()
CompositeComponent
getPackages in interface CompositeComponentCompositeComponent.getPackages()public static void setChildComponentKeysStatic(java.util.List componentKeys)
componentKeys - the child component keys.public static java.util.List getChildComponentKeysStatic()
public java.util.List getChildComponentKeys()
CompositeComponent
getChildComponentKeys in interface CompositeComponentCompositeComponent.getChildComponentKeys()public static void setChildComponentUpdateKeysStatic(java.util.List componentUpdateKeys)
componentUpdateKeys - the child component keys.public static java.util.List getChildComponentUpdateKeysStatic()
public java.util.List getChildComponentUpdateKeys()
CompositeComponent
getChildComponentUpdateKeys in interface CompositeComponentCompositeComponent.getChildComponentUpdateKeys()public void setLineType(java.lang.String lineType)
lineType - The line type.public java.lang.String getLineType()
public void setFirstLine(java.lang.Integer firstLine)
firstLine - The first line.public java.lang.Integer getFirstLine()
public void setLastLine(java.lang.Integer lastLine)
lastLine - The last line.public java.lang.Integer getLastLine()
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 void validate(boolean validateChildren)
throws InvalidConfigurationException
validateChildren - If true, the children will be validated also. If false, only this component and no
children will be validated.
InvalidConfigurationException - if any configuration errors are present.
public java.lang.String generateHeaderIos()
throws InvalidConfigurationException
CompositeComponent
generateHeaderIos in interface CompositeComponentInvalidConfigurationException - 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.CompositeComponent
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 boolean equalsComponentInstance(CiscoRouterConfigComponent component)
throws InvalidConfigurationException
equalsComponentInstance in interface MultiInstanceComponentcomponent - The component to compare to this component.
InvalidConfigurationException - if either this or the passed in component aren't valid.public boolean requiresCommentSeparator()
CiscoRouterConfigComponent
requiresCommentSeparator in interface MultiInstanceComponentrequiresCommentSeparator in class CiscoRouterConfigComponentCiscoRouterConfigComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||