Class DefaultDataFeedProcessService<P extends DataFeedProcess>

java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
com.broadleafcommerce.datafeed.service.DefaultDataFeedProcessService<P>
Type Parameters:
P - business/projection type of DataFeedProcess
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>, DataFeedProcessService<P>

public class DefaultDataFeedProcessService<P extends DataFeedProcess> extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P> implements DataFeedProcessService<P>
Default implementation of DataFeedProcessService
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultDataFeedProcessService(DataFeedProcessRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected DataFeedProcessRepository<com.broadleafcommerce.data.tracking.core.Trackable>
     
    protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node>
     
    org.springframework.data.domain.Page<P>
    readAllByName(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Reads the DataFeedProcess instances that matched the given name and filters.
    readByContextIdOpt(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Similar to CrudEntityService.readByContextId(String, ContextInfo), but returns an Optional instead of throwing EntityMissingException when not found.
    readByProcessTypeAndEnabledAndApplication(String processType, boolean isEnabled, String applicationId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all DataFeedProcess instances matching the given criteria.

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService

    getRsqlHelper, readAll, readAll, readAll, readAll

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService

    convertFromPersistentDomain, convertToPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, getRepository, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService

    create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService

    readAll, readAll, readAll, readAll
  • Constructor Details

    • DefaultDataFeedProcessService

      public DefaultDataFeedProcessService(DataFeedProcessRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, @Nullable com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser)
  • Method Details

    • readAllByName

      public org.springframework.data.domain.Page<P> readAllByName(@Nullable String name, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: DataFeedProcessService
      Reads the DataFeedProcess instances that matched the given name and filters.
      Specified by:
      readAllByName in interface DataFeedProcessService<P extends DataFeedProcess>
      Parameters:
      name - the data feed process name
      filters - the RSQL Node used to restrict result
      page - the requested page of results from the database
      context - context information around multitenant state
      Returns:
      the DataFeedProcess instances that matched the given name and filters
    • readByContextIdOpt

      public Optional<P> readByContextIdOpt(String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: DataFeedProcessService
      Similar to CrudEntityService.readByContextId(String, ContextInfo), but returns an Optional instead of throwing EntityMissingException when not found.
      Specified by:
      readByContextIdOpt in interface DataFeedProcessService<P extends DataFeedProcess>
      Parameters:
      id - The context id for the entity. This is the id by which the business recognizes the item.
      context - Context information used to discriminate the correct version of an entity by context id when multiple verions may be available across sandboxes, catalogs and applications.
      Returns:
      an Optional containing the narrowed entity instance in the form of a business instance, else Optional.empty()
    • readByProcessTypeAndEnabledAndApplication

      public List<P> readByProcessTypeAndEnabledAndApplication(String processType, boolean isEnabled, @Nullable String applicationId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: DataFeedProcessService
      Finds all DataFeedProcess instances matching the given criteria.
      Specified by:
      readByProcessTypeAndEnabledAndApplication in interface DataFeedProcessService<P extends DataFeedProcess>
      Parameters:
      processType - the DataFeedProcess.getProcessType() to match
      isEnabled - the value of DataFeedProcess.isEnabled() to match
      applicationId - (optional) if provided, results will be filtered to only those who match the given DataFeedProcess.getApplicationId()
      contextInfo - context information around multitenant state
      Returns:
      a list of found results
    • getDataFeedProcessRepository

      protected DataFeedProcessRepository<com.broadleafcommerce.data.tracking.core.Trackable> getDataFeedProcessRepository()
    • getParser

      @Nullable protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> getParser()