Package com.priint.pubserver.tracing
Interface TraceManagerLocal
public interface TraceManagerLocal
Interface to use the Tracer Manager of the Kernel.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionintarchiveTrace(String sessionId, Date fromTimestamp, Date toTimestamp, String archiveName, String documentId, String publicationId) Archive Trace Messages to the DB archive table.intdeleteTrace(String sessionId, int hours) Delete trace messages from the DBintdeleteTrace(String sessionId, Date fromTimestamp, Date toTimestamp, String documentId, String publicationId) Delete trace messages from the DBintrecoverTrace(String sessionId, Date fromTimestamp, Date toTimestamp, String archiveName) Restore trace messages from the archive.retrieveSession(int maxResults, String sessionIdFilter, String userFilter, String sourceFilter) retrieveTrace(String sessionId, Date fromTimestamp, Date toTimestamp, String user, boolean error, boolean warning, boolean info, boolean apiCall, String source, String documentId, String publicationId, int maxResults) Get trace messages from the DBretrieveTrace(String sessionId, Date fromTimestamp, Date toTimestamp, String documentId, String publicationId) Get trace messages from the DBretrieveTraceAsCSV(String sessionId, Date fromTimestamp, Date toTimestamp, String documentId, String publicationId) Get trace messages from the DB as CSVretrieveTraceAsXML(String sessionId, Date fromTimestamp, Date toTimestamp, String documentId, String publicationId) Get trace messages from the DB as XMLvoidstoreTraceEvent(String sessionId, TracerMessage traceMessage) Store trace message object to the DB
-
Method Details
-
storeTraceEvent
Store trace message object to the DB- Parameters:
sessionId-traceMessage-
-
retrieveTrace
List<TracerMessage> retrieveTrace(String sessionId, Date fromTimestamp, Date toTimestamp, String documentId, String publicationId) Get trace messages from the DB- Parameters:
sessionId- session filter: wildcard '*'fromTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'toTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'- Returns:
- List of Trace Message Objects
-
retrieveTrace
List<TracerMessage> retrieveTrace(String sessionId, Date fromTimestamp, Date toTimestamp, String user, boolean error, boolean warning, boolean info, boolean apiCall, String source, String documentId, String publicationId, int maxResults) Get trace messages from the DB- Parameters:
sessionId- session filter: wildcard '*'fromTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'toTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'user-warning-info-apiCall-source-- Returns:
- List of Trace Message Objects
-
retrieveSession
List<DistinctSession> retrieveSession(int maxResults, String sessionIdFilter, String userFilter, String sourceFilter) -
retrieveTraceAsXML
String retrieveTraceAsXML(String sessionId, Date fromTimestamp, Date toTimestamp, String documentId, String publicationId) Get trace messages from the DB as XML- Parameters:
sessionId- session filter: wildcard '*'fromTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'toTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'- Returns:
- XML
-
retrieveTraceAsCSV
String retrieveTraceAsCSV(String sessionId, Date fromTimestamp, Date toTimestamp, String documentId, String publicationId) Get trace messages from the DB as CSVFormat is based on RFC 4180 using comma as delimiter and eventually quoting by '"'
Example line:abc,"a,b,c",def,"g""h"
- Parameters:
sessionId- session filter: wildcard '*'fromTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'toTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'- Returns:
- CSV
-
deleteTrace
int deleteTrace(String sessionId, Date fromTimestamp, Date toTimestamp, String documentId, String publicationId) Delete trace messages from the DB- Parameters:
sessionId- session filter: wildcard '*'fromTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'toTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'- Returns:
- Number of deleted Trace Message Objects
-
archiveTrace
int archiveTrace(String sessionId, Date fromTimestamp, Date toTimestamp, String archiveName, String documentId, String publicationId) Archive Trace Messages to the DB archive table. The archived message will be deleted from the trace table.- Parameters:
sessionId- session filter: wildcard '*'fromTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'toTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'- Returns:
- Number of archived Trace Message Objects
-
recoverTrace
Restore trace messages from the archive. The archived message will be deleted from the trace archive table.- Parameters:
sessionId- session filter: wildcard '*'fromTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'toTimestamp- time filter: use pattern 'YYYYMMdHH:mm:ss' or wildcard '*'- Returns:
- Number of deleted Trace Message Objects
-
deleteTrace
Delete trace messages from the DB- Parameters:
sessionId- session filter: wildcard '*'hours- time filter: counter (hours) time from now to the past. Tracrs older than now minus counter will be removed. use 0 to remove all tracers- Returns:
- Number of deleted Trace Message Objects
-