wt.wrmf.logs
Class LogRecord

java.lang.Object
  extended bywt.wrmf.logs.LogRecord
All Implemented Interfaces:
Externalizable, Serializable

public class LogRecord
extends Object
implements Externalizable

a record that is appended to the log. This captures an event that a service intends to report to the log. The target object is the primary business object for this event. additional name-value pairs for this event can be provided in the properties field

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  String eventName
           
static long EXTERNALIZATION_VERSION_UID
           
private  String message
           
protected static long OLD_FORMAT_VERSION_UID
           
private  String principalName
           
private  Hashtable properties
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  String serviceName
           
private  String targetClass
           
private  String targetName
           
private  String targetURL
           
private  String targetVersion
           
private  Timestamp timestamp
           
 
Constructor Summary
LogRecord()
          

Supported API: false
LogRecord(String principal, String service, String event, String target)
          

Supported API: false
LogRecord(String principal, String service, String event, String target, String targetURL, String message)
          creates a log record with current timestamp and specified parameters

Supported API: false
 
Method Summary
private  void eventNameValidate(String a_EventName)
           
 String getEventName()
          Gets the value of the attribute: eventName.
 String getMessage()
          Gets the value of the attribute: message.
 String getPrincipalName()
          Gets the value of the attribute: principalName.
 Hashtable getProperties()
          Gets the value of the attribute: properties.
 String getServiceName()
          Gets the value of the attribute: serviceName.
 String getTargetClass()
          Gets the value of the attribute: targetClass.
 String getTargetName()
          Gets the value of the attribute: targetName.
 String getTargetURL()
          Gets the value of the attribute: targetURL.
 String getTargetVersion()
          Gets the value of the attribute: targetVersion.
 Timestamp getTimestamp()
          Gets the value of the attribute: timestamp.
private  void messageValidate(String a_Message)
           
private  void principalNameValidate(String a_PrincipalName)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(LogRecord thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
private  void serviceNameValidate(String a_ServiceName)
           
 void setEventName(String a_EventName)
          Sets the value of the attribute: eventName.
 void setMessage(String a_Message)
          Sets the value of the attribute: message.
 void setPrincipalName(String a_PrincipalName)
          Sets the value of the attribute: principalName.
 void setProperties(Hashtable a_Properties)
          Sets the value of the attribute: properties.
 void setProperty(String name, String value)
          adds the property name-value pair as an additional property for this log record

Supported API: false
 void setServiceName(String a_ServiceName)
          Sets the value of the attribute: serviceName.
 void setTargetClass(String a_TargetClass)
          Sets the value of the attribute: targetClass.
 void setTargetName(String a_TargetName)
          Sets the value of the attribute: targetName.
 void setTargetURL(String a_TargetURL)
          Sets the value of the attribute: targetURL.
 void setTargetVersion(String a_TargetVersion)
          Sets the value of the attribute: targetVersion.
 void setTimestamp(Timestamp a_Timestamp)
          Sets the value of the attribute: timestamp.
private  void targetClassValidate(String a_TargetClass)
           
private  void targetNameValidate(String a_TargetName)
           
private  void targetURLValidate(String a_TargetURL)
           
private  void targetVersionValidate(String a_TargetVersion)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

timestamp

private Timestamp timestamp

principalName

private String principalName

serviceName

private String serviceName

eventName

private String eventName

targetName

private String targetName

targetClass

private String targetClass

targetVersion

private String targetVersion

targetURL

private String targetURL

message

private String message

properties

private Hashtable properties

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

LogRecord

public LogRecord(String principal,
                 String service,
                 String event,
                 String target,
                 String targetURL,
                 String message)
creates a log record with current timestamp and specified parameters

Supported API: false

Parameters:
principal -
service -
event -
target -
targetURL -
message -

LogRecord

public LogRecord(String principal,
                 String service,
                 String event,
                 String target)


Supported API: false

Parameters:
principal -
service -
event -
target -

LogRecord

public LogRecord()


Supported API: false

Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(LogRecord thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getTimestamp

public Timestamp getTimestamp()
Gets the value of the attribute: timestamp.

Supported API: false

Returns:
Timestamp

setTimestamp

public void setTimestamp(Timestamp a_Timestamp)
                  throws WTPropertyVetoException
Sets the value of the attribute: timestamp.

Supported API: false

Parameters:
a_Timestamp -
Throws:
WTPropertyVetoException

getPrincipalName

public String getPrincipalName()
Gets the value of the attribute: principalName.

Supported API: false

Returns:
String

setPrincipalName

public void setPrincipalName(String a_PrincipalName)
                      throws WTPropertyVetoException
Sets the value of the attribute: principalName.

Supported API: false

Parameters:
a_PrincipalName -
Throws:
WTPropertyVetoException

principalNameValidate

private void principalNameValidate(String a_PrincipalName)
                            throws WTPropertyVetoException
Parameters:
a_PrincipalName -
Throws:
WTPropertyVetoException

getServiceName

public String getServiceName()
Gets the value of the attribute: serviceName.

Supported API: false

Returns:
String

setServiceName

public void setServiceName(String a_ServiceName)
                    throws WTPropertyVetoException
Sets the value of the attribute: serviceName.

Supported API: false

Parameters:
a_ServiceName -
Throws:
WTPropertyVetoException

serviceNameValidate

private void serviceNameValidate(String a_ServiceName)
                          throws WTPropertyVetoException
Parameters:
a_ServiceName -
Throws:
WTPropertyVetoException

getEventName

public String getEventName()
Gets the value of the attribute: eventName.

Supported API: false

Returns:
String

setEventName

public void setEventName(String a_EventName)
                  throws WTPropertyVetoException
Sets the value of the attribute: eventName.

Supported API: false

Parameters:
a_EventName -
Throws:
WTPropertyVetoException

eventNameValidate

private void eventNameValidate(String a_EventName)
                        throws WTPropertyVetoException
Parameters:
a_EventName -
Throws:
WTPropertyVetoException

getTargetName

public String getTargetName()
Gets the value of the attribute: targetName.

Supported API: false

Returns:
String

setTargetName

public void setTargetName(String a_TargetName)
                   throws WTPropertyVetoException
Sets the value of the attribute: targetName.

Supported API: false

Parameters:
a_TargetName -
Throws:
WTPropertyVetoException

targetNameValidate

private void targetNameValidate(String a_TargetName)
                         throws WTPropertyVetoException
Parameters:
a_TargetName -
Throws:
WTPropertyVetoException

getTargetClass

public String getTargetClass()
Gets the value of the attribute: targetClass.

Supported API: false

Returns:
String

setTargetClass

public void setTargetClass(String a_TargetClass)
                    throws WTPropertyVetoException
Sets the value of the attribute: targetClass.

Supported API: false

Parameters:
a_TargetClass -
Throws:
WTPropertyVetoException

targetClassValidate

private void targetClassValidate(String a_TargetClass)
                          throws WTPropertyVetoException
Parameters:
a_TargetClass -
Throws:
WTPropertyVetoException

getTargetVersion

public String getTargetVersion()
Gets the value of the attribute: targetVersion.

Supported API: false

Returns:
String

setTargetVersion

public void setTargetVersion(String a_TargetVersion)
                      throws WTPropertyVetoException
Sets the value of the attribute: targetVersion.

Supported API: false

Parameters:
a_TargetVersion -
Throws:
WTPropertyVetoException

targetVersionValidate

private void targetVersionValidate(String a_TargetVersion)
                            throws WTPropertyVetoException
Parameters:
a_TargetVersion -
Throws:
WTPropertyVetoException

getTargetURL

public String getTargetURL()
Gets the value of the attribute: targetURL.

Supported API: false

Returns:
String

setTargetURL

public void setTargetURL(String a_TargetURL)
                  throws WTPropertyVetoException
Sets the value of the attribute: targetURL.

Supported API: false

Parameters:
a_TargetURL -
Throws:
WTPropertyVetoException

targetURLValidate

private void targetURLValidate(String a_TargetURL)
                        throws WTPropertyVetoException
Parameters:
a_TargetURL -
Throws:
WTPropertyVetoException

getMessage

public String getMessage()
Gets the value of the attribute: message.

Supported API: false

Returns:
String

setMessage

public void setMessage(String a_Message)
                throws WTPropertyVetoException
Sets the value of the attribute: message.

Supported API: false

Parameters:
a_Message -
Throws:
WTPropertyVetoException

messageValidate

private void messageValidate(String a_Message)
                      throws WTPropertyVetoException
Parameters:
a_Message -
Throws:
WTPropertyVetoException

getProperties

public Hashtable getProperties()
Gets the value of the attribute: properties.

Supported API: false

Returns:
Hashtable

setProperties

public void setProperties(Hashtable a_Properties)
                   throws WTPropertyVetoException
Sets the value of the attribute: properties.

Supported API: false

Parameters:
a_Properties -
Throws:
WTPropertyVetoException

setProperty

public void setProperty(String name,
                        String value)
adds the property name-value pair as an additional property for this log record

Supported API: false

Parameters:
name -
value -