Class AuditServiceImpl
- java.lang.Object
-
- org.craftercms.studio.impl.v2.service.audit.AuditServiceImpl
-
- All Implemented Interfaces:
AuditService
public class AuditServiceImpl extends Object implements AuditService
-
-
Constructor Summary
Constructors Constructor Description AuditServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ContentItemTO
createActivityItem(String site, AuditLog auditLog, String id)
protected boolean
getActivityFeeds(String user, String site, int startPos, int size, String filterType, boolean hideLiveItems, List<ContentItemTO> contentItems, int remainingItem)
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)
Get audit logAuditLog
getAuditLogEntry(String siteId, long auditLogId)
Get audit log entry by idint
getAuditLogTotal(String siteId, String user, List<String> operations, boolean includeParameters, ZonedDateTime dateFrom, ZonedDateTime dateTo, String target, String origin, String clusterNodeId)
Get total number of audit log entries for given filtersList<ContentItemTO>
getUserActivities(String site, int limit, String sort, boolean ascending, boolean excludeLive, String filterType)
Get user activitiesvoid
setAuditServiceInternal(AuditServiceInternal auditServiceInternal)
void
setContentService(ContentService contentService)
void
setSecurityService(SecurityService securityService)
void
setSiteService(SiteService siteService)
-
-
-
Method Detail
-
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) throws SiteNotFoundException
Description copied from interface:AuditService
Get audit log- Specified by:
getAuditLog
in interfaceAuditService
- Parameters:
siteId
- filter logs by given site ID. It can be null or empty when user is system admin, it will then retrieve entries for all sites and include admin activities.offset
- offset of the first recordlimit
- number of records to returnuser
- filter logs by given useroperations
- filter logs by given operationsincludeParameters
- include audit log parameters into result setdateFrom
- filter logs by date starting from given datedateTo
- filter logs by date until given datetarget
- filter logs by given operation targetorigin
- filter logs by originclusterNodeId
- filter logs by given cluster node idsort
- sort logs by given sort typeorder
- order logs- Returns:
- audit log result set
- Throws:
SiteNotFoundException
-
getAuditLogTotal
public int getAuditLogTotal(String siteId, String user, List<String> operations, boolean includeParameters, ZonedDateTime dateFrom, ZonedDateTime dateTo, String target, String origin, String clusterNodeId) throws SiteNotFoundException
Description copied from interface:AuditService
Get total number of audit log entries for given filters- Specified by:
getAuditLogTotal
in interfaceAuditService
- Parameters:
siteId
- filter logs by given site ID. It can be null or empty when user is system admin, it will then retrieve entries for all sites and include admin activities.user
- filter logs by given useroperations
- filter logs by given operationsincludeParameters
- include audit log parameters into result setdateFrom
- filter logs by date starting from given datedateTo
- filter logs by date until given datetarget
- filter logs by given operation targetorigin
- filter logs by originclusterNodeId
- filter logs by given cluster node id- Returns:
- number of audit log entries
- Throws:
SiteNotFoundException
-
getAuditLogEntry
public AuditLog getAuditLogEntry(String siteId, long auditLogId) throws SiteNotFoundException
Description copied from interface:AuditService
Get audit log entry by id- Specified by:
getAuditLogEntry
in interfaceAuditService
- Parameters:
siteId
- site ID. It can be null or empty when user is system adminauditLogId
- audit log id- Returns:
- audit log entry
- Throws:
SiteNotFoundException
-
getUserActivities
public List<ContentItemTO> getUserActivities(String site, int limit, String sort, boolean ascending, boolean excludeLive, String filterType)
Description copied from interface:AuditService
Get user activities- Specified by:
getUserActivities
in interfaceAuditService
- Parameters:
site
- sitelimit
- limitsort
- sort byascending
- true if ascending order, otherwise falseexcludeLive
- exclude live itemsfilterType
- filter type- Returns:
- list of content items
-
getActivityFeeds
protected boolean getActivityFeeds(String user, String site, int startPos, int size, String filterType, boolean hideLiveItems, List<ContentItemTO> contentItems, int remainingItem)
-
createActivityItem
protected ContentItemTO createActivityItem(String site, AuditLog auditLog, String id)
-
setAuditServiceInternal
public void setAuditServiceInternal(AuditServiceInternal auditServiceInternal)
-
setSiteService
public void setSiteService(SiteService siteService)
-
setContentService
public void setContentService(ContentService contentService)
-
setSecurityService
public void setSecurityService(SecurityService securityService)
-
-