org.processmining.framework.log.classic
Class AuditTrailEntryClassic

java.lang.Object
  extended by org.processmining.framework.log.LogEntity
      extended by org.processmining.framework.log.AuditTrailEntry
          extended by org.processmining.framework.log.classic.AuditTrailEntryClassic
All Implemented Interfaces:
java.lang.Cloneable

public class AuditTrailEntryClassic
extends AuditTrailEntry
implements java.lang.Cloneable

A single audit trail entry in a workflow log.

This class only provides some simple getter methods to get the information in an audit trail entry.

Version:
1.0
Author:
Peter van den Brand

Constructor Summary
AuditTrailEntryClassic(java.lang.String element, java.lang.String type, java.util.Date timestamp, java.lang.String originator, java.util.Map<java.lang.String,java.lang.String> data)
           
AuditTrailEntryClassic(java.lang.String element, java.lang.String type, java.lang.String timestamp, java.lang.String originator, java.util.Map<java.lang.String,java.lang.String> data)
           
 
Method Summary
 void addDataAttribute(java.lang.String key, java.lang.String value)
          Sets an identified attribute in the data section of this event.
 java.lang.Object clone()
          Make a deep copy of the object.
 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> getAttributes()
          Returns the meta-data, as map of key-value pairs, associated to this entity.
 java.util.Map<java.lang.String,java.lang.String> getData()
          Returns a map of key / value pairs describing data available for this event.
 java.lang.String getDescription()
          Returns the description of this entity.
 java.lang.String getElement()
          Returns the workflow model element identifier (event name)
 java.lang.String getName()
          Returns the name of this entity.
 java.lang.String getOriginator()
          Returns the originator, i.e.
 java.util.Date getTimestamp()
          Returns the exact date and time, at which this event has occurred.
 java.lang.String getType()
          Returns the event type, as defined in the MXML finite state machine.
 int hashCode()
          Overridden to produce the same hash code for equal objects.
 long id()
          Returns the ID of this audit trail entry.
 void removeAttribute(java.lang.String key)
          Removes the attribute with the given key from the set of attributes of this entity.
 void setAttribute(java.lang.String key, java.lang.String value)
          Sets an attribute of this entity as a key-value pair.
 void setAttributes(java.util.Map<java.lang.String,java.lang.String> map)
          Sets the set of attributes, given as key-value pairs, for this entity.
 void setData(java.util.Map<java.lang.String,java.lang.String> data)
          Sets the attribute data of this event.
 void setDescription(java.lang.String description)
          Sets the description of this entity
 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.
 void setName(java.lang.String name)
          Sets the name, or ID, of this entity
 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.
 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.
 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.
 java.lang.String toString()
          Returns a string representation of this entity.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuditTrailEntryClassic

public AuditTrailEntryClassic(java.lang.String element,
                              java.lang.String type,
                              java.util.Date timestamp,
                              java.lang.String originator,
                              java.util.Map<java.lang.String,java.lang.String> data)
Parameters:
element - String
type - String
timestamp - Date
originator - String
data - HashMap

AuditTrailEntryClassic

public AuditTrailEntryClassic(java.lang.String element,
                              java.lang.String type,
                              java.lang.String timestamp,
                              java.lang.String originator,
                              java.util.Map<java.lang.String,java.lang.String> data)
Parameters:
element - String
type - String
timestamp - String
originator - String
data - Map
Method Detail

getElement

public java.lang.String getElement()
Description copied from class: AuditTrailEntry
Returns the workflow model element identifier (event name)

Overrides:
getElement in class AuditTrailEntry
Returns:
String

getType

public java.lang.String getType()
Description copied from class: AuditTrailEntry
Returns the event type, as defined in the MXML finite state machine.

Specified by:
getType in class AuditTrailEntry
Returns:
String

getTimestamp

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

Specified by:
getTimestamp in class AuditTrailEntry
Returns:
Date

getOriginator

public java.lang.String getOriginator()
Description copied from class: AuditTrailEntry
Returns the originator, i.e. the name or identifier of the entity which has triggered the occurrence of the described event.

Specified by:
getOriginator in class AuditTrailEntry
Returns:
String

getData

public java.util.Map<java.lang.String,java.lang.String> getData()
Description copied from class: AuditTrailEntry
Returns a map of key / value pairs describing data available for this event.

Overrides:
getData in class AuditTrailEntry
Returns:
Map

toString

public java.lang.String toString()
Description copied from class: LogEntity
Returns a string representation of this entity.

Specified by:
toString in class LogEntity

equals

public boolean equals(java.lang.Object o)
Description copied from class: AuditTrailEntry
Overridden to specify when two audit trail entries are considered to be equal.

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

hashCode

public int hashCode()
Description copied from class: AuditTrailEntry
Overridden to produce the same hash code for equal objects.

Specified by:
hashCode in class AuditTrailEntry
Returns:
int The hash code calculated.

clone

public java.lang.Object clone()
Description copied from class: AuditTrailEntry
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.

Specified by:
clone in class AuditTrailEntry
Returns:
Object The cloned object.

addDataAttribute

public void addDataAttribute(java.lang.String key,
                             java.lang.String value)
Description copied from class: AuditTrailEntry
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.

Overrides:
addDataAttribute in class AuditTrailEntry
Parameters:
key - Key of the attribute to be set.
value - Value to set the attribute to.

setData

public void setData(java.util.Map<java.lang.String,java.lang.String> data)
Description copied from class: AuditTrailEntry
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.

Overrides:
setData in class AuditTrailEntry
Parameters:
data - A map containing the attributes of this event as key / value pairs.

setElement

public void setElement(java.lang.String element)
Description copied from class: AuditTrailEntry
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.

Overrides:
setElement in class AuditTrailEntry
Parameters:
element - identifier of the workflow model element associated with this event.
See Also:
isMutable

setOriginator

public void setOriginator(java.lang.String originator)
Description copied from class: AuditTrailEntry
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.

Specified by:
setOriginator in class AuditTrailEntry
Parameters:
originator - Name or identifier of the organizational entity having triggered this event.

setTimestamp

public void setTimestamp(java.util.Date timestamp)
Description copied from class: AuditTrailEntry
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.

Specified by:
setTimestamp in class AuditTrailEntry
Parameters:
timestamp - The exact date and time at which this event has been observed.

setType

public void setType(java.lang.String type)
Description copied from class: AuditTrailEntry
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.

Specified by:
setType in class AuditTrailEntry
Parameters:
type - String identifier of the event type to set.

id

public long id()
Description copied from class: AuditTrailEntry
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.

Specified by:
id in class AuditTrailEntry
Returns:

getAttributes

public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Description copied from class: LogEntity
Returns the meta-data, as map of key-value pairs, associated to this entity.

Specified by:
getAttributes in class LogEntity
Returns:

getName

public java.lang.String getName()
Description copied from class: LogEntity
Returns the name of this entity.

Specified by:
getName in class LogEntity
Returns:

removeAttribute

public void removeAttribute(java.lang.String key)
Description copied from class: LogEntity
Removes the attribute with the given key from the set of attributes of this entity.

Specified by:
removeAttribute in class LogEntity

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.String value)
Description copied from class: LogEntity
Sets an attribute of this entity as a key-value pair. If a previous mapping for the given key exists, it will be removed. Otherwise a new mapping will be added.

Specified by:
setAttribute in class LogEntity

setName

public void setName(java.lang.String name)
Description copied from class: LogEntity
Sets the name, or ID, of this entity

Specified by:
setName in class LogEntity

getDescription

public java.lang.String getDescription()
Description copied from class: LogEntity
Returns the description of this entity.

Specified by:
getDescription in class LogEntity
Returns:

setAttributes

public void setAttributes(java.util.Map<java.lang.String,java.lang.String> map)
Description copied from class: LogEntity
Sets the set of attributes, given as key-value pairs, for this entity. Replaces the previously contained set of attributes.

Specified by:
setAttributes in class LogEntity

setDescription

public void setDescription(java.lang.String description)
Description copied from class: LogEntity
Sets the description of this entity

Specified by:
setDescription in class LogEntity