com.flexive.shared.interfaces
Interface HistoryTrackerEngine

All Known Subinterfaces:
HistoryTrackerEngineLocal

public interface HistoryTrackerEngine

History tracker service

Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Method Summary
 java.util.List<FxHistory> getContentEntries(long contentId)
          Get a list of entries for a content identified by its id.
 java.util.List<FxHistory> getEntries(java.lang.String keyMatch, java.lang.Long accountMatch, java.lang.Long typeMatch, java.lang.Long contentMatch, java.util.Date startDate, java.util.Date endDate, int maxEntries)
          Get a list of history entries that matches the requested options (null means any)
 void track(FxType type, FxPK pk, java.lang.String data, java.lang.String key, java.lang.Object... args)
          Write a history entry for a content instance
 void track(FxType type, java.lang.String key, java.lang.Object... args)
          Write a history entry for a type
 void track(java.lang.String key, java.lang.Object... args)
          Write a history entry
 void trackData(java.lang.String data, java.lang.String key, java.lang.Object... args)
          Write a history entry with custom data
 

Method Detail

track

void track(java.lang.String key,
           java.lang.Object... args)
Write a history entry

Parameters:
key - key of the message (history. ...)
args - arguments needed by the key

trackData

void trackData(java.lang.String data,
               java.lang.String key,
               java.lang.Object... args)
Write a history entry with custom data

Parameters:
data - custom data/message
key - key of the message (history. ...)
args - arguments needed by the key

track

void track(FxType type,
           java.lang.String key,
           java.lang.Object... args)
Write a history entry for a type

Parameters:
type - affected type
key - key of the message (history. ...)
args - arguments needed by the key

track

void track(FxType type,
           FxPK pk,
           java.lang.String data,
           java.lang.String key,
           java.lang.Object... args)
Write a history entry for a content instance

Parameters:
type - affected type
data - (optional) data
pk - affected content
key - key of the message (history. ...)
args - arguments needed by the key

getContentEntries

java.util.List<FxHistory> getContentEntries(long contentId)
Get a list of entries for a content identified by its id. If no content with this id exists, an empty list is returned.

Parameters:
contentId - requested content id
Returns:
date ordered (descending) list of entries for the requested content

getEntries

java.util.List<FxHistory> getEntries(java.lang.String keyMatch,
                                     java.lang.Long accountMatch,
                                     java.lang.Long typeMatch,
                                     java.lang.Long contentMatch,
                                     java.util.Date startDate,
                                     java.util.Date endDate,
                                     int maxEntries)
Get a list of history entries that matches the requested options (null means any)

Parameters:
keyMatch - message key
accountMatch - account id
typeMatch - type id
contentMatch - content id
startDate - start date
endDate - end date
maxEntries - maximum number of entries to return
Returns:
date ordered (descending) list of matched entries