mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM: tweak Audit Service API
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@55260 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -112,7 +112,7 @@ public abstract class AuditableActionExecuterAbstractBase extends ActionExecuter
|
||||
if (auditedImmediately == true)
|
||||
{
|
||||
// To be audited immediately before the action is executed, eg. to audit before actionedUponNodeRef gets deleted during the execution.
|
||||
getAuditService().auditEvent(actionedUponNodeRef, this.getActionDefinition().getName(), null, null);
|
||||
getAuditService().auditEvent(actionedUponNodeRef, this.getActionDefinition().getName(), null, null, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -75,7 +75,7 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
|
||||
String eventName);
|
||||
|
||||
/**
|
||||
* Audits an event, assumes that the event should be audited immediately and not be removed if no property is changed.
|
||||
* Audits an event, assumes that the event should not be audited immediately and not be removed if no property is changed.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param eventName event name
|
||||
@@ -87,6 +87,21 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
|
||||
Map<QName, Serializable> before,
|
||||
Map<QName, Serializable> after);
|
||||
|
||||
/**
|
||||
* Audit event, assumes not to be removed if no property is changed.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param eventName event name
|
||||
* @param before property values before event
|
||||
* @param after property values after event
|
||||
* @param immediate true if event is to be audited immediately, false otherwise
|
||||
*/
|
||||
void auditEvent(NodeRef nodeRef,
|
||||
String eventName,
|
||||
Map<QName, Serializable> before,
|
||||
Map<QName, Serializable> after,
|
||||
boolean immediate);
|
||||
|
||||
/**
|
||||
* Audit event.
|
||||
*
|
||||
|
@@ -359,7 +359,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
logger.info("Started Records Management auditing");
|
||||
}
|
||||
|
||||
auditEvent(filePlan, AUDIT_EVENT_START, null, null);
|
||||
auditEvent(filePlan, AUDIT_EVENT_START, null, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -370,7 +370,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
ParameterCheck.mandatory("filePlan", filePlan);
|
||||
// TODO use file plan to scope audit log
|
||||
|
||||
auditEvent(filePlan, AUDIT_EVENT_STOP, null, null);
|
||||
auditEvent(filePlan, AUDIT_EVENT_STOP, null, null, true);
|
||||
|
||||
auditService.disableAudit(
|
||||
RM_AUDIT_APPLICATION_NAME,
|
||||
@@ -397,7 +397,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
logger.debug("Records Management audit log has been cleared");
|
||||
}
|
||||
|
||||
auditEvent(filePlan, AUDIT_EVENT_CLEAR, null, null);
|
||||
auditEvent(filePlan, AUDIT_EVENT_CLEAR, null, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -440,7 +440,16 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
@Override
|
||||
public void auditEvent(NodeRef nodeRef, String eventName, Map<QName, Serializable> before, Map<QName, Serializable> after)
|
||||
{
|
||||
auditEvent(nodeRef, eventName, before, after, true, false);
|
||||
auditEvent(nodeRef, eventName, before, after, false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService#auditEvent(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.util.Map, java.util.Map, boolean)
|
||||
*/
|
||||
@Override
|
||||
public void auditEvent(NodeRef nodeRef, String eventName, Map<QName, Serializable> before, Map<QName, Serializable> after, boolean immediate)
|
||||
{
|
||||
auditEvent(nodeRef, eventName, before, after, immediate, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -984,7 +993,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
// grab the default file plan, but don't fail if it can't be found!
|
||||
nodeRef = filePlanService.getFilePlanBySiteId(FilePlanService.DEFAULT_RM_SITE_ID);
|
||||
}
|
||||
auditEvent(nodeRef, AUDIT_EVENT_VIEW, null, null);
|
||||
auditEvent(nodeRef, AUDIT_EVENT_VIEW, null, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user