Package com.avoka.fc.core.service
Class AuditLogService
java.lang.Object
com.avoka.fc.core.service.BaseService
com.avoka.fc.core.service.CayenneService
com.avoka.fc.core.service.AuditLogService
- All Implemented Interfaces:
org.apache.cayenne.LifecycleListener
Provides an audit log service.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateDataExtractBulkViewAuditLog(String message) Create an audit log record about a user viewing a set of data extract values for a number of submissions.voidcreateSubmissionViewAuditLog(Submission submission, String dataType) Create a submission view audit log record.voiddumpAuditLogToFile(String path, String fileName) Dump the entire audit log to the specified path (optional) and file name in CSV format.protected org.slf4j.LoggerReturn the specialized user audit log loggervoidProcess the entity after add.voidProcess the entity after load.voidpostPersist(Object entity) Process the entity after persist.voidpostRemove(Object entity) Process the entity after remove.voidpostUpdate(Object entity) Process the entity after update.voidprePersist(Object entity) Process the entity before persist.voidProcess the entity before remvoe.voidProcess the entity before update.Methods inherited from class com.avoka.fc.core.service.CayenneService
commitChanges, deleteObject, deleteObjects, findObject, getDataContext, getDataDomain, getObjectForPK, getObjectStore, newObject, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, refetchEntity, refetchObject, registerNewObject, rollbackChanges, toMap, toMapMethods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
Field Details
-
LOG_NAME_AUDIT_LOG
- See Also:
-
auditLogLogger
protected org.slf4j.Logger auditLogLogger
-
-
Constructor Details
-
AuditLogService
public AuditLogService()
-
-
Method Details
-
postAdd
Process the entity after add.- Specified by:
postAddin interfaceorg.apache.cayenne.LifecycleListener- Parameters:
entity- the entity- See Also:
-
postLoad
Process the entity after load.- Specified by:
postLoadin interfaceorg.apache.cayenne.LifecycleListener- Parameters:
entity- the entity- See Also:
-
postPersist
Process the entity after persist.- Specified by:
postPersistin interfaceorg.apache.cayenne.LifecycleListener- Parameters:
entity- the entity- See Also:
-
postRemove
Process the entity after remove.- Specified by:
postRemovein interfaceorg.apache.cayenne.LifecycleListener- Parameters:
entity- the entity- See Also:
-
postUpdate
Process the entity after update.- Specified by:
postUpdatein interfaceorg.apache.cayenne.LifecycleListener- Parameters:
entity- the entity- See Also:
-
prePersist
Process the entity before persist.- Specified by:
prePersistin interfaceorg.apache.cayenne.LifecycleListener- Parameters:
entity- the entity- See Also:
-
preRemove
Process the entity before remvoe.- Specified by:
preRemovein interfaceorg.apache.cayenne.LifecycleListener- Parameters:
entity- the entity- See Also:
-
preUpdate
Process the entity before update.- Specified by:
preUpdatein interfaceorg.apache.cayenne.LifecycleListener- Parameters:
entity- the entity- See Also:
-
createSubmissionViewAuditLog
Create a submission view audit log record.- Parameters:
submission- the submission to logdataType- the type of data [ 'XML' | 'PDF Receipt' | 'History XML' | 'Attachment' ]
-
createDataExtractBulkViewAuditLog
Create an audit log record about a user viewing a set of data extract values for a number of submissions. Note: This method works only if the remote user resolves to a valid TM user account.- Parameters:
message- the message to log (this should detail which data extract values/submissions, e.g. all submissions for January 2017 for form 'FTX-CCA' version '1.0'- Throws:
ApplicationException- if the current user is not a valid TM user account- Since:
- 5.1.3
-
dumpAuditLogToFile
Dump the entire audit log to the specified path (optional) and file name in CSV format. If the file exists, it will be overwritten.- Parameters:
path- the path (defaults to the TM server log directory if not set)fileName- (required)- Since:
- 4.0.0
-
getAuditLogLogger
protected org.slf4j.Logger getAuditLogLogger()Return the specialized user audit log logger- Returns:
- the user audit log logger
-