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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createDataExtractBulkViewAuditLog
(String message) Create an audit log record about a user viewing a set of data extract values for a number of submissions.void
createSubmissionViewAuditLog
(Submission submission, String dataType) Create a submission view audit log record.void
dumpAuditLogToFile
(String path, String fileName) Dump the entire audit log to the specified path (optional) and file name in CSV format.protected org.slf4j.Logger
Return the specialized user audit log loggervoid
Process the entity after add.void
Process the entity after load.void
postPersist
(Object entity) Process the entity after persist.void
postRemove
(Object entity) Process the entity after remove.void
postUpdate
(Object entity) Process the entity after update.void
prePersist
(Object entity) Process the entity before persist.void
Process the entity before remvoe.void
Process 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, toMap
Methods 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:
postAdd
in interfaceorg.apache.cayenne.LifecycleListener
- Parameters:
entity
- the entity- See Also:
-
postLoad
Process the entity after load.- Specified by:
postLoad
in interfaceorg.apache.cayenne.LifecycleListener
- Parameters:
entity
- the entity- See Also:
-
postPersist
Process the entity after persist.- Specified by:
postPersist
in interfaceorg.apache.cayenne.LifecycleListener
- Parameters:
entity
- the entity- See Also:
-
postRemove
Process the entity after remove.- Specified by:
postRemove
in interfaceorg.apache.cayenne.LifecycleListener
- Parameters:
entity
- the entity- See Also:
-
postUpdate
Process the entity after update.- Specified by:
postUpdate
in interfaceorg.apache.cayenne.LifecycleListener
- Parameters:
entity
- the entity- See Also:
-
prePersist
Process the entity before persist.- Specified by:
prePersist
in interfaceorg.apache.cayenne.LifecycleListener
- Parameters:
entity
- the entity- See Also:
-
preRemove
Process the entity before remvoe.- Specified by:
preRemove
in interfaceorg.apache.cayenne.LifecycleListener
- Parameters:
entity
- the entity- See Also:
-
preUpdate
Process the entity before update.- Specified by:
preUpdate
in 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
-