org.alfresco.bm.event
Class EventRecord

java.lang.Object
  extended by org.alfresco.bm.event.EventRecord

public class EventRecord
extends Object

The record of a processed event.

Since:
1.0
Author:
Derek Hulley

Field Summary
static String FIELD_EVENT_NAME
           
static String FIELD_ID
           
static String FIELD_START_TIME
           
static String FIELD_SUCCESS
           
static String INDEX_EVENT_NAME
           
static String INDEX_START_TIME
           
static String INDEX_SUCCESS
           
 
Constructor Summary
EventRecord(boolean success, long startTime, long time, Serializable data, Event event)
           
 
Method Summary
static void checkIndexes(org.springframework.data.mongodb.core.MongoTemplate mongo, String collection)
          Ensure that the MongoDB collection has the required indexes for events.
 Serializable getData()
           
 Event getEvent()
           
 String getId()
           
 long getStartDelay()
           
 long getStartTime()
           
 long getTime()
           
 String getWarning()
           
 boolean isSuccess()
           
 void setData(Serializable data)
           
 void setEvent(Event event)
           
 void setId(String id)
           
 void setStartDelay(long startDelay)
           
 void setStartTime(long startTime)
           
 void setSuccess(boolean success)
           
 void setTime(long time)
           
 void setWarning(String warning)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_ID

public static final String FIELD_ID
See Also:
Constant Field Values

FIELD_EVENT_NAME

public static final String FIELD_EVENT_NAME
See Also:
Constant Field Values

FIELD_START_TIME

public static final String FIELD_START_TIME
See Also:
Constant Field Values

FIELD_SUCCESS

public static final String FIELD_SUCCESS
See Also:
Constant Field Values

INDEX_EVENT_NAME

public static final String INDEX_EVENT_NAME
See Also:
Constant Field Values

INDEX_START_TIME

public static final String INDEX_START_TIME
See Also:
Constant Field Values

INDEX_SUCCESS

public static final String INDEX_SUCCESS
See Also:
Constant Field Values
Constructor Detail

EventRecord

public EventRecord(boolean success,
                   long startTime,
                   long time,
                   Serializable data,
                   Event event)
Parameters:
success - true if this represents a successful event otherwise false
startTime - the time when processing started
time - the time it took to process the event
data - any additional data that should be recorded with this event
event - the event that was processed
Method Detail

checkIndexes

public static void checkIndexes(org.springframework.data.mongodb.core.MongoTemplate mongo,
                                String collection)
Ensure that the MongoDB collection has the required indexes for events.

Parameters:
mongo - connection to MongoDB
collection - name of DB collection containing events

getId

public String getId()

setId

public void setId(String id)

isSuccess

public boolean isSuccess()

setSuccess

public void setSuccess(boolean success)

getStartTime

public long getStartTime()

setStartTime

public void setStartTime(long startTime)

getStartDelay

public long getStartDelay()

setStartDelay

public void setStartDelay(long startDelay)

getTime

public long getTime()

setTime

public void setTime(long time)

getEvent

public Event getEvent()

setEvent

public void setEvent(Event event)

getData

public Serializable getData()

setData

public void setData(Serializable data)

getWarning

public String getWarning()

setWarning

public void setWarning(String warning)


Copyright © 2012. All Rights Reserved.