Class StrategyController

java.lang.Object
com.hybris.merchandising.controller.StrategyController

@RestController public class StrategyController extends Object
StrategyController is a simple REST controller exposing an end point to allow us to retrieve the configured Strategies for a given tenant.
  • Field Details

  • Constructor Details

    • StrategyController

      public StrategyController()
  • Method Details

    • getStrategies

      @GetMapping(value="/v1/{siteId}/strategies", produces="application/json") @ResponseBody public StrategyListWsDTO getStrategies(@RequestParam(value="currentPage",defaultValue="0",required=false) Integer currentPage, @RequestParam(value="pageSize",defaultValue="10",required=false) Integer pageSize)
      Retrieves a list of configured Strategy objects from Strategy service.
      Parameters:
      currentPage - - optional page number (e.g. 1).
      pageSize - - optional page size (e.g. 10).
      Returns:
      a list of configured Strategy.
    • buildResponse

      protected StrategyListWsDTO buildResponse(List<DropdownElement> strategies, int pageSize, int currentPage)
    • getStrategy

      @GetMapping(value="/v1/{siteId}/strategies/{id}", produces="application/json") @ResponseBody public DropdownElement getStrategy(@PathVariable String id)