Interface CustomizedCategoryAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- Type Parameters:
D
- the type ofTrackable
entity which is the persistent counterpart to aCategoryAsset
- All Known Subinterfaces:
CategoryAssetRepository<D>
,JpaCategoryAssetRepository<D>
- All Known Implementing Classes:
JpaCustomizedCategoryAssetRepository
public interface CustomizedCategoryAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Advanced functionality related to
CategoryAsset
maintenance and filtering.- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptionfindByCategoryContextId
(String categoryContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of theCategoryAssets
for aCategory
by ID.org.springframework.data.domain.Page<D>
searchAllWithCategoryContextId
(String categoryContextId, Boolean isSorted, String searchString, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds allCategoryAssets
for the given category context ID, optionally filtering by additional search/filter arguments.
-
Method Details
-
searchAllWithCategoryContextId
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> searchAllWithCategoryContextId(String categoryContextId, @Nullable Boolean isSorted, @Nullable String searchString, cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds allCategoryAssets
for the given category context ID, optionally filtering by additional search/filter arguments.If
searchString
is provided, then this method will search for assets whoseEntityAsset.url
,EntityAsset.title
,EntityAsset.altText
, orEntityAsset.tags
contain it.If no
searchString
is provided, then this method will simply return all assets for the given category.This method also supports RSQL filtration via
filters
.- Parameters:
categoryContextId
- the value which the category context ID should match againstisSorted
- (optional) if not-null, will restrict results to only includeCategoryAssets
whereCategoryAsset.sorted
has the given valuesearchString
- (optional) a string which should be found inEntityAsset.url
,EntityAsset.title
,EntityAsset.altText
, orEntityAsset.tags
filters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- the context to query within- Returns:
- the assets in the database with the given category context ID, optionally filtered by the given search/filter arguments (if provided)
-
findByCategoryContextId
@Policy(operationTypes=READ) Stream<D> findByCategoryContextId(String categoryContextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of theCategoryAssets
for aCategory
by ID.- Parameters:
categoryContextId
- Id of the category which's assets to readcontextInfo
- context information around sandboxing and multitenant state- Returns:
- all of the
CategoryAssets
for aCategory
by ID.
-