Overview  Package   Class  Tree  Index 

be.lassi.ui.log
Class LogOptions

java.lang.Object
  extended by be.lassi.ui.log.LogOptions
All Implemented Interfaces:
Preferences

public class LogOptions
extends java.lang.Object
implements Preferences

Options that determine the log contents: whether or not the raw byte buffers are logged, plus a number of options per type of lanbox command (enabled, detailsEnabled and color).


Constructor Summary
LogOptions()
          Constructs a new instance.
LogOptions(java.lang.Class<?>[] classes, java.lang.String name)
          Constructs a new instance.
 
Method Summary
 void disableAll()
          Disables logging of all Lanbox commands.
 void enableAll()
          Enables logging of all lanbox commands.
 java.lang.String get(java.lang.String key)
          Gets the value of the preference with give name.
 LogOptionDetail getCommandOptions(java.lang.String classname)
          Gets the command details for a given type lanbox command.
 java.lang.String getDescription()
          Gets a textual description of of the purpose of this preferences collection.
 java.util.List<LogOptionDetail> getDetails()
          Gets the details for all types of lanbox commands.
 java.lang.String getFilename()
          Gets the name of the logfile.
 java.util.List<java.lang.String> getKeys()
          Gets the preference keys.
 java.lang.String getName()
          Gets the name of this preferences collection.
 boolean isAllDisabled()
          Indicates whether logging of all lanbox commands is disabled.
 boolean isAllEnabled()
          Indicates whether logging of all lanbox commands is enabled.
 boolean isAtLeastOneEnabled()
          Indicates whether logging of at least one lanbox command is enabled.
 boolean isRawEnabled()
          Indicates whether the raw request and response buffers of the lanbox commands should be included in the log output.
 void set(Preferences preferences)
          Copies given preferences to this preferences.
 void set(java.lang.String key, java.lang.Object value)
          Sets the value of the preference with given name.
 void setFilename(java.lang.String filename)
          Sets the name of the logfile.
 void setRawEnabled(boolean rawEnabled)
          Sets the 'rawEnabled' indicator.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogOptions

public LogOptions()
Constructs a new instance.


LogOptions

public LogOptions(java.lang.Class<?>[] classes,
                  java.lang.String name)
Constructs a new instance.

Parameters:
classes - the Lanbox command classes for which we have to maintain log option details
name - the name of these preferences
Method Detail

disableAll

public void disableAll()
Disables logging of all Lanbox commands.


enableAll

public void enableAll()
Enables logging of all lanbox commands.


get

public java.lang.String get(java.lang.String key)
Gets the value of the preference with give name.

Specified by:
get in interface Preferences
Parameters:
key - the preference name
Returns:
the preference value

getCommandOptions

public LogOptionDetail getCommandOptions(java.lang.String classname)
Gets the command details for a given type lanbox command.

Parameters:
classname - the name of the class that implements the lanbox command
Returns:
the command details for given type of lanbox command

getDescription

public java.lang.String getDescription()
Gets a textual description of of the purpose of this preferences collection.

Specified by:
getDescription in interface Preferences
Returns:
textual description of preferences

getDetails

public java.util.List<LogOptionDetail> getDetails()
Gets the details for all types of lanbox commands.

Returns:
the lanbox command details

getFilename

public java.lang.String getFilename()
Gets the name of the logfile.

Returns:
the name of the logfile

getKeys

public java.util.List<java.lang.String> getKeys()
Gets the preference keys.

Specified by:
getKeys in interface Preferences
Returns:
the preference keys

getName

public java.lang.String getName()
Gets the name of this preferences collection.

Specified by:
getName in interface Preferences
Returns:
the preferences collection name

isAllDisabled

public boolean isAllDisabled()
Indicates whether logging of all lanbox commands is disabled.

Returns:
true if all lanbox commands are disabled

isAllEnabled

public boolean isAllEnabled()
Indicates whether logging of all lanbox commands is enabled.

Returns:
true if all lanbox commands are enabled

isAtLeastOneEnabled

public boolean isAtLeastOneEnabled()
Indicates whether logging of at least one lanbox command is enabled.

Returns:
true if at least one lanbox command is enabled

isRawEnabled

public boolean isRawEnabled()
Indicates whether the raw request and response buffers of the lanbox commands should be included in the log output.

Returns:
true if the raw buffers should be included in the log

set

public void set(Preferences preferences)
Description copied from interface: Preferences
Copies given preferences to this preferences.

Specified by:
set in interface Preferences
Parameters:
preferences - preferences to be copied to this preferences

set

public void set(java.lang.String key,
                java.lang.Object value)
Sets the value of the preference with given name.

Specified by:
set in interface Preferences
Parameters:
key - the preference name
value - the preference value

setFilename

public void setFilename(java.lang.String filename)
Sets the name of the logfile.

Parameters:
filename - the name of the logfile

setRawEnabled

public void setRawEnabled(boolean rawEnabled)
Sets the 'rawEnabled' indicator.

Parameters:
rawEnabled - true if the raw buffers should be included in the log

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2