ALF-4106: Added entry deletion count return value for clear()

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22109 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-08-31 20:05:41 +00:00
parent 10da961097
commit 59b797c8fc
6 changed files with 21 additions and 14 deletions

View File

@@ -113,7 +113,7 @@ public class AuditComponentImpl implements AuditComponent
* {@inheritDoc}
* @since 3.2
*/
public void deleteAuditEntries(String applicationName, Long fromTime, Long toTime)
public int deleteAuditEntries(String applicationName, Long fromTime, Long toTime)
{
ParameterCheck.mandatory("applicationName", applicationName);
AlfrescoTransactionSupport.checkTransactionReadState(true);
@@ -125,17 +125,20 @@ public class AuditComponentImpl implements AuditComponent
{
logger.debug("No audit application named '" + applicationName + "' has been registered.");
}
return;
return 0;
}
Long applicationId = application.getApplicationId();
auditDAO.deleteAuditEntries(applicationId, fromTime, toTime);
int deleted = auditDAO.deleteAuditEntries(applicationId, fromTime, toTime);
// Done
if (logger.isDebugEnabled())
{
logger.debug("Delete audit entries for " + applicationName + " (" + fromTime + " to " + toTime);
logger.debug(
"Delete audit " + deleted + " entries for " + applicationName +
" (" + fromTime + " to " + toTime);
}
return deleted;
}
/**