Class AuditServiceInternalImpl
java.lang.Object
org.craftercms.studio.impl.v2.service.audit.internal.AuditServiceInternalImpl
- All Implemented Interfaces:
AuditServiceInternal
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate Audit log entry and populate common propertiesvoiddeleteAuditLogForSite(long siteId) Delete audit log for sitegetAuditLog(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 parametersgetAuditLogEntry(String siteId, long auditLogId) Get audit log entry by idintgetAuditLogTotal(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 parametersgetCommitAuthors(long siteId, List<String> commitIds, String path) Get commit authors from a list of commit ids This will look in the audit data and retrieve a CommitAuthor when: There is an audit entry for the given commit id AND the audit entry origin is API AND the audit entry primary_target_value correspond to the given pathbooleaninsertAuditLog(AuditLog auditLog) Insert log audit entrybooleanCheck if a commit has been audited.selectUserFeedEntries(String user, String siteId, int offset, int limit, String contentType, boolean hideLiveItems) voidsetAuditDao(AuditDAO auditDao) voidsetRetryingDatabaseOperationFacade(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade)
-
Constructor Details
-
AuditServiceInternalImpl
public AuditServiceInternalImpl()
-
-
Method Details
-
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:AuditServiceInternalGet audit log filtered by parameters- Specified by:
getAuditLogin 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:AuditServiceInternalGet the audit log entry count given the provided filter parameters- Specified by:
getAuditLogTotalin 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
-
getAuditLogEntry
Description copied from interface:AuditServiceInternalGet audit log entry by id- Specified by:
getAuditLogEntryin 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
Description copied from interface:AuditServiceInternalInsert log audit entry- Specified by:
insertAuditLogin interfaceAuditServiceInternal- Parameters:
auditLog- Audit log to insert- Returns:
- true if successful, otherwise false
-
createAuditLogEntry
Description copied from interface:AuditServiceInternalCreate Audit log entry and populate common properties- Specified by:
createAuditLogEntryin interfaceAuditServiceInternal- Returns:
- Audit log entry
-
selectUserFeedEntries
public List<AuditLog> selectUserFeedEntries(String user, String siteId, int offset, int limit, String contentType, boolean hideLiveItems) - Specified by:
selectUserFeedEntriesin interfaceAuditServiceInternal
-
deleteAuditLogForSite
public void deleteAuditLogForSite(long siteId) Description copied from interface:AuditServiceInternalDelete audit log for site- Specified by:
deleteAuditLogForSitein interfaceAuditServiceInternal- Parameters:
siteId- site id
-
getCommitAuthors
Description copied from interface:AuditServiceInternalGet commit authors from a list of commit ids This will look in the audit data and retrieve a CommitAuthor when:- There is an audit entry for the given commit id
- AND the audit entry origin is API
- AND the audit entry primary_target_value correspond to the given path
- Specified by:
getCommitAuthorsin interfaceAuditServiceInternal- Parameters:
siteId- site idcommitIds- commit idspath- path of the file- Returns:
- list
CommitAuthorof the commit
-
isAudited
Description copied from interface:AuditServiceInternalCheck if a commit has been audited.- Specified by:
isAuditedin interfaceAuditServiceInternal- Parameters:
siteId- site idcommitId- commit id- Returns:
- true if there is an audit entry for the given commit id, otherwise false
-
setAuditDao
-
setRetryingDatabaseOperationFacade
public void setRetryingDatabaseOperationFacade(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade)
-