Interface DataDrivenEnumDetailsService
- All Known Implementing Classes:
DefaultDataDrivenEnumDetailsService
public interface DataDrivenEnumDetailsService
This service is responsible for retrieving
DataDrivenEnumDetails
for
DataDrivenEnumDetailsRequests
, and for gathering additional
information for DataDrivenEnumDetails
, such as checking for an associated category.- Author:
- Sunny Yu
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkAssociatedCategoryExists
(DataDrivenEnumDetails dataDrivenEnumDetails, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Checks if an associated category exists based on the expected category url for the givenDataDrivenEnumDetails.getValue()
.getDataDrivenEnumDetailsForRequest
(DataDrivenEnumDetailsRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets aDataDrivenEnumDetails
for theDataDrivenEnumDetailsRequest
.
-
Method Details
-
getDataDrivenEnumDetailsForRequest
Optional<DataDrivenEnumDetailsList> getDataDrivenEnumDetailsForRequest(DataDrivenEnumDetailsRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets aDataDrivenEnumDetails
for theDataDrivenEnumDetailsRequest
.- Parameters:
request
- theDataDrivenEnumDetailsRequest
with additional request context for identifying the data driven enum for which to retrieve details and defining the how much detail to go into.contextInfo
- context information surrounding sandboxing/multitenant state- Returns:
- a
DataDrivenEnumDetails
for theDataDrivenEnumDetailsRequest
. - Throws:
DataDrivenEnumDetailsRequestException
- Thrown if the request is invalid such as missing the ID.
-
checkAssociatedCategoryExists
boolean checkAssociatedCategoryExists(DataDrivenEnumDetails dataDrivenEnumDetails, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Checks if an associated category exists based on the expected category url for the givenDataDrivenEnumDetails.getValue()
.- Parameters:
dataDrivenEnumDetails
-DataDrivenEnumDetails
to check the associated category forcontextInfo
- context information surrounding sandboxing/multitenant state
-