MNT-17512 Minor fixes after review.

Add new service method to security bean. Add early exit from audit event
finding loop. Tidy javadoc and remove some blank lines.
This commit is contained in:
Tom Page
2017-02-24 08:05:11 +00:00
parent 7dab46ad40
commit ac65ee7758
4 changed files with 4 additions and 8 deletions

View File

@@ -46,8 +46,6 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
{
public enum ReportFormat { HTML, JSON }
/**
* Retrieves a list of audit events.
*
@@ -165,7 +163,6 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
*/
void stopAuditLog(NodeRef filePlan);
/**
* Clears the RM audit.
*

View File

@@ -577,22 +577,20 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
*
* @param nodeRef The node the event is against.
* @param eventName The name of the event.
* @param auditDetails The complete set of events for the transaction.
* @return The pre-existing event node, or null if none exists.
*/
private RMAuditNode findExistingEventNode(NodeRef nodeRef, String eventName)
{
AlfrescoTransactionSupport.bindListener(txnListener);
Set<RMAuditNode> auditDetails = TransactionalResourceHelper.getSet(KEY_RM_AUDIT_NODE_RECORDS);
RMAuditNode existingEventNode = null;
for (RMAuditNode existingRMAuditNode : auditDetails)
{
if (existingRMAuditNode.getNodeRef().equals(nodeRef) && existingRMAuditNode.getEventName().equals(eventName))
{
existingEventNode = existingRMAuditNode;
return existingRMAuditNode;
}
}
return existingEventNode;
return null;
}
/**

View File

@@ -209,7 +209,7 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl
{
// post process permission
result = postProcessor.process(result, nodeRef, perm);
}
}
return result;
}