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 Details

    • AuditServiceImpl

      public AuditServiceImpl()
  • 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) throws SiteNotFoundException
      Description copied from interface: AuditService
      Get audit log
      Specified by:
      getAuditLog in interface AuditService
      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 record
      limit - number of records to return
      user - filter logs by given user
      operations - filter logs by given operations
      includeParameters - include audit log parameters into result set
      dateFrom - filter logs by date starting from given date
      dateTo - filter logs by date until given date
      target - filter logs by given operation target
      origin - filter logs by origin
      clusterNodeId - filter logs by given cluster node id
      sort - sort logs by given sort type
      order - 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 interface AuditService
      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 user
      operations - filter logs by given operations
      includeParameters - include audit log parameters into result set
      dateFrom - filter logs by date starting from given date
      dateTo - filter logs by date until given date
      target - filter logs by given operation target
      origin - filter logs by origin
      clusterNodeId - 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 interface AuditService
      Parameters:
      siteId - site ID. It can be null or empty when user is system admin
      auditLogId - 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 interface AuditService
      Parameters:
      site - site
      limit - limit
      sort - sort by
      ascending - true if ascending order, otherwise false
      excludeLive - exclude live items
      filterType - 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)
    • setContentService

      public void setContentService(ContentService contentService)
    • setSecurityService

      public void setSecurityService(SecurityService securityService)