Class PromotionsController
- java.lang.Object
-
- de.hybris.platform.ycommercewebservices.v2.controller.BaseController
-
- de.hybris.platform.ycommercewebservices.v2.controller.PromotionsController
-
@Controller @RequestMapping("/{baseSiteId}/promotions") public class PromotionsController extends BaseControllerMain Controller for Promotions
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.ycommercewebservices.v2.controller.BaseController
BASIC_FIELD_SET, DEFAULT_CURRENT_PAGE, DEFAULT_FIELD_SET, DEFAULT_PAGE_SIZE, HEADER_TOTAL_COUNT, INVALID_REQUEST_BODY_ERROR_MESSAGE
-
-
Constructor Summary
Constructors Constructor Description PromotionsController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CommercePromotionFacadegetCommercePromotionFacade()PromotionWsDTOgetPromotion(java.lang.String code, java.lang.String fields)protected java.util.List<PromotionData>getPromotionList(java.lang.String type)protected java.util.List<PromotionData>getPromotionList(java.lang.String type, java.lang.String promotionGroup)PromotionListWsDTOgetPromotions(java.lang.String type, java.lang.String promotionGroup, java.lang.String fields)protected voidvalidateTypeParameter(java.lang.String type)-
Methods inherited from class de.hybris.platform.ycommercewebservices.v2.controller.BaseController
addPaginationField, getDataMapper, handleDuplicateUidException, handleErrorInternal, handleHttpMessageNotReadableException, handleModelNotFoundException, logParam, logParam, logValue, sanitize, setDataMapper, setTotalCountHeader, setTotalCountHeader, validate
-
-
-
-
Method Detail
-
getPromotions
@Secured("ROLE_TRUSTED_CLIENT") @RequestMapping(method=GET) @ResponseBody @Cacheable(value="promotionCache", key="T(de.hybris.platform.commercewebservicescommons.cache.CommerceCacheKeyGenerator).generateKey(false,true,\'getPromotions\',#type,#promotionGroup,#fields)") public PromotionListWsDTO getPromotions(@RequestParam java.lang.String type, @RequestParam(required=false) java.lang.String promotionGroup, @RequestParam(defaultValue="BASIC") java.lang.String fields)
-
getPromotion
@Secured("ROLE_TRUSTED_CLIENT") @RequestMapping(value="/{code}", method=GET) @Cacheable(value="promotionCache", key="T(de.hybris.platform.commercewebservicescommons.cache.CommerceCacheKeyGenerator).generateKey(false,true,\'getPromotions\',#code,#fields)") @ResponseBody public PromotionWsDTO getPromotion(@PathVariable java.lang.String code, @RequestParam(defaultValue="BASIC") java.lang.String fields)
-
validateTypeParameter
protected void validateTypeParameter(java.lang.String type)
-
getPromotionList
protected java.util.List<PromotionData> getPromotionList(java.lang.String type, java.lang.String promotionGroup)
-
getPromotionList
protected java.util.List<PromotionData> getPromotionList(java.lang.String type)
-
getCommercePromotionFacade
protected CommercePromotionFacade getCommercePromotionFacade()
-
-