Class RecordsManagementAuditServiceImpl
- java.lang.Object
-
- org.springframework.extensions.surf.util.AbstractLifecycleBean
-
- org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditServiceImpl
-
- All Implemented Interfaces:
EventListener
,RecordsManagementAuditService
,RecordsManagementAuditServiceDeprecated
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.context.ApplicationListener
public class RecordsManagementAuditServiceImpl extends org.springframework.extensions.surf.util.AbstractLifecycleBean implements RecordsManagementAuditService
Records Management Audit Service Implementation.- Since:
- 3.2
- Author:
- Gavin Cornwell
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService
RecordsManagementAuditService.ReportFormat
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description RecordsManagementAuditServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
auditEvent(NodeRef nodeRef, String eventName)
Audits an event, assumes no properties where modified and that the event should not be audited immediately.void
auditEvent(NodeRef nodeRef, String eventName, Map<QName,Serializable> before, Map<QName,Serializable> after)
Audits an event, assumes that the event should not be audited immediately and not be removed if no property is changed.void
auditEvent(NodeRef nodeRef, String eventName, Map<QName,Serializable> before, Map<QName,Serializable> after, boolean immediate)
Audit event, assumes not to be removed if no property is changed.void
auditEvent(NodeRef nodeRef, String eventName, Map<QName,Serializable> before, Map<QName,Serializable> after, boolean immediate, boolean removeIfNoPropertyChanged)
Audit event.void
auditOrUpdateEvent(NodeRef nodeRef, String eventName, Map<QName,Serializable> before, Map<QName,Serializable> after, boolean removeIfNoPropertyChanged)
Supply incremental changes as part of an event.void
auditRMAction(RecordsManagementAction action, NodeRef nodeRef, Map<String,Serializable> parameters)
Deprecated.since 2.1void
clear()
Deprecated.void
clearAuditLog(NodeRef filePlan)
Clears the RM audit.NodeRef
fileAuditTrailAsRecord(RecordsManagementAuditQueryParameters params, NodeRef destination, RecordsManagementAuditService.ReportFormat format)
Retrieves a list of audit log entries using the provided parameters represented by the RecordsManagementAuditQueryParameters instance and then files the resulting log as an undeclared record in the record folder represented by the given NodeRef.List<AuditEvent>
getAuditEvents()
Retrieves a list of audit events.List<RecordsManagementAuditEntry>
getAuditTrail(RecordsManagementAuditQueryParameters params)
Retrieves a list of audit log entries using the provided parameters represented by the RecordsManagementAuditQueryParameters instance.File
getAuditTrailFile(RecordsManagementAuditQueryParameters params, RecordsManagementAuditService.ReportFormat format)
Retrieves a list of audit log entries using the provided parameters represented by the RecordsManagementAuditQueryParameters instance.protected void
getAuditTrailImpl(RecordsManagementAuditQueryParameters params, List<RecordsManagementAuditEntry> results, Writer writer, RecordsManagementAuditService.ReportFormat reportFormat)
Get the audit trail, optionally dumping the results the the given writer dumping to a list.Date
getDateAuditLogLastStarted(NodeRef filePlan)
Returns the date the RM audit was last started.Date
getDateAuditLogLastStopped(NodeRef filePlan)
Returns the date the RM audit was last stopped.Date
getDateLastStarted()
Deprecated.Date
getDateLastStopped()
Deprecated.protected Date
getStartOfDay(Date date)
Calculates the start of the given date.void
init()
Checks that all necessary properties have been set.boolean
isAuditLogEnabled(NodeRef filePlan)
Determines whether the RM audit log is currently enabled.boolean
isEnabled()
Deprecated.protected void
onBootstrap(org.springframework.context.ApplicationEvent event)
protected void
onShutdown(org.springframework.context.ApplicationEvent event)
void
registerAuditEvent(String name, String label)
Register audit event.void
registerAuditEvent(AuditEvent auditEvent)
Register audit event.void
setAuditComponent(AuditComponent auditComponent)
The component to create audit eventsvoid
setAuditService(AuditService auditService)
Sets the AuditService instancevoid
setCapabilityService(CapabilityService capabilityService)
void
setContentService(ContentService contentService)
Sets the ContentService instancevoid
setDictionaryService(DictionaryService dictionaryService)
Provides user-readable names for typesvoid
setFilePlanService(FilePlanService filePlanService)
void
setHoldService(HoldService holdService)
void
setIgnoredAuditProperties(List<String> ignoredAuditProperties)
void
setNamespaceService(NamespaceService namespaceService)
void
setNodeService(NodeService nodeService)
Sets the NodeService instancevoid
setPermissionService(PermissionService permissionService)
void
setPolicyComponent(PolicyComponent policyComponent)
Set the component used to bind to behaviour callbacksvoid
setRecordsManagementActionService(RecordsManagementActionService rmActionService)
Sets the RecordsManagementActionService instancevoid
setSiteService(SiteService siteService)
Set the site service (used to check the type of RM site created).void
setTransactionService(TransactionService transactionService)
Set the component used to start new transactionsvoid
start()
Deprecated.void
startAuditLog(NodeRef filePlan)
Start RM auditing.void
stop()
Deprecated.void
stopAuditLog(NodeRef filePlan)
Stop RM auditing.
-
-
-
Field Detail
-
RM_AUDIT_EVENT_LOGIN_SUCCESS
protected static final String RM_AUDIT_EVENT_LOGIN_SUCCESS
- See Also:
- Constant Field Values
-
RM_AUDIT_EVENT_LOGIN_FAILURE
protected static final String RM_AUDIT_EVENT_LOGIN_FAILURE
- See Also:
- Constant Field Values
-
RM_AUDIT_APPLICATION_NAME
protected static final String RM_AUDIT_APPLICATION_NAME
- See Also:
- Constant Field Values
-
RM_AUDIT_PATH_ROOT
protected static final String RM_AUDIT_PATH_ROOT
- See Also:
- Constant Field Values
-
RM_AUDIT_SNIPPET_EVENT
protected static final String RM_AUDIT_SNIPPET_EVENT
- See Also:
- Constant Field Values
-
RM_AUDIT_SNIPPET_PERSON
protected static final String RM_AUDIT_SNIPPET_PERSON
- See Also:
- Constant Field Values
-
RM_AUDIT_SNIPPET_NAME
protected static final String RM_AUDIT_SNIPPET_NAME
- See Also:
- Constant Field Values
-
RM_AUDIT_SNIPPET_NODE
protected static final String RM_AUDIT_SNIPPET_NODE
- See Also:
- Constant Field Values
-
RM_AUDIT_SNIPPET_CHANGES
protected static final String RM_AUDIT_SNIPPET_CHANGES
- See Also:
- Constant Field Values
-
RM_AUDIT_SNIPPET_BEFORE
protected static final String RM_AUDIT_SNIPPET_BEFORE
- See Also:
- Constant Field Values
-
RM_AUDIT_SNIPPET_AFTER
protected static final String RM_AUDIT_SNIPPET_AFTER
- See Also:
- Constant Field Values
-
RM_AUDIT_SITES_PATH
protected static final String RM_AUDIT_SITES_PATH
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_PERSON_FULLNAME
protected static final String RM_AUDIT_DATA_PERSON_FULLNAME
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_PERSON_ROLES
protected static final String RM_AUDIT_DATA_PERSON_ROLES
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_EVENT_NAME
protected static final String RM_AUDIT_DATA_EVENT_NAME
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_NODE_NODEREF
protected static final String RM_AUDIT_DATA_NODE_NODEREF
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_NODE_NAME
protected static final String RM_AUDIT_DATA_NODE_NAME
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_NODE_TYPE
protected static final String RM_AUDIT_DATA_NODE_TYPE
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_NODE_IDENTIFIER
protected static final String RM_AUDIT_DATA_NODE_IDENTIFIER
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_NODE_NAMEPATH
protected static final String RM_AUDIT_DATA_NODE_NAMEPATH
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_NODE_CHANGES_BEFORE
protected static final String RM_AUDIT_DATA_NODE_CHANGES_BEFORE
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_NODE_CHANGES_AFTER
protected static final String RM_AUDIT_DATA_NODE_CHANGES_AFTER
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_LOGIN_USERNAME
protected static final String RM_AUDIT_DATA_LOGIN_USERNAME
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_LOGIN_FULLNAME
protected static final String RM_AUDIT_DATA_LOGIN_FULLNAME
- See Also:
- Constant Field Values
-
RM_AUDIT_DATA_LOGIN_ERROR
protected static final String RM_AUDIT_DATA_LOGIN_ERROR
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_APPLICATION_NAME
protected static final String DOD5015_AUDIT_APPLICATION_NAME
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_PATH_ROOT
protected static final String DOD5015_AUDIT_PATH_ROOT
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_SNIPPET_EVENT
protected static final String DOD5015_AUDIT_SNIPPET_EVENT
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_SNIPPET_PERSON
protected static final String DOD5015_AUDIT_SNIPPET_PERSON
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_SNIPPET_NAME
protected static final String DOD5015_AUDIT_SNIPPET_NAME
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_SNIPPET_NODE
protected static final String DOD5015_AUDIT_SNIPPET_NODE
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_SNIPPET_CHANGES
protected static final String DOD5015_AUDIT_SNIPPET_CHANGES
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_SNIPPET_BEFORE
protected static final String DOD5015_AUDIT_SNIPPET_BEFORE
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_SNIPPET_AFTER
protected static final String DOD5015_AUDIT_SNIPPET_AFTER
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_PERSON_FULLNAME
protected static final String DOD5015_AUDIT_DATA_PERSON_FULLNAME
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_PERSON_ROLES
protected static final String DOD5015_AUDIT_DATA_PERSON_ROLES
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_EVENT_NAME
protected static final String DOD5015_AUDIT_DATA_EVENT_NAME
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_NODE_NODEREF
protected static final String DOD5015_AUDIT_DATA_NODE_NODEREF
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_NODE_NAME
protected static final String DOD5015_AUDIT_DATA_NODE_NAME
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_NODE_TYPE
protected static final String DOD5015_AUDIT_DATA_NODE_TYPE
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_NODE_IDENTIFIER
protected static final String DOD5015_AUDIT_DATA_NODE_IDENTIFIER
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_NODE_NAMEPATH
protected static final String DOD5015_AUDIT_DATA_NODE_NAMEPATH
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_NODE_CHANGES_BEFORE
protected static final String DOD5015_AUDIT_DATA_NODE_CHANGES_BEFORE
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_NODE_CHANGES_AFTER
protected static final String DOD5015_AUDIT_DATA_NODE_CHANGES_AFTER
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_LOGIN_USERNAME
protected static final String DOD5015_AUDIT_DATA_LOGIN_USERNAME
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_LOGIN_FULLNAME
protected static final String DOD5015_AUDIT_DATA_LOGIN_FULLNAME
- See Also:
- Constant Field Values
-
DOD5015_AUDIT_DATA_LOGIN_ERROR
protected static final String DOD5015_AUDIT_DATA_LOGIN_ERROR
- See Also:
- Constant Field Values
-
AUDIT_TRAIL_FILE_PREFIX
protected static final String AUDIT_TRAIL_FILE_PREFIX
- See Also:
- Constant Field Values
-
AUDIT_TRAIL_JSON_FILE_SUFFIX
protected static final String AUDIT_TRAIL_JSON_FILE_SUFFIX
- See Also:
- Constant Field Values
-
AUDIT_TRAIL_HTML_FILE_SUFFIX
protected static final String AUDIT_TRAIL_HTML_FILE_SUFFIX
- See Also:
- Constant Field Values
-
capabilityService
protected CapabilityService capabilityService
-
permissionService
protected PermissionService permissionService
-
holdService
protected HoldService holdService
-
-
Method Detail
-
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
Set the component used to bind to behaviour callbacks
-
setDictionaryService
public void setDictionaryService(DictionaryService dictionaryService)
Provides user-readable names for types
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
Set the component used to start new transactions
-
setNodeService
public void setNodeService(NodeService nodeService)
Sets the NodeService instance
-
setSiteService
public void setSiteService(SiteService siteService)
Set the site service (used to check the type of RM site created).- Parameters:
siteService
- The site service.
-
setContentService
public void setContentService(ContentService contentService)
Sets the ContentService instance
-
setAuditComponent
public void setAuditComponent(AuditComponent auditComponent)
The component to create audit events
-
setAuditService
public void setAuditService(AuditService auditService)
Sets the AuditService instance
-
setRecordsManagementActionService
public void setRecordsManagementActionService(RecordsManagementActionService rmActionService)
Sets the RecordsManagementActionService instance
-
setFilePlanService
public void setFilePlanService(FilePlanService filePlanService)
- Parameters:
filePlanService
- file plan service
-
setNamespaceService
public void setNamespaceService(NamespaceService namespaceService)
- Parameters:
namespaceService
- namespace service
-
setCapabilityService
public void setCapabilityService(CapabilityService capabilityService)
- Parameters:
capabilityService
- capability service
-
setIgnoredAuditProperties
public void setIgnoredAuditProperties(List<String> ignoredAuditProperties)
- Parameters:
ignoredAuditProperties
-
-
setPermissionService
public void setPermissionService(PermissionService permissionService)
- Parameters:
permissionService
-
-
setHoldService
public void setHoldService(HoldService holdService)
- Parameters:
holdService
-
-
registerAuditEvent
public void registerAuditEvent(String name, String label)
Description copied from interface:RecordsManagementAuditService
Register audit event.Creates an instance of a simple audit event and registers it with the service.
- Specified by:
registerAuditEvent
in interfaceRecordsManagementAuditService
- Parameters:
name
- name of audit eventlabel
- display label of audit event- See Also:
RecordsManagementAuditService.registerAuditEvent(java.lang.String, java.lang.String)
-
registerAuditEvent
public void registerAuditEvent(AuditEvent auditEvent)
Description copied from interface:RecordsManagementAuditService
Register audit event.- Specified by:
registerAuditEvent
in interfaceRecordsManagementAuditService
- Parameters:
auditEvent
- audit event- See Also:
RecordsManagementAuditService.registerAuditEvent(org.alfresco.module.org_alfresco_module_rm.audit.event.AuditEvent)
-
init
public void init()
Checks that all necessary properties have been set.
-
onBootstrap
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
- Specified by:
onBootstrap
in classorg.springframework.extensions.surf.util.AbstractLifecycleBean
- See Also:
AbstractLifecycleBean.onBootstrap(org.springframework.context.ApplicationEvent)
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event)
- Specified by:
onShutdown
in classorg.springframework.extensions.surf.util.AbstractLifecycleBean
- See Also:
AbstractLifecycleBean.onShutdown(org.springframework.context.ApplicationEvent)
-
isAuditLogEnabled
public boolean isAuditLogEnabled(NodeRef filePlan)
Description copied from interface:RecordsManagementAuditService
Determines whether the RM audit log is currently enabled.- Specified by:
isAuditLogEnabled
in interfaceRecordsManagementAuditService
- Parameters:
filePlan
- file plan- Returns:
- true if RM auditing is active false otherwise
- See Also:
RecordsManagementAuditService.isAuditLogEnabled(org.alfresco.service.cmr.repository.NodeRef)
-
startAuditLog
public void startAuditLog(NodeRef filePlan)
Description copied from interface:RecordsManagementAuditService
Start RM auditing.- Specified by:
startAuditLog
in interfaceRecordsManagementAuditService
- Parameters:
filePlan
- file plan- See Also:
RecordsManagementAuditService.startAuditLog(org.alfresco.service.cmr.repository.NodeRef)
-
stopAuditLog
public void stopAuditLog(NodeRef filePlan)
Description copied from interface:RecordsManagementAuditService
Stop RM auditing.- Specified by:
stopAuditLog
in interfaceRecordsManagementAuditService
- Parameters:
filePlan
- file plan- See Also:
RecordsManagementAuditService.stopAuditLog(org.alfresco.service.cmr.repository.NodeRef)
-
clearAuditLog
public void clearAuditLog(NodeRef filePlan)
Description copied from interface:RecordsManagementAuditService
Clears the RM audit.- Specified by:
clearAuditLog
in interfaceRecordsManagementAuditService
- Parameters:
filePlan
- file plan- See Also:
RecordsManagementAuditService.clearAuditLog(org.alfresco.service.cmr.repository.NodeRef)
-
getDateAuditLogLastStarted
public Date getDateAuditLogLastStarted(NodeRef filePlan)
Returns the date the RM audit was last started.- Specified by:
getDateAuditLogLastStarted
in interfaceRecordsManagementAuditService
- Parameters:
filePlan
- file plan- Returns:
- Date the audit was last started
-
getDateAuditLogLastStopped
public Date getDateAuditLogLastStopped(NodeRef filePlan)
Description copied from interface:RecordsManagementAuditService
Returns the date the RM audit was last stopped.- Specified by:
getDateAuditLogLastStopped
in interfaceRecordsManagementAuditService
- Returns:
- Date the audit was last stopped
- See Also:
RecordsManagementAuditService.getDateAuditLogLastStopped(org.alfresco.service.cmr.repository.NodeRef)
-
auditEvent
public void auditEvent(NodeRef nodeRef, String eventName)
Description copied from interface:RecordsManagementAuditService
Audits an event, assumes no properties where modified and that the event should not be audited immediately.- Specified by:
auditEvent
in interfaceRecordsManagementAuditService
- Parameters:
nodeRef
- node referenceeventName
- event name- See Also:
RecordsManagementAuditService.auditEvent(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
-
auditEvent
public void auditEvent(NodeRef nodeRef, String eventName, Map<QName,Serializable> before, Map<QName,Serializable> after)
Description copied from interface:RecordsManagementAuditService
Audits an event, assumes that the event should not be audited immediately and not be removed if no property is changed.- Specified by:
auditEvent
in interfaceRecordsManagementAuditService
- Parameters:
nodeRef
- node referenceeventName
- event namebefore
- property values before event (this must be modifiable and may be changed by the method).after
- property values after event (this must be modifiable and may be changed by the method).- See Also:
RecordsManagementAuditService.auditEvent(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.util.Map, java.util.Map)
-
auditEvent
public void auditEvent(NodeRef nodeRef, String eventName, Map<QName,Serializable> before, Map<QName,Serializable> after, boolean immediate)
Description copied from interface:RecordsManagementAuditService
Audit event, assumes not to be removed if no property is changed.- Specified by:
auditEvent
in interfaceRecordsManagementAuditService
- Parameters:
nodeRef
- node referenceeventName
- event namebefore
- property values before event (this must be modifiable and may be changed by the method).after
- property values after event (this must be modifiable and may be changed by the method).immediate
- true if event is to be audited immediately, false otherwise- See Also:
RecordsManagementAuditService.auditEvent(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.util.Map, java.util.Map, boolean)
-
auditEvent
public void auditEvent(NodeRef nodeRef, String eventName, Map<QName,Serializable> before, Map<QName,Serializable> after, boolean immediate, boolean removeIfNoPropertyChanged)
Description copied from interface:RecordsManagementAuditService
Audit event.- Specified by:
auditEvent
in interfaceRecordsManagementAuditService
- Parameters:
nodeRef
- node referenceeventName
- event namebefore
- property values before event (this must be modifiable and may be changed by the method).after
- property values after event (this must be modifiable and may be changed by the method).immediate
- true if event is to be audited immediately, false otherwiseremoveIfNoPropertyChanged
- true if event is not audited when there are no properties changed, false otherwise- See Also:
RecordsManagementAuditService.auditEvent(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.util.Map, java.util.Map, boolean)
-
auditOrUpdateEvent
public void auditOrUpdateEvent(NodeRef nodeRef, String eventName, Map<QName,Serializable> before, Map<QName,Serializable> after, boolean removeIfNoPropertyChanged)
Supply incremental changes as part of an event. This will either create a new event or update the existing details to put any supplied properties into the map.- Specified by:
auditOrUpdateEvent
in interfaceRecordsManagementAuditService
- Parameters:
nodeRef
- node referenceeventName
- event namebefore
- additional property values before event (this must be modifiable and may be changed by the method).after
- additional property values after event (this must be modifiable and may be changed by the method).removeIfNoPropertyChanged
- true if event is not audited when there are no properties changed, false otherwise
-
getAuditTrailFile
public File getAuditTrailFile(RecordsManagementAuditQueryParameters params, RecordsManagementAuditService.ReportFormat format)
Retrieves a list of audit log entries using the provided parameters represented by the RecordsManagementAuditQueryParameters instance.The parameters are all optional so an empty RecordsManagementAuditQueryParameters object will result in ALL audit log entries for the RM system being returned. Setting the various parameters effectively filters the full audit trail.
- Specified by:
getAuditTrailFile
in interfaceRecordsManagementAuditService
- Parameters:
params
- Parameters to use to retrieve audit trail (never null)format
- The format the report should be produced in- Returns:
- File containing JSON representation of audit trail
-
getAuditTrail
public List<RecordsManagementAuditEntry> getAuditTrail(RecordsManagementAuditQueryParameters params)
Retrieves a list of audit log entries using the provided parameters represented by the RecordsManagementAuditQueryParameters instance.The parameters are all optional so an empty RecordsManagementAuditQueryParameters object will result in ALL audit log entries for the RM system being returned. Setting the various parameters effectively filters the full audit trail.
- Specified by:
getAuditTrail
in interfaceRecordsManagementAuditService
- Parameters:
params
- Parameters to use to retrieve audit trail (never null)- Returns:
- All entries for the audit trail
-
getAuditTrailImpl
protected void getAuditTrailImpl(RecordsManagementAuditQueryParameters params, List<RecordsManagementAuditEntry> results, Writer writer, RecordsManagementAuditService.ReportFormat reportFormat) throws IOException
Get the audit trail, optionally dumping the results the the given writer dumping to a list.- Parameters:
params
- the search parametersresults
- the list to which individual results will be dumpedwriter
- Writer to write the audit trailreportFormat
- Format to write the audit trail in, ignored if writer isnull
- Throws:
IOException
-
getStartOfDay
protected Date getStartOfDay(Date date)
Calculates the start of the given date. For example, if you had the date time of 12 Aug 2013 12:10:15.158 the result would be 12 Aug 2013 00:00:00.000.- Parameters:
date
- The date for which the start should be calculated.- Returns:
- Returns the start of the given date.
-
fileAuditTrailAsRecord
public NodeRef fileAuditTrailAsRecord(RecordsManagementAuditQueryParameters params, NodeRef destination, RecordsManagementAuditService.ReportFormat format)
Retrieves a list of audit log entries using the provided parameters represented by the RecordsManagementAuditQueryParameters instance and then files the resulting log as an undeclared record in the record folder represented by the given NodeRef.The parameters are all optional so an empty RecordsManagementAuditQueryParameters object will result in ALL audit log entries for the RM system being returned. Setting the various parameters effectively filters the full audit trail.
- Specified by:
fileAuditTrailAsRecord
in interfaceRecordsManagementAuditService
- Parameters:
params
- Parameters to use to retrieve audit trail (never null)destination
- NodeRef representing a record folder in which to file the audit logformat
- The format the report should be produced in- Returns:
- NodeRef of the undeclared record filed
-
getAuditEvents
public List<AuditEvent> getAuditEvents()
Retrieves a list of audit events.- Specified by:
getAuditEvents
in interfaceRecordsManagementAuditService
- Returns:
- List of audit events
-
isEnabled
@Deprecated public boolean isEnabled()
Deprecated.- Specified by:
isEnabled
in interfaceRecordsManagementAuditServiceDeprecated
-
start
@Deprecated public void start()
Deprecated.usestartAuditLog(NodeRef)
instead
-
stop
@Deprecated public void stop()
Deprecated.- Specified by:
stop
in interfaceRecordsManagementAuditServiceDeprecated
-
getDateLastStarted
@Deprecated public Date getDateLastStarted()
Deprecated.- Specified by:
getDateLastStarted
in interfaceRecordsManagementAuditServiceDeprecated
-
getDateLastStopped
@Deprecated public Date getDateLastStopped()
Deprecated.- Specified by:
getDateLastStopped
in interfaceRecordsManagementAuditServiceDeprecated
-
clear
@Deprecated public void clear()
Deprecated.- Specified by:
clear
in interfaceRecordsManagementAuditServiceDeprecated
-
auditRMAction
@Deprecated public void auditRMAction(RecordsManagementAction action, NodeRef nodeRef, Map<String,Serializable> parameters)
Deprecated.since 2.1- Specified by:
auditRMAction
in interfaceRecordsManagementAuditServiceDeprecated
- Since:
- 3.2
-
-