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
ConstructorDescriptionDefaultDataFeedProcessService
(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 theDataFeedProcess
instances 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 anOptional
instead of throwingEntityMissingException
when not found.readByProcessTypeAndEnabledAndApplication
(String processType, boolean isEnabled, String applicationId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds allDataFeedProcess
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 theDataFeedProcess
instances that matched the given name and filters.- Specified by:
readAllByName
in interfaceDataFeedProcessService<P extends DataFeedProcess>
- Parameters:
name
- the data feed process namefilters
- the RSQLNode
used to restrict resultpage
- the requested page of results from the databasecontext
- 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 toCrudEntityService.readByContextId(String, ContextInfo)
, but returns anOptional
instead of throwingEntityMissingException
when not found.- Specified by:
readByContextIdOpt
in 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
Optional
containing 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:DataFeedProcessService
Finds allDataFeedProcess
instances matching the given criteria.- Specified by:
readByProcessTypeAndEnabledAndApplication
in 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()
-