org.processmining.framework.log
Class AuditTrailEntry

java.lang.Object
  extended by org.processmining.framework.log.LogEntity
      extended by org.processmining.framework.log.AuditTrailEntry
Direct Known Subclasses:
AuditTrailEntryClassic, AuditTrailEntryImpl, ProxyAuditTrailEntry

public abstract class AuditTrailEntry
extends LogEntity

This abstract class defines the access methods to an audit trail entry object in the framework.
Notice: Read-only implementations of this interface may throw exceptions when modifying methods are called. It is expected that you handle these according to your intent.

Author:
Christian W. Guenther (christian at deckfour dot org)

Constructor Summary
AuditTrailEntry()
           
 
Method Summary
 void addDataAttribute(java.lang.String key, java.lang.String value)
          Deprecated. Use setAttribute() instead!
abstract  java.lang.Object clone()
          Make a deep copy of the object.
abstract  boolean equals(java.lang.Object o)
          Overridden to specify when two audit trail entries are considered to be equal.
 java.util.Map<java.lang.String,java.lang.String> getData()
          Deprecated. Use getAttributes() instead!
 java.lang.String getElement()
          Returns the workflow model element identifier (event name)
abstract  java.lang.String getOriginator()
          Returns the originator, i.e.
abstract  java.util.Date getTimestamp()
          Returns the exact date and time, at which this event has occurred.
abstract  java.lang.String getType()
          Returns the event type, as defined in the MXML finite state machine.
abstract  int hashCode()
          Overridden to produce the same hash code for equal objects.
abstract  long id()
          Returns the ID of this audit trail entry.
 void setData(java.util.Map<java.lang.String,java.lang.String> data)
          Deprecated. Use setAttributes() instead!
 void setElement(java.lang.String element)
          Sets the model element of this event.
Notice: Implementations of this interface may support modification of instances to varying degrees.
abstract  void setOriginator(java.lang.String originator)
          Sets the name or identifier of the organizational entity which has triggered the occurrence of this event.
Notice: Implementations of this interface may support modification of instances to varying degrees.
abstract  void setTimestamp(java.util.Date timestamp)
          Sets the timestamp of this event.
Notice: Implementations of this interface may support modification of instances to varying degrees.
abstract  void setType(java.lang.String type)
          Sets the type of this event, as defined in the MXML finite state machine.
Notice: Implementations of this interface may support modification of instances to varying degrees.
 
Methods inherited from class org.processmining.framework.log.LogEntity
getAttributes, getDescription, getName, removeAttribute, setAttribute, setAttributes, setDescription, setName, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuditTrailEntry

public AuditTrailEntry()
Method Detail

getElement

public java.lang.String getElement()
Returns the workflow model element identifier (event name)

Returns:
String

getType

public abstract java.lang.String getType()
Returns the event type, as defined in the MXML finite state machine.

Returns:
String

getTimestamp

public abstract java.util.Date getTimestamp()
Returns the exact date and time, at which this event has occurred. Notice that this is an optional attribute, thus null may be returned.

Returns:
Date

getOriginator

public abstract java.lang.String getOriginator()
Returns the originator, i.e. the name or identifier of the entity which has triggered the occurrence of the described event.

Returns:
String

id

public abstract long id()
Returns the ID of this audit trail entry.

An ID for an audit trail entry is defined to be unique within the context of its containing log file collection.

Returns:

setElement

public void setElement(java.lang.String element)
Sets the model element of this event.
Notice: Implementations of this interface may support modification of instances to varying degrees. It is suggested that you test the modification support of the underlying implementation by use of the isMutable() method.

Parameters:
element - identifier of the workflow model element associated with this event.
See Also:
isMutable

setType

public abstract void setType(java.lang.String type)
Sets the type of this event, as defined in the MXML finite state machine.
Notice: Implementations of this interface may support modification of instances to varying degrees. It is suggested that you test the modification support of the underlying implementation by use of the isMutable() method.

Parameters:
type - String identifier of the event type to set.

setTimestamp

public abstract void setTimestamp(java.util.Date timestamp)
Sets the timestamp of this event.
Notice: Implementations of this interface may support modification of instances to varying degrees. It is suggested that you test the modification support of the underlying implementation by use of the isMutable() method.

Parameters:
timestamp - The exact date and time at which this event has been observed.

setOriginator

public abstract void setOriginator(java.lang.String originator)
Sets the name or identifier of the organizational entity which has triggered the occurrence of this event.
Notice: Implementations of this interface may support modification of instances to varying degrees. It is suggested that you test the modification support of the underlying implementation by use of the isMutable() method.

Parameters:
originator - Name or identifier of the organizational entity having triggered this event.

equals

public abstract boolean equals(java.lang.Object o)
Overridden to specify when two audit trail entries are considered to be equal.

Overrides:
equals in class java.lang.Object
Parameters:
o - Object The AuditTrailEntry to be compared with.
Returns:
boolean True if all attributes are equal, false otherwise.

hashCode

public abstract int hashCode()
Overridden to produce the same hash code for equal objects.

Overrides:
hashCode in class java.lang.Object
Returns:
int The hash code calculated.

clone

public abstract java.lang.Object clone()
Make a deep copy of the object. Note that this method needs to be extended as soon as there are attributes added to the class which are not primitive or immutable.

Overrides:
clone in class java.lang.Object
Returns:
Object The cloned object.

getData

public java.util.Map<java.lang.String,java.lang.String> getData()
Deprecated. Use getAttributes() instead!

Returns a map of key / value pairs describing data available for this event.

Returns:
Map

setData

public void setData(java.util.Map<java.lang.String,java.lang.String> data)
Deprecated. Use setAttributes() instead!

Sets the attribute data of this event. Attributes are specified as key / value pairs, and provided in a Map collection.
Notice: Implementations of this interface may support modification of instances to varying degrees. It is suggested that you test the modification support of the underlying implementation by use of the isMutable() method.

Parameters:
data - A map containing the attributes of this event as key / value pairs.

addDataAttribute

public void addDataAttribute(java.lang.String key,
                             java.lang.String value)
Deprecated. Use setAttribute() instead!

Sets an identified attribute in the data section of this event. Attributes are specified as key / value pairs. When the attribute has already been present in the audit trail entry, its value is replaced by this method. If the named attribute has not previously existed, it is newly introduced and created.
Notice: Implementations of this interface may support modification of instances to varying degrees. It is suggested that you test the modification support of the underlying implementation by use of the isMutable() method.

Parameters:
key - Key of the attribute to be set.
value - Value to set the attribute to.