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 ofDataFeedProcess
- 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
ConstructorsConstructorDescriptionDefaultDataFeedProcessService(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 TypeMethodDescriptionprotected 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 theDataFeedProcessinstances that matched the given name and filters.readByContextIdOpt(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Similar toCrudEntityService.readByContextId(String, ContextInfo), but returns anOptionalinstead of throwingEntityMissingExceptionwhen not found.readByProcessTypeAndEnabledAndApplication(String processType, boolean isEnabled, String applicationId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds allDataFeedProcessinstances matching the given criteria.Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService
getRsqlHelper, readAll, readAll, readAll, readAllMethods 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, updateSortMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, updateSortMethods 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:DataFeedProcessServiceReads theDataFeedProcessinstances that matched the given name and filters.- Specified by:
readAllByNamein interfaceDataFeedProcessService<P extends DataFeedProcess>- Parameters:
name- the data feed process namefilters- the RSQLNodeused to restrict resultpage- the requested page of results from the databasecontext- context information around multitenant state- Returns:
- the
DataFeedProcessinstances 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:DataFeedProcessServiceSimilar toCrudEntityService.readByContextId(String, ContextInfo), but returns anOptionalinstead of throwingEntityMissingExceptionwhen not found.- Specified by:
readByContextIdOptin interfaceDataFeedProcessService<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
Optionalcontaining the narrowed entity instance in the form of a business instance, elseOptional.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:DataFeedProcessServiceFinds allDataFeedProcessinstances matching the given criteria.- Specified by:
readByProcessTypeAndEnabledAndApplicationin interfaceDataFeedProcessService<P extends DataFeedProcess>- Parameters:
processType- theDataFeedProcess.getProcessType()to matchisEnabled- the value ofDataFeedProcess.isEnabled()to matchapplicationId- (optional) if provided, results will be filtered to only those who match the givenDataFeedProcess.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()
-