Class PromotionsController
java.lang.Object
de.hybris.platform.commercewebservices.core.v2.controller.BaseController
de.hybris.platform.commercewebservices.core.v2.controller.PromotionsController
@Controller
@RequestMapping("/{baseSiteId}/promotions")
public class PromotionsController
extends BaseController
Main Controller for Promotions
-
Field Summary
Fields inherited from class de.hybris.platform.commercewebservices.core.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 -
Method Summary
Modifier and TypeMethodDescriptionprotected CommercePromotionFacadegetPromotion(String code, String fields) protected List<PromotionData>getPromotionList(String type) protected List<PromotionData>getPromotionList(String type, String promotionGroup) getPromotions(String type, String promotionGroup, String fields) protected voidvalidateTypeParameter(String type) Methods inherited from class de.hybris.platform.commercewebservices.core.v2.controller.BaseController
addPaginationField, getDataMapper, handleDuplicateUidException, handleErrorInternal, handleHttpMessageNotReadableException, handleModelNotFoundException, logParam, logParam, logValue, sanitize, setDataMapper, setTotalCountHeader, setTotalCountHeader, validate
-
Constructor Details
-
PromotionsController
public PromotionsController()
-
-
Method Details
-
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 String type, @RequestParam(required=false) String promotionGroup, @RequestParam(defaultValue="BASIC") 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 String code, @RequestParam(defaultValue="BASIC") String fields) -
validateTypeParameter
-
getPromotionList
-
getPromotionList
-
getCommercePromotionFacade
-