com.foxsmart.csu.config.global
Class Timestamps

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

public class Timestamps
extends CiscoRouterConfigParser

The Timestamps class represents timestamp configurations. A timestamp must be either datetime OR uptime. When one is used, the other is not.

See Also:
Serialized Form

Field Summary
static java.lang.String DATETIME
           
static java.lang.String LOCALTIME
           
static java.lang.String MSEC
           
static java.lang.String SHOW_TIMEZONE
           
static java.lang.String UPTIME
           
 
Fields inherited from class com.foxsmart.csu.config.CiscoRouterConfigParser
log, NO, tokenIndex
 
Constructor Summary
Timestamps()
          Constructs a Timestamps object.
 
Method Summary
 java.lang.String generateIos()
          Generates the IOS associated with the Timestamps.
 boolean getDateTime()
          Gets whether the timestamp format is datetime.
 boolean getLocalTime()
          Gets the local time flag.
 boolean getMsec()
          Gets the milliseconds flag.
 boolean getShowTimezone()
          Gets the show timezone flag.
 boolean getUpTime()
          Gets whether the timestamp format is uptime.
 void setDateTime()
          Sets the timestamp to use datetime.
 void setLocalTime(boolean localTime)
          Sets the local time flag.
 void setMsec(boolean msec)
          Sets the milliseconds flag.
 void setShowTimezone(boolean showTimezone)
          Sets the show timezone flag.
 void setUpTime()
          Sets the timestamp to use uptime.
 
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

DATETIME

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

LOCALTIME

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

MSEC

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

SHOW_TIMEZONE

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

UPTIME

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

Timestamps

public Timestamps()
Constructs a Timestamps object. By default, timestamps are set to uptime.

Method Detail

setDateTime

public void setDateTime()
Sets the timestamp to use datetime.


setUpTime

public void setUpTime()
Sets the timestamp to use uptime.


getDateTime

public boolean getDateTime()
Gets whether the timestamp format is datetime.

Returns:
True if datetime or false if not.

getUpTime

public boolean getUpTime()
Gets whether the timestamp format is uptime.

Returns:
True if uptime or false if not.

setLocalTime

public void setLocalTime(boolean localTime)
Sets the local time flag. If true, the local timezone will be used for timestamps. This flag only applies for datetime timestamps.

Parameters:
localTime - The local time flag.

getLocalTime

public boolean getLocalTime()
Gets the local time flag. This flag only applies for datetime timestamps.

Returns:
The local time flag.

setMsec

public void setMsec(boolean msec)
Sets the milliseconds flag. If true, milliseconds will be included in timestamps. This flag only applies for datetime timestamps.

Parameters:
msec - The milliseconds flag.

getMsec

public boolean getMsec()
Gets the milliseconds flag. This flag only applies for datetime timestamps.

Returns:
The milliseconds flag.

setShowTimezone

public void setShowTimezone(boolean showTimezone)
Sets the show timezone flag. If true, timezone information will be added to the timestamp. This flag only applies for datetime timestamps.

Parameters:
showTimezone - The show timezone flag.

getShowTimezone

public boolean getShowTimezone()
Gets the show timezone flag. This flag only applies for datetime timestamps.

Returns:
The show timezone flag.

generateIos

public java.lang.String generateIos()
Generates the IOS associated with the Timestamps.

Returns:
the generated IOS.


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