public class UserPreferences
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable
Constructor and Description |
---|
UserPreferences()
Default constructor that initializes everything to an invalid value.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object that) |
int |
compareTo(UserPreferences that) |
UserPreferences |
copy()
Return a deep copy of this.
|
boolean |
equals(java.lang.Object that) |
int |
getBufferSize()
Returns the buffer size.
|
java.lang.String |
getLogFileName()
If the user is viewing a log (getViewLog() returns true) then this is
the name of the log file being viewed, otherwise it is the name to use
when logging data for the current server.
|
long |
getLogFileSize()
Returns the maximum log file size of each log file that could be generated.
|
long |
getLoggingDuration()
Returns the logging duration.
|
java.lang.String |
getNodeName()
Returns the node name.
|
int |
getNumLogFiles()
Returns the number of log files that can be used while logging.
|
int |
getRefreshRate()
Returns the refresh rate that this user has requested.
|
java.lang.String |
getServerName()
Returns the server name.
|
java.lang.String |
getTpvLogFormat()
Returns the tpv log format
|
java.lang.String |
getUserId()
Returns this user's id.
|
boolean |
getViewLog()
Returns true if viewing a log
|
int |
hashCode() |
static boolean |
isValid(int i)
Check if the integer is a valid UserPreferences value
|
static boolean |
isValid(long l)
Check if the long is a valid UserPreferences value
|
static boolean |
isValid(java.lang.String s)
Check if the String is a valid UserPreferences value
|
void |
setBufferSize(int i)
Sets the number of entries to store in the buffer
|
void |
setLogFileName(java.lang.String logFileName)
If the user is viewing a log (getViewLog() returns true) then this
should set the name of the file being viewed.
|
void |
setLogFileSize(long l)
Sets the log file size.
|
void |
setLoggingDuration(long l)
Sets the logging duration.
|
void |
setNodeName(java.lang.String nodeName)
Set the node name.
|
void |
setNumLogFiles(int i)
Set the number of log files to use while logging.
|
void |
setRefreshRate(int i)
Set the refresh rate.
|
void |
setServerName(java.lang.String serverName)
Set the server name.
|
void |
setTpvLogFormat(java.lang.String logFormat)
Sets the format for the tpv log
|
void |
setUserId(java.lang.String userId)
Set the user's id.
|
void |
setViewLog(boolean bool)
Sets the viewLog status
|
java.lang.String |
toString()
Returns a String representation of the UserPreferences object
|
boolean |
update(UserPreferences up)
This method updates the UserPreferences using all valid fields in the
UserPreferences parameter.
|
public UserPreferences()
public boolean equals(java.lang.Object that)
equals
in class java.lang.Object
public int compareTo(java.lang.Object that)
compareTo
in interface java.lang.Comparable
public int compareTo(UserPreferences that)
public int getBufferSize()
public long getLogFileSize()
public long getLoggingDuration()
public java.lang.String getNodeName()
public int getNumLogFiles()
public int getRefreshRate()
public java.lang.String getServerName()
public java.lang.String getUserId()
public boolean getViewLog()
public void setBufferSize(int i)
Size
- of the bufferpublic void setLogFileSize(long l)
Size
- an individual log file can grow to in bytespublic void setLoggingDuration(long l)
l
- Number of seconds logging will continue once activatedpublic void setNodeName(java.lang.String nodeName)
nodeName
- Name of the nodepublic void setNumLogFiles(int i)
i
- Number of log files to use while loggingpublic void setRefreshRate(int i)
i
- Number seconds between requests for new datapublic void setServerName(java.lang.String serverName)
serverName
- Name of the serverpublic void setUserId(java.lang.String userId)
userId
- Id the user used to login to the admin consolepublic java.lang.String getLogFileName()
public void setLogFileName(java.lang.String logFileName)
logFileName
- Name of log file being viewed, or name of file to record topublic void setViewLog(boolean bool)
bool
- True if viewing a log, else falsepublic static final boolean isValid(int i)
i
- Integer to checkpublic static final boolean isValid(long l)
l
- Long to checkpublic static final boolean isValid(java.lang.String s)
s
- String to checkpublic boolean update(UserPreferences up)
up
- UserPreferences to use when updating this objectpublic UserPreferences copy()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getTpvLogFormat()
public void setTpvLogFormat(java.lang.String logFormat)
logFormat
-