Class CxPromotionsForCatalogQueryExecutor
- java.lang.Object
-
- de.hybris.platform.personalizationwebservices.queries.impl.AbstractRestQueryExecutor
-
- de.hybris.platform.personalizationpromotionsweb.queries.CxPromotionsForCatalogQueryExecutor
-
- All Implemented Interfaces:
RestQueryExecutor
public class CxPromotionsForCatalogQueryExecutor extends AbstractRestQueryExecutor
Finds promotions for given catalog and catalog version
-
-
Constructor Summary
Constructors Constructor Description CxPromotionsForCatalogQueryExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringbuildCatalogVersionKey(java.lang.String catalogKey)protected java.util.List<CatalogVersionModel>buildCatalogVersions(java.util.Map<java.lang.String,java.lang.String> params)protected java.util.List<CatalogVersionWsDTO>buildCatalogVersionsDTOs(java.util.Map<java.lang.String,java.lang.String> params)protected intcomparePromotions(PromotionSourceRuleModel p1, PromotionSourceRuleModel p2)protected PromotionRuleListWsDTOexecuteAfterValidation(java.util.Map<java.lang.String,java.lang.String> params)protected java.util.List<AbstractRuleModel>getActiveRules(CatalogVersionModel catalogVersion)java.util.List<CatalogVersionWsDTO>getCatalogsForReadAccess(java.util.Map<java.lang.String,java.lang.String> params)java.util.List<CatalogVersionWsDTO>getCatalogsForWriteAccess(java.util.Map<java.lang.String,java.lang.String> params)protected CatalogVersionModelgetCatalogVersionModel(java.lang.String catalog, java.lang.String version)protected CatalogVersionServicegetCatalogVersionService()protected Converter<PromotionSourceRuleModel,PromotionRuleWsDTO>getPromotionConverter()protected RuleServicegetRuleService()protected SourceRuleInspectorgetSourceRuleInspector()protected booleanhasCatalogVersion(java.lang.String catalogKey, java.util.Set<java.lang.String> keySet)protected booleanisCatalogKey(java.lang.String key)protected booleanisCxAwareRule(SourceRuleModel sourceRule)protected voidrejectCatalogKey(java.lang.String catalogKey, org.springframework.validation.Errors errors)voidsetCatalogVersionService(CatalogVersionService catalogVersionService)voidsetPromotionConverter(Converter<PromotionSourceRuleModel,PromotionRuleWsDTO> promotionConverter)voidsetRuleService(RuleService ruleService)voidsetSourceRuleInspector(SourceRuleInspector sourceRuleInspector)protected voidvalidateInputParams(java.util.Map<java.lang.String,java.lang.String> params, org.springframework.validation.Errors errors)-
Methods inherited from class de.hybris.platform.personalizationwebservices.queries.impl.AbstractRestQueryExecutor
execute, getCatalogFromParams, getLocalViewExecutor, getQueryEndpointPermissionsChecker, setLocalViewExecutor, setQueryEndpointPermissionsChecker, validate, validateMissingField
-
-
-
-
Method Detail
-
validateInputParams
protected void validateInputParams(java.util.Map<java.lang.String,java.lang.String> params, org.springframework.validation.Errors errors)- Specified by:
validateInputParamsin classAbstractRestQueryExecutor
-
isCatalogKey
protected boolean isCatalogKey(java.lang.String key)
-
buildCatalogVersionKey
protected java.lang.String buildCatalogVersionKey(java.lang.String catalogKey)
-
hasCatalogVersion
protected boolean hasCatalogVersion(java.lang.String catalogKey, java.util.Set<java.lang.String> keySet)
-
rejectCatalogKey
protected void rejectCatalogKey(java.lang.String catalogKey, org.springframework.validation.Errors errors)
-
executeAfterValidation
protected PromotionRuleListWsDTO executeAfterValidation(java.util.Map<java.lang.String,java.lang.String> params)
- Specified by:
executeAfterValidationin classAbstractRestQueryExecutor
-
isCxAwareRule
protected boolean isCxAwareRule(SourceRuleModel sourceRule)
-
buildCatalogVersions
protected java.util.List<CatalogVersionModel> buildCatalogVersions(java.util.Map<java.lang.String,java.lang.String> params)
-
buildCatalogVersionsDTOs
protected java.util.List<CatalogVersionWsDTO> buildCatalogVersionsDTOs(java.util.Map<java.lang.String,java.lang.String> params)
-
getCatalogVersionModel
protected CatalogVersionModel getCatalogVersionModel(java.lang.String catalog, java.lang.String version)
-
getActiveRules
protected java.util.List<AbstractRuleModel> getActiveRules(CatalogVersionModel catalogVersion)
-
comparePromotions
protected int comparePromotions(PromotionSourceRuleModel p1, PromotionSourceRuleModel p2)
-
getCatalogsForWriteAccess
public java.util.List<CatalogVersionWsDTO> getCatalogsForWriteAccess(java.util.Map<java.lang.String,java.lang.String> params)
- Returns:
- The catalogs the query needs to write on.
-
getCatalogsForReadAccess
public java.util.List<CatalogVersionWsDTO> getCatalogsForReadAccess(java.util.Map<java.lang.String,java.lang.String> params)
- Returns:
- The catalogs the query needs toread from.
-
getPromotionConverter
protected Converter<PromotionSourceRuleModel,PromotionRuleWsDTO> getPromotionConverter()
-
getRuleService
protected RuleService getRuleService()
-
getSourceRuleInspector
protected SourceRuleInspector getSourceRuleInspector()
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setPromotionConverter
public void setPromotionConverter(Converter<PromotionSourceRuleModel,PromotionRuleWsDTO> promotionConverter)
-
setRuleService
public void setRuleService(RuleService ruleService)
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
setSourceRuleInspector
public void setSourceRuleInspector(SourceRuleInspector sourceRuleInspector)
-
-