Interface ContentItemResolverService<I extends ContentItem>
- All Known Implementing Classes:
 DefaultContentItemResolverService
public interface ContentItemResolverService<I extends ContentItem>
This service is responsible for resolving 
ContentItems for commerce-facing
 clients. It should support resolving content through a number of means whether by parent
 ContentModel URI, name, or
 id, or by ContentItem names or
 ids.- Author:
 - Nathan Moore (nathandmoore)
 
- 
Method Summary
Modifier and TypeMethodDescriptionvoidevaluateDisplayRulesForResponse(@NonNull ContentResolverResponse<I> response, ContentContext request) Recursively evaluates the display rules for the givenresponseto filter out anyContentItemsthat should not be displayed.getContentForRequest(ContentResolverRequest request, org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) ResolvesContentItemsfor the givenrequest. 
- 
Method Details
- 
getContentForRequest
Optional<ContentResolverResponse<I>> getContentForRequest(ContentResolverRequest request, org.springframework.data.domain.Pageable page, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) ResolvesContentItemsfor the givenrequest. This accepts aPageableand RSQL filters.If the
Pageableis aDefaultPageRequest, then it will be ignored since that type of pagination is not supported byContentItems. The correct type would beNarrowedPageableorUnnumberedPageable. It will also be considered to mean that no pagination information was in the original request, but instead thePageableDefaultannotation was used to provide defaults.- Parameters:
 request- All relevant information for retrieving the desiredContentItems.page- Pagination information. This will be ignored if not aNarrowedPageableorUnnumberedPageable,DefaultPageRequestshould only indicate that the original request did not include any pagination parameters and was created by thePageableDefaultannotation on an endpoint.filters- RSQL filters to be applied to the result set.contextInfo- Additional sandbox and multitenant information.- Returns:
 ContentItemsfor the givenrequest.
 - 
evaluateDisplayRulesForResponse
void evaluateDisplayRulesForResponse(@NonNull @NonNull ContentResolverResponse<I> response, ContentContext request) Recursively evaluates the display rules for the givenresponseto filter out anyContentItemsthat should not be displayed.- Parameters:
 response- The response to evaluate.request- The context of the request.
 
 -