mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-4106 (ALF-4103): AuditService REST API
- Enable/disable auditing and tests - TODO: Use .ftl to generate JSON from model git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21520 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -43,6 +43,25 @@ public class AuditServiceImpl implements AuditService
|
||||
this.auditComponent = auditComponent;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 3.4
|
||||
*/
|
||||
public boolean isAuditEnabled()
|
||||
{
|
||||
return auditComponent.isAuditEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 3.4
|
||||
*/
|
||||
@Override
|
||||
public void setAuditEnabled(boolean enable)
|
||||
{
|
||||
auditComponent.setAuditEnabled(enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 3.4
|
||||
@@ -53,22 +72,12 @@ public class AuditServiceImpl implements AuditService
|
||||
return auditComponent.getAuditApplications();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 3.4
|
||||
*/
|
||||
public boolean isAuditEnabled()
|
||||
{
|
||||
return auditComponent.isAuditEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 3.2
|
||||
*/
|
||||
public boolean isAuditEnabled(String applicationName, String path)
|
||||
{
|
||||
// Get the root path for the application
|
||||
return auditComponent.isAuditPathEnabled(applicationName, path);
|
||||
}
|
||||
|
||||
@@ -100,6 +109,17 @@ public class AuditServiceImpl implements AuditService
|
||||
auditComponent.deleteAuditEntries(applicationName, null, now);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 3.4
|
||||
*/
|
||||
@Override
|
||||
public void clearAudit(String applicationName, Long fromTime, Long toTime)
|
||||
{
|
||||
toTime = (toTime == null) ? Long.valueOf(System.currentTimeMillis()) : toTime;
|
||||
auditComponent.deleteAuditEntries(applicationName, fromTime, toTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 3.3
|
||||
|
Reference in New Issue
Block a user