Class AuditServiceInternalImpl
- java.lang.Object
-
- org.craftercms.studio.impl.v2.service.audit.internal.AuditServiceInternalImpl
-
- All Implemented Interfaces:
AuditServiceInternal
public class AuditServiceInternalImpl extends Object implements AuditServiceInternal
-
-
Constructor Summary
Constructors Constructor Description AuditServiceInternalImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuditLog
createAuditLogEntry()
Create Audit log entry and populate common propertiesvoid
deleteAuditLogForSite(long siteId)
Delete audit log for siteList<AuditLog>
getAuditDashboard(String siteId, int offset, int limit, String user, List<String> operations, ZonedDateTime dateFrom, ZonedDateTime dateTo, String target, String sort, String order)
Get audit dashboard content filtered by parametersint
getAuditDashboardTotal(String siteId, String user, List<String> operations, ZonedDateTime dateFrom, ZonedDateTime dateTo, String target)
Get total number of records for audit dashboard filtered by parametersList<AuditLog>
getAuditLog(String siteId, int offset, int limit, String user, List<String> operations, boolean includeParameters, ZonedDateTime dateFrom, ZonedDateTime dateTo, String target, String origin, String clusterNodeId, String sort, String order)
Get audit log filtered by parametersAuditLog
getAuditLogEntry(String siteId, long auditLogId)
Get audit log entry by idList<AuditLog>
getAuditLogForSite(String site, int offset, int limit, String user, List<String> actions)
Get audit log for siteint
getAuditLogForSiteTotal(String site, String user, List<String> actions)
Get total number of audit log entries for siteint
getAuditLogTotal(String siteId, String user, List<String> operations, boolean includeParameters, ZonedDateTime dateFrom, ZonedDateTime dateTo, String target, String origin, String clusterNodeId)
Get the audit log entry count given the provided filter parametersboolean
insertAuditLog(AuditLog auditLog)
Insert log audit entryList<AuditLog>
selectUserFeedEntries(String user, String siteId, int offset, int limit, String contentType, boolean hideLiveItems)
void
setAuditDao(AuditDAO auditDao)
void
setRetryingDatabaseOperationFacade(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade)
-
-
-
Method Detail
-
getAuditLogForSite
public List<AuditLog> getAuditLogForSite(String site, int offset, int limit, String user, List<String> actions) throws SiteNotFoundException
Description copied from interface:AuditServiceInternal
Get audit log for site- Specified by:
getAuditLogForSite
in interfaceAuditServiceInternal
- Parameters:
site
- siteoffset
- offset of the first recordlimit
- number of records to returnuser
- filter logs by useractions
- filter logs by actions- Returns:
- audit list
- Throws:
SiteNotFoundException
- thrown if site does not exist
-
getAuditLogForSiteTotal
public int getAuditLogForSiteTotal(String site, String user, List<String> actions) throws SiteNotFoundException
Description copied from interface:AuditServiceInternal
Get total number of audit log entries for site- Specified by:
getAuditLogForSiteTotal
in interfaceAuditServiceInternal
- Parameters:
site
- siteuser
- filter logs by useractions
- filter logs by actions- Returns:
- number of audit log entries
- Throws:
SiteNotFoundException
- thrown if site does not exist
-
getAuditLog
public List<AuditLog> getAuditLog(String siteId, int offset, int limit, String user, List<String> operations, boolean includeParameters, ZonedDateTime dateFrom, ZonedDateTime dateTo, String target, String origin, String clusterNodeId, String sort, String order)
Description copied from interface:AuditServiceInternal
Get audit log filtered by parameters- Specified by:
getAuditLog
in interfaceAuditServiceInternal
- Parameters:
siteId
- site identifieroffset
- offset of first record in result setlimit
- number of records to return as result setuser
- filter by useroperations
- filter by list of operationsincludeParameters
- include audit log parameters in result setdateFrom
- filter results by lower border for datedateTo
- filter results by upper border for datetarget
- filter results by targetorigin
- filter results by originclusterNodeId
- filter results by cluster nodesort
- sort strategyorder
- order strategy- Returns:
- List of audit log entries
-
getAuditLogTotal
public int getAuditLogTotal(String siteId, String user, List<String> operations, boolean includeParameters, ZonedDateTime dateFrom, ZonedDateTime dateTo, String target, String origin, String clusterNodeId)
Description copied from interface:AuditServiceInternal
Get the audit log entry count given the provided filter parameters- Specified by:
getAuditLogTotal
in interfaceAuditServiceInternal
- Parameters:
siteId
- site IDuser
- filter by useroperations
- filter by list of operationsincludeParameters
- include audit log parameters in result setdateFrom
- filter results by lower border for datedateTo
- filter results by upper border for datetarget
- filter results by targetorigin
- filter results by originclusterNodeId
- filter results by cluster node- Returns:
- total number of records matching the filter
-
getAuditDashboardTotal
public int getAuditDashboardTotal(String siteId, String user, List<String> operations, ZonedDateTime dateFrom, ZonedDateTime dateTo, String target)
Description copied from interface:AuditServiceInternal
Get total number of records for audit dashboard filtered by parameters- Specified by:
getAuditDashboardTotal
in interfaceAuditServiceInternal
- Parameters:
siteId
- site identifieruser
- filter logs by useroperations
- filter logs by actiondateFrom
- lower boundary for operation timestampdateTo
- upper boundary for operation timestamptarget
- filter logs by target- Returns:
- total number of records
-
getAuditDashboard
public List<AuditLog> getAuditDashboard(String siteId, int offset, int limit, String user, List<String> operations, ZonedDateTime dateFrom, ZonedDateTime dateTo, String target, String sort, String order)
Description copied from interface:AuditServiceInternal
Get audit dashboard content filtered by parameters- Specified by:
getAuditDashboard
in interfaceAuditServiceInternal
- Parameters:
siteId
- site identifieroffset
- offset of the first recordlimit
- number of records to returnuser
- filter logs by useroperations
- filter logs by actionsdateFrom
- lower boundary for operation timestampdateTo
- upper boundary for operation timestamptarget
- filter logs by targetsort
- sort for recordsorder
- order for records- Returns:
- list of records for audit dashboard
-
getAuditLogEntry
public AuditLog getAuditLogEntry(String siteId, long auditLogId)
Description copied from interface:AuditServiceInternal
Get audit log entry by id- Specified by:
getAuditLogEntry
in interfaceAuditServiceInternal
- Parameters:
siteId
- the site ID. When null or empty, it will retrieve entries for all sites and include admin activities.auditLogId
- id of audit log entry to get- Returns:
- Audit log entry
-
insertAuditLog
public boolean insertAuditLog(AuditLog auditLog)
Description copied from interface:AuditServiceInternal
Insert log audit entry- Specified by:
insertAuditLog
in interfaceAuditServiceInternal
- Parameters:
auditLog
- Audit log to insert- Returns:
- true if successful, otherwise false
-
createAuditLogEntry
public AuditLog createAuditLogEntry()
Description copied from interface:AuditServiceInternal
Create Audit log entry and populate common properties- Specified by:
createAuditLogEntry
in interfaceAuditServiceInternal
- Returns:
- Audit log entry
-
selectUserFeedEntries
public List<AuditLog> selectUserFeedEntries(String user, String siteId, int offset, int limit, String contentType, boolean hideLiveItems)
- Specified by:
selectUserFeedEntries
in interfaceAuditServiceInternal
-
deleteAuditLogForSite
public void deleteAuditLogForSite(long siteId)
Description copied from interface:AuditServiceInternal
Delete audit log for site- Specified by:
deleteAuditLogForSite
in interfaceAuditServiceInternal
- Parameters:
siteId
- site id
-
setAuditDao
public void setAuditDao(AuditDAO auditDao)
-
setRetryingDatabaseOperationFacade
public void setRetryingDatabaseOperationFacade(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade)
-
-