IBM Rational Functional Tester
Version 8.2.1
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.services
Class LogMessageAdapter

java.lang.Object
  extended by com.rational.test.ft.services.LogMessageAdapter
All Implemented Interfaces:
ILogMessage

public class LogMessageAdapter
extends java.lang.Object
implements ILogMessage

The base implementation of the log message.


Constructor Summary
LogMessageAdapter()
          Create a log message with default values.
LogMessageAdapter(int resultCode)
          Create a log message with a specified status.
LogMessageAdapter(int resultCode, int eventCode)
          Create a log message with a specified status and event.
LogMessageAdapter(int resultCode, int eventCode, java.lang.String headline)
          Create a log message with a specified status, event, and brief message.
 
Method Summary
 int getEvent()
          Returns the event code (e.g.
 java.lang.String getEventSubType()
          Return the Event Sub Type
 java.lang.String getHeadline()
          Returns the simple (one line) headline of the message being specified.
 java.util.Vector<LogMessageProperty> getProperties()
          Return the properties of this message.
 java.lang.Object getPropertyValue(java.lang.String name)
          Returns the value of one piece of detailed information from the message.
 int getResult()
          Returns the message status (e.g.
 void maskProperty(java.lang.String name)
          Mask a property.
 void setCustomProperty(java.lang.String name, java.util.HashMap<java.lang.String,java.lang.String> value)
          Sets one piece of detailed custom information into the message.
 void setEvent(int eventCode)
          Set the event code (e.g.
 void setEventSubType(java.lang.String eventSubType)
          Set the event Sub Type
 void setHeadline(java.lang.String headline)
          Set a simple (one line) headline of the message being specified.
 void setProperty(LogMessageProperty property)
          Set one piece of detailed information into the message.
 void setProperty(java.lang.String name, java.lang.Object value)
          Set one piece of detailed information into the message.
 void setResult(int resultCode)
          Set the message status (e.g.
 java.lang.String toString()
           
 void unMaskProperty(java.lang.String name)
          Unmask a property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogMessageAdapter

public LogMessageAdapter()
Create a log message with default values.


LogMessageAdapter

public LogMessageAdapter(int resultCode)
Create a log message with a specified status.

Parameters:
resultCode - The message status (e.g. success)

LogMessageAdapter

public LogMessageAdapter(int resultCode,
                         int eventCode)
Create a log message with a specified status and event.

Parameters:
resultCode - The message status (e.g. success)
eventCode - The message event (e.g. script start)

LogMessageAdapter

public LogMessageAdapter(int resultCode,
                         int eventCode,
                         java.lang.String headline)
Create a log message with a specified status, event, and brief message.

Parameters:
resultCode - The message status (e.g. success)
eventCode - The message event (e.g. script start)
headline - A simple (one line) headline of the message being specified.
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setResult

public void setResult(int resultCode)
Set the message status (e.g. error, warning). This is one of the ILOG.LOG_ codes.

Specified by:
setResult in interface ILogMessage
Parameters:
resultCode - The message status (e.g. success)
See Also:
ISimpleLog.LOG_FAILURE, ISimpleLog.LOG_PASS, ISimpleLog.LOG_WARNING, ISimpleLog.LOG_INFORMATION

getResult

public int getResult()
Returns the message status (e.g. error, warning). This is one of the ILOG.LOG_ codes.

Specified by:
getResult in interface ILogMessage
Returns:
The message status (e.g. success)
See Also:
ISimpleLog.LOG_FAILURE, ISimpleLog.LOG_PASS, ISimpleLog.LOG_WARNING, ISimpleLog.LOG_INFORMATION

setEvent

public void setEvent(int eventCode)
Set the event code (e.g. script start, verification point). This is one of the ILOG.EVENT_ codes.

Specified by:
setEvent in interface ILogMessage
Parameters:
eventCode - The message event (e.g. script start)
See Also:
ISimpleLog.EVENT_SCRIPT_START, ISimpleLog.EVENT_SCRIPT_END, ISimpleLog.EVENT_VP, ISimpleLog.EVENT_GENERAL

getEvent

public int getEvent()
Returns the event code (e.g. script start, verification point). This is one of the ILOG.EVENT_ codes.

Specified by:
getEvent in interface ILogMessage
Returns:
The message event (e.g. script start)
See Also:
ISimpleLog.EVENT_SCRIPT_START, ISimpleLog.EVENT_SCRIPT_END, ISimpleLog.EVENT_VP, ISimpleLog.EVENT_GENERAL

setHeadline

public void setHeadline(java.lang.String headline)
Set a simple (one line) headline of the message being specified.

Specified by:
setHeadline in interface ILogMessage
Parameters:
note - The simple headline.

getHeadline

public java.lang.String getHeadline()
Returns the simple (one line) headline of the message being specified.

Specified by:
getHeadline in interface ILogMessage
Returns:
The simple headline.

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Set one piece of detailed information into the message. Detailed information is specified with name/value pairs.

Specified by:
setProperty in interface ILogMessage
Parameters:
name - The name of the piece of information.
value - The value of the piece of information.

setCustomProperty

public void setCustomProperty(java.lang.String name,
                              java.util.HashMap<java.lang.String,java.lang.String> value)
Sets one piece of detailed custom information into the message. Detailed information is specified by using name/value HashMap pairs

Specified by:
setCustomProperty in interface ILogMessage
Parameters:
name - The name of the information
value - The value of the information contained in a Hashmap

maskProperty

public void maskProperty(java.lang.String name)
Mask a property. The property masked is not persisted in the logs.

Specified by:
maskProperty in interface ILogMessage
Parameters:
name -

unMaskProperty

public void unMaskProperty(java.lang.String name)
Unmask a property. If a property is masked it is not persisted in the logs.

Parameters:
name -

setProperty

public void setProperty(LogMessageProperty property)
Set one piece of detailed information into the message.

Parameters:
property - A name/value pair
See Also:
LogMessageProperty

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String name)
Returns the value of one piece of detailed information from the message.

Specified by:
getPropertyValue in interface ILogMessage
Parameters:
name - The name of the piece of information.
Returns:
The value of the named piece of information. The null value is returned if the name is not found.

getProperties

public java.util.Vector<LogMessageProperty> getProperties()
Return the properties of this message.

Specified by:
getProperties in interface ILogMessage
Returns:
The log message properties. Null is returned if there are no properties.

getEventSubType

public java.lang.String getEventSubType()
Return the Event Sub Type

Specified by:
getEventSubType in interface ILogMessage
Returns:
the String

setEventSubType

public void setEventSubType(java.lang.String eventSubType)
Set the event Sub Type

Parameters:
eventSubType -