com.foxsmart.csu.config.global.line
Class LineEncryptionPassword

java.lang.Object
  extended by com.foxsmart.csu.config.CiscoRouterConfigParser
      extended by com.foxsmart.csu.config.global.line.LineEncryptionPassword
All Implemented Interfaces:
java.io.Serializable

public class LineEncryptionPassword
extends CiscoRouterConfigParser

A class to store a line password along with its encryption type.

See Also:
Serialized Form

Field Summary
static int ENCRYPTION_TYPE_0
          Encryption Type 0 is an unencrypted password.
static int ENCRYPTION_TYPE_7
          Encryption Type 7 is a weakly encrypted pasword.
 
Fields inherited from class com.foxsmart.csu.config.CiscoRouterConfigParser
log, NO, tokenIndex
 
Constructor Summary
LineEncryptionPassword()
          Default constructor.
 
Method Summary
 int getEncryptionType()
          Gets the encryption type.
 java.lang.String getPassword()
          Gets the password.
 void setEncryptionType(int encryptionType)
          Sets the encryption type.
 void setPassword(java.lang.String password)
          Sets the password.
 
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

ENCRYPTION_TYPE_0

public static final int ENCRYPTION_TYPE_0
Encryption Type 0 is an unencrypted password.

See Also:
Constant Field Values

ENCRYPTION_TYPE_7

public static final int ENCRYPTION_TYPE_7
Encryption Type 7 is a weakly encrypted pasword.

See Also:
Constant Field Values
Constructor Detail

LineEncryptionPassword

public LineEncryptionPassword()
Default constructor. Password will be null and the encryption type will be ENCRYPTION_TYPE_0.

Method Detail

setPassword

public void setPassword(java.lang.String password)
Sets the password. If the encryption type is not 0, then the password specified here should already be encrypted. If not properly encrypted, a configuration update will fail.

Parameters:
password - The password.

getPassword

public java.lang.String getPassword()
Gets the password.

Returns:
The password.

setEncryptionType

public void setEncryptionType(int encryptionType)
                       throws InvalidConfigurationException
Sets the encryption type. The encryption type must be one of the encryption type constants defined at the top of this file or their numeric equivalent (i.e. 0 or 7).

Parameters:
encryptionType - The encryption type.
Throws:
InvalidConfigurationException - if the encryption type is invalid.

getEncryptionType

public int getEncryptionType()
Gets the encryption type.

Returns:
The encryption type.


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