public interface CatalogAccessPolicyService
CatalogAccessPolicy
Modifier and Type | Method and Description |
---|---|
boolean |
attachCatalogAccessPolicyFiltersIfPossible(org.broadleafcommerce.core.search.service.solr.SearchContextDTO context,
org.apache.solr.client.solrj.SolrQuery solrQuery)
This method is responsible for creating and attaching the filter queries for any catalog access policies.
|
List<String> |
createSolrFiltersForPolicy(CatalogAccessPolicy policy)
This method generates the filter queries for
SolrQuery to filter search results. |
List<CatalogAccessPolicy> |
findAllActivePolicies()
This method retrieves all of the active policies and orders them by priority.
|
CatalogAccessPolicy |
findById(Long id)
This retrieves the
CatalogAccessPolicy by primary key. |
CatalogAccessPolicy |
findCatalogAccessPolicyForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer)
This method retrieves the highest priority policy for the given customer.
|
boolean |
validateCategoryForPolicy(CatalogAccessPolicy policy,
org.broadleafcommerce.core.catalog.domain.Category category)
This method evaluates whether the given
Category is valid for the given CatalogAccessPolicy . |
boolean |
validateProductForPolicy(CatalogAccessPolicy policy,
org.broadleafcommerce.core.catalog.domain.Product product)
This method evaluates whether the given
Product is valid for the given CatalogAccessPolicy . |
CatalogAccessPolicy findById(Long id)
CatalogAccessPolicy
by primary key.id
- the primary keyList<CatalogAccessPolicy> findAllActivePolicies()
CatalogAccessPolicy findCatalogAccessPolicyForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer)
customer
- the Customer
CatalogAccessPolicy
boolean validateProductForPolicy(CatalogAccessPolicy policy, org.broadleafcommerce.core.catalog.domain.Product product)
Product
is valid for the given CatalogAccessPolicy
.policy
- the policyproduct
- the product to check if validboolean validateCategoryForPolicy(CatalogAccessPolicy policy, org.broadleafcommerce.core.catalog.domain.Category category)
Category
is valid for the given CatalogAccessPolicy
.policy
- the policycategory
- the category to check if validboolean attachCatalogAccessPolicyFiltersIfPossible(org.broadleafcommerce.core.search.service.solr.SearchContextDTO context, org.apache.solr.client.solrj.SolrQuery solrQuery)
context
- the SearchContextDTO
for the search querysolrQuery
- the SolrQuery
List<String> createSolrFiltersForPolicy(CatalogAccessPolicy policy)
SolrQuery
to filter search results.policy
- the policyCopyright © 2019. All rights reserved.