Class DefaultAuditService<P extends AuditHeader,Q extends AuditDetail>

java.lang.Object
com.broadleafcommerce.audit.service.DefaultAuditService<P,Q>
Type Parameters:
P - The possibly extended projection type for headers
Q - The possibly extended projection type for details
All Implemented Interfaces:
AuditService<P,Q>

public class DefaultAuditService<P extends AuditHeader,Q extends AuditDetail> extends Object implements AuditService<P,Q>
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultAuditService(com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper rsqlHelper, AuditHeaderRepository<com.broadleafcommerce.data.tracking.core.Trackable> headerRepository, AuditDetailRepository<com.broadleafcommerce.data.tracking.core.Trackable> detailRepository)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected AuditDetailRepository<com.broadleafcommerce.data.tracking.core.Trackable>
     
    protected AuditHeaderRepository<com.broadleafcommerce.data.tracking.core.Trackable>
     
    protected com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper
     
    org.springframework.data.domain.Page<Q>
    readAllDetailsByHeader(@NonNull String headerId, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Read all details for a given header
    org.springframework.data.domain.Page<Q>
    readAllDetailsByHeaderAndAccount(@NonNull String headerId, @NonNull String accountId, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Read all details for a given header
    org.springframework.data.domain.Page<Q>
    readAllDetailsByHeaderAndCustomer(@NonNull String headerId, @NonNull String customerId, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Read all details for a given header
    org.springframework.data.domain.Page<P>
    readAllHeaders(@NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Read all headers across all available audits
    org.springframework.data.domain.Page<P>
    readAllHeadersByAccount(@NonNull String accountId, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Read all headers for a given account
    org.springframework.data.domain.Page<P>
    readAllHeadersByCustomer(@NonNull String customerId, @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Read all headers for a given customer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultAuditService

      public DefaultAuditService(com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper rsqlHelper, AuditHeaderRepository<com.broadleafcommerce.data.tracking.core.Trackable> headerRepository, AuditDetailRepository<com.broadleafcommerce.data.tracking.core.Trackable> detailRepository)
  • Method Details

    • readAllHeaders

      public org.springframework.data.domain.Page<P> readAllHeaders(@NonNull @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull @NonNull org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: AuditService
      Read all headers across all available audits
      Specified by:
      readAllHeaders in interface AuditService<P extends AuditHeader,Q extends AuditDetail>
      Parameters:
      filters - RSQL filters to apply
      pageable - Paging configuration
      context - DataTracking tenant context information
      Returns:
      The page of results
    • readAllHeadersByAccount

      public org.springframework.data.domain.Page<P> readAllHeadersByAccount(@NonNull @NonNull String accountId, @NonNull @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull @NonNull org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: AuditService
      Read all headers for a given account
      Specified by:
      readAllHeadersByAccount in interface AuditService<P extends AuditHeader,Q extends AuditDetail>
      Parameters:
      accountId - The account to filter results by
      filters - Additional RSQL filters to apply
      pageable - Paging configuration
      context - DataTracking tenant context information
      Returns:
      The page of results
    • readAllHeadersByCustomer

      public org.springframework.data.domain.Page<P> readAllHeadersByCustomer(@NonNull @NonNull String customerId, @NonNull @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull @NonNull org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: AuditService
      Read all headers for a given customer
      Specified by:
      readAllHeadersByCustomer in interface AuditService<P extends AuditHeader,Q extends AuditDetail>
      Parameters:
      customerId - The customer to filter results by
      filters - Additional RSQL filters to apply
      pageable - Paging configuration
      context - DataTracking tenant context information
      Returns:
      The page of results
    • readAllDetailsByHeader

      public org.springframework.data.domain.Page<Q> readAllDetailsByHeader(@NonNull @NonNull String headerId, @NonNull @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull @NonNull org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: AuditService
      Read all details for a given header
      Specified by:
      readAllDetailsByHeader in interface AuditService<P extends AuditHeader,Q extends AuditDetail>
      Parameters:
      headerId - The header id to filter details by
      filters - Additional RSQL filters to apply
      pageable - Paging configuration
      context - DataTracking tenant context information
      Returns:
      The page of results
    • readAllDetailsByHeaderAndAccount

      public org.springframework.data.domain.Page<Q> readAllDetailsByHeaderAndAccount(@NonNull @NonNull String headerId, @NonNull @NonNull String accountId, @NonNull @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull @NonNull org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: AuditService
      Read all details for a given header
      Specified by:
      readAllDetailsByHeaderAndAccount in interface AuditService<P extends AuditHeader,Q extends AuditDetail>
      Parameters:
      headerId - The header id to filter details by
      accountId - The account to filter results by
      filters - Additional RSQL filters to apply
      pageable - Paging configuration
      context - DataTracking tenant context information
      Returns:
      The page of results
    • readAllDetailsByHeaderAndCustomer

      public org.springframework.data.domain.Page<Q> readAllDetailsByHeaderAndCustomer(@NonNull @NonNull String headerId, @NonNull @NonNull String customerId, @NonNull @NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull @NonNull org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: AuditService
      Read all details for a given header
      Specified by:
      readAllDetailsByHeaderAndCustomer in interface AuditService<P extends AuditHeader,Q extends AuditDetail>
      Parameters:
      headerId - The header id to filter details by
      customerId - The customer to filter results by
      filters - Additional RSQL filters to apply
      pageable - Paging configuration
      context - DataTracking tenant context information
      Returns:
      The page of results
    • getRsqlHelper

      @NonNull protected com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper getRsqlHelper()
    • getHeaderRepository

      @NonNull protected AuditHeaderRepository<com.broadleafcommerce.data.tracking.core.Trackable> getHeaderRepository()
    • getDetailRepository

      @NonNull protected AuditDetailRepository<com.broadleafcommerce.data.tracking.core.Trackable> getDetailRepository()