Package fr.becpg.repo.audit.plugin.impl
Class ExportSearchAuditPlugin
java.lang.Object
fr.becpg.repo.audit.plugin.AbstractAuditPlugin
fr.becpg.repo.audit.plugin.impl.ExportSearchAuditPlugin
- All Implemented Interfaces:
AuditPlugin,DatabaseAuditPlugin,org.springframework.beans.factory.InitializingBean
@Service
public class ExportSearchAuditPlugin
extends AbstractAuditPlugin
implements DatabaseAuditPlugin
ExportSearchAuditPlugin class.
- Author:
- matthieu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstantASYNC="async"static final StringConstantDOWNLOAD_NODE_REF="downloadNodeRef"static final StringConstantFILENAME="filename"static final StringConstantRESULTS_SIZE="resultsSize"static final StringConstantTEMPLATE="template"static final StringConstantUSERNAME="username"Fields inherited from class fr.becpg.repo.audit.plugin.AbstractAuditPlugin
KEY_MAPFields inherited from interface fr.becpg.repo.audit.plugin.AuditPlugin
COMPLETED_AT, DURATION, ID, IS_COMPLETED, STARTED_AT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterRecordAuditEntry(Map<String, Serializable> auditValues) afterRecordAuditEntry.booleanapplyTo.voidbeforeRecordAuditEntry(Map<String, Serializable> auditValues) beforeRecordAuditEntry.getAuditApplicationId.getAuditApplicationPath.Class<?> getAuditedClass.booleanWhether the entry has to be recorded when the audited operation starts and completed when it ends, instead of being recorded once at the end.voidsetAuditParameters(String auditParameters) Setter for the fieldauditParameters.Methods inherited from class fr.becpg.repo.audit.plugin.AbstractAuditPlugin
afterPropertiesSet, getKeyMap, isDatabaseEnable, isStopWatchEnable, isTracerEnableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.becpg.repo.audit.plugin.AuditPlugin
isDatabaseEnable, isStopWatchEnable, isTracerEnableMethods inherited from interface fr.becpg.repo.audit.plugin.DatabaseAuditPlugin
getKeyMap
-
Field Details
-
FILENAME
ConstantFILENAME="filename"- See Also:
-
USERNAME
ConstantUSERNAME="username"- See Also:
-
TEMPLATE
ConstantTEMPLATE="template"- See Also:
-
RESULTS_SIZE
ConstantRESULTS_SIZE="resultsSize"- See Also:
-
ASYNC
ConstantASYNC="async"- See Also:
-
DOWNLOAD_NODE_REF
ConstantDOWNLOAD_NODE_REF="downloadNodeRef"- See Also:
-
-
Constructor Details
-
ExportSearchAuditPlugin
public ExportSearchAuditPlugin()
-
-
Method Details
-
isRecordOnStart
public boolean isRecordOnStart()Whether the entry has to be recorded when the audited operation starts and completed when it ends, instead of being recorded once at the end. An operation heavy enough to bring the server down leaves no trace at all when its entry is only written on completion. Recording it upfront keeps the author, the volume and the start time available even when the operation never returns: such an entry simply stays flagged as not completed. An export is heavy enough to bring the server down: its entry is recorded when the export starts so that the user who requested it stays traceable even when it never completes.- Specified by:
isRecordOnStartin interfaceDatabaseAuditPlugin- Returns:
- a boolean
-
applyTo
applyTo.
- Specified by:
applyToin interfaceAuditPlugin- Parameters:
type- aAuditTypeobject- Returns:
- a boolean
-
getAuditApplicationId
getAuditApplicationId.
- Specified by:
getAuditApplicationIdin interfaceDatabaseAuditPlugin- Returns:
- a
Stringobject
-
getAuditApplicationPath
getAuditApplicationPath.
- Specified by:
getAuditApplicationPathin interfaceDatabaseAuditPlugin- Returns:
- a
Stringobject
-
getAuditedClass
getAuditedClass.
- Specified by:
getAuditedClassin interfaceAuditPlugin- Returns:
- a
Classobject
-
setAuditParameters
Setter for the field
auditParameters.- Overrides:
setAuditParametersin classAbstractAuditPlugin- Parameters:
auditParameters- aStringobject
-
beforeRecordAuditEntry
beforeRecordAuditEntry.
The entry of an asynchronous export is completed by the thread running it, as system: the export is credited to the user who requested it, not to the one recording the entry.- Specified by:
beforeRecordAuditEntryin interfaceDatabaseAuditPlugin- Parameters:
auditValues- aMapobject
-
afterRecordAuditEntry
afterRecordAuditEntry.
- Specified by:
afterRecordAuditEntryin interfaceDatabaseAuditPlugin- Parameters:
auditValues- aMapobject
-