Interface ApplicationService<P extends Application>
- All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
- All Known Implementing Classes:
DefaultApplicationService
public interface ApplicationService<P extends Application>
extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
Application
business domain specific version of CrudEntityService
.- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescriptionreadActiveByApplicationIdentifierAndIdentifierType
(String identifier, String identifierType, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the application by itsApplication.getIdentifierValue()
and, optionally, byApplication.getIdentifierType()
.readActiveByApplicationIdentifierIgnoreCaseAndIdentifierType
(String identifier, String identifierType, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the application by itsApplication.getIdentifierValue()
(case-insensitive) and, optionally, byApplication.getIdentifierType()
.org.springframework.data.domain.Page<P>
readAllActive
(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Reads allApplications
whereApplication.isDeactivated()
is false.org.springframework.data.domain.Page<P>
readAllByApplicationIdIn
(Collection<String> applicationIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) org.springframework.data.domain.Page<P>
readByActiveStatus
(boolean isActive, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds and returns allApplications
whereApplication.isDeactivated()
satisfies theisActive
parameter.org.springframework.data.domain.Page<P>
readByActiveStatusAndApplicationIdIn
(Collection<String> applicationIds, boolean active, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) readByToken
(String applicationToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds and returns the application associated with the provided application token.org.springframework.data.domain.Page<ApplicationCatalogRef>
readCatalogsForAdd
(String id, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds and returns the catalog's for the given owning application that are available to be added when selecting a catalog for add operations.readOptionalByContextId
(String contextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Similar toCrudEntityService.readByContextId(String, ContextInfo)
, but returns anOptional
instead.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
-
Method Details
-
readOptionalByContextId
Optional<P> readOptionalByContextId(String contextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Similar toCrudEntityService.readByContextId(String, ContextInfo)
, but returns anOptional
instead.- Parameters:
contextId
- the ID of the application to findcontextInfo
- context information surrounding multitenant state- Returns:
- an
Optional
containing the entity if found,Optional.empty()
otherwise
-
readByToken
Optional<P> readByToken(String applicationToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds and returns the application associated with the provided application token.- Parameters:
applicationToken
- the application tokencontextInfo
- the context info- Returns:
- the application
-
readCatalogsForAdd
org.springframework.data.domain.Page<ApplicationCatalogRef> readCatalogsForAdd(String id, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds and returns the catalog's for the given owning application that are available to be added when selecting a catalog for add operations.- Parameters:
id
- the application's id for which to return catalogs for addingpageable
- the requested page of results from the databasecontext
- context information surrounding sandboxing and multitenant state- Returns:
- catalogs available for add operations for the given application
- See Also:
-
readAllActive
org.springframework.data.domain.Page<P> readAllActive(@Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Reads allApplications
whereApplication.isDeactivated()
is false.- Parameters:
filters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.pageable
- the requested page of results from the databasecontext
- context information surrounding sandboxing and multitenant state- Returns:
- all
Applications
whereApplication.isDeactivated()
is false.
-
readByActiveStatus
org.springframework.data.domain.Page<P> readByActiveStatus(boolean isActive, @Nullable cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds and returns allApplications
whereApplication.isDeactivated()
satisfies theisActive
parameter.- Parameters:
isActive
- true if only active applications should be returned, false if only deactivated applications should be returnedfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.pageable
- the requested page of results from the databasecontext
- context information surrounding sandboxing and multitenant state- Returns:
- all
Applications
whereApplication.isDeactivated()
satisfies theisActive
parameter
-
readActiveByApplicationIdentifierAndIdentifierType
Optional<P> readActiveByApplicationIdentifierAndIdentifierType(String identifier, @Nullable String identifierType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the application by itsApplication.getIdentifierValue()
and, optionally, byApplication.getIdentifierType()
. If not provided, identifier will default toResolutionIdentifierType.DOMAIN
.- Parameters:
identifier
- theApplication.getIdentifierValue()
identifierType
- theApplication.getIdentifierType()
contextInfo
- context information surrounding sandboxing and multitenant state- Returns:
- the
Application
with the matchingApplication.getIdentifierValue()
-
readActiveByApplicationIdentifierIgnoreCaseAndIdentifierType
Optional<P> readActiveByApplicationIdentifierIgnoreCaseAndIdentifierType(String identifier, @Nullable String identifierType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the application by itsApplication.getIdentifierValue()
(case-insensitive) and, optionally, byApplication.getIdentifierType()
. If not provided, identifier will default toResolutionIdentifierType.DOMAIN
.- Parameters:
identifier
- theApplication.getIdentifierValue()
identifierType
- theApplication.getIdentifierType()
contextInfo
- context information surrounding sandboxing and multitenant state- Returns:
- the
Application
with the matchingApplication.getIdentifierValue()
-
getRepositoryDomain
-
readAllByApplicationIdIn
org.springframework.data.domain.Page<P> readAllByApplicationIdIn(Collection<String> applicationIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
readByActiveStatusAndApplicationIdIn
org.springframework.data.domain.Page<P> readByActiveStatusAndApplicationIdIn(Collection<String> applicationIds, boolean active, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-