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 headersQ
- 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>
See
AuditService
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultAuditService
(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 TypeMethodDescriptionprotected 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 headerorg.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 headerorg.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 headerorg.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 auditsorg.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 accountorg.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
-
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 interfaceAuditService<P extends AuditHeader,
Q extends AuditDetail> - Parameters:
filters
- RSQL filters to applypageable
- Paging configurationcontext
- 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 interfaceAuditService<P extends AuditHeader,
Q extends AuditDetail> - Parameters:
accountId
- The account to filter results byfilters
- Additional RSQL filters to applypageable
- Paging configurationcontext
- 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 interfaceAuditService<P extends AuditHeader,
Q extends AuditDetail> - Parameters:
customerId
- The customer to filter results byfilters
- Additional RSQL filters to applypageable
- Paging configurationcontext
- 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 interfaceAuditService<P extends AuditHeader,
Q extends AuditDetail> - Parameters:
headerId
- The header id to filter details byfilters
- Additional RSQL filters to applypageable
- Paging configurationcontext
- 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 interfaceAuditService<P extends AuditHeader,
Q extends AuditDetail> - Parameters:
headerId
- The header id to filter details byaccountId
- The account to filter results byfilters
- Additional RSQL filters to applypageable
- Paging configurationcontext
- 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 interfaceAuditService<P extends AuditHeader,
Q extends AuditDetail> - Parameters:
headerId
- The header id to filter details bycustomerId
- The customer to filter results byfilters
- Additional RSQL filters to applypageable
- Paging configurationcontext
- 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()
-