Class ComponentController

java.lang.Object
de.hybris.platform.cmsoccaddon.controllers.ComponentController

@Controller @RequestMapping("/{baseSiteId}/cms") @Deprecated(since="2211", forRemoval=true) public class ComponentController extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
(since = "2211", forRemoval = true)
Default Controller for CMS Component. This controller is used for all CMS components that don\"t have a specific controller to handle them.
  • Field Details

    • DEFAULT_CURRENT_PAGE

      public static final String DEFAULT_CURRENT_PAGE
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • DEFAULT_PAGE_SIZE

      public static final String DEFAULT_PAGE_SIZE
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Constructor Details

    • ComponentController

      public ComponentController()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getComponentById

      @SecurePortalUnauthenticatedAccess @GetMapping("/components/{componentId}") @ResponseBody public ComponentAdapterUtil.ComponentAdaptedData getComponentById(@PathVariable String componentId, @RequestParam(required=false) String catalogCode, @RequestParam(required=false) String productCode, @RequestParam(required=false) String categoryCode, @RequestParam(defaultValue="DEFAULT") String fields) throws CMSItemNotFoundException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      CMSItemNotFoundException
    • searchComponentsByIds

      @PostMapping("/components") @ResponseBody @Deprecated(since="1905", forRemoval=true) public ComponentListWsDTOAdapter.ListAdaptedComponents searchComponentsByIds(@RequestBody ComponentIDListWsDTO componentIdList, @RequestParam(required=false) String catalogCode, @RequestParam(required=false) String productCode, @RequestParam(required=false) String categoryCode, @RequestParam(defaultValue="DEFAULT") String fields, @RequestParam(required=false,defaultValue="0") int currentPage, @RequestParam(required=false,defaultValue="10") int pageSize, @RequestParam(required=false) String sort)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This endpoint will trigger CORS preflight requests by the browser in a cross-origin setup, which is the most common cases. You can use the GET endpoint (findComponentsByIds(List, String, String, String, String, int, int, String)) to easily circumvent the browser's preflight requests.

      However, when requesting for a very large number of components using the GET endpoint, you may eventually reach the maximum number of characters allowed in a URL request. For example:
      Request Method: GET
      Request URL: /cms/components?componentIds=uid1,uid2,uid3,...,uid1000&catalogCode=...

      This POST endpoint allows you to request for such large number of components, but you will have to address the preflight requests issues in a cross-origin setup.

    • findComponentsByIds

      @SecurePortalUnauthenticatedAccess @GetMapping("/components") @ResponseBody public ComponentListWsDTOAdapter.ListAdaptedComponents findComponentsByIds(@RequestParam(required=false) List<String> componentIds, @RequestParam(required=false) String catalogCode, @RequestParam(required=false) String productCode, @RequestParam(required=false) String categoryCode, @RequestParam(defaultValue="DEFAULT") String fields, @RequestParam(required=false,defaultValue="0") int currentPage, @RequestParam(required=false,defaultValue="10") int pageSize, @RequestParam(required=false) String sort)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getComponentsByIds

      protected ComponentListWsDTOAdapter.ListAdaptedComponents getComponentsByIds(List<String> componentIds, String catalogCode, String productCode, String categoryCode, String fields, int currentPage, int pageSize, String sort)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Finds cms components by the specified IDs. When none is provided, this will retrieve all components. The components list will be filtered by the given catalog, product or category restrictions, as well as by the pagination information. The result will be sorted in the specified order.
      Parameters:
      componentIds - - the list of component uid's
      catalogCode - - the catalog code determining the restriction to apply
      productCode - - the product code determining the restriction to apply
      categoryCode - - the category code determining the restriction to apply
      fields - - the response configuration determining which fields to include in the response
      currentPage - - the pagination information determining the page index
      pageSize - - the pagination information determining the page size
      sort - - the sorting information determining which field to sort on and the ordering direction (ASC or DESC)
      Returns:
      a list of cms component data
    • formatSearchPageDataResult

      protected ComponentListWsDTOAdapter.ListAdaptedComponents formatSearchPageDataResult(String fields, SearchPageData<AbstractCMSComponentData> searchPageDataResult)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Transforms the SearchPageData containing the list of cms component data into a ListAdaptedComponents object.
      Parameters:
      fields - - the response configuration determining which fields to include in the response
      searchPageDataResult - - the configuration containing the pagination and sorting information
      Returns:
      a list of components of type ComponentListWsDTOAdapter.ListAdaptedComponents
    • getComponentItemFacade

      public ComponentItemFacade getComponentItemFacade()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setComponentItemFacade

      public void setComponentItemFacade(ComponentItemFacade componentItemFacade)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getDataMapper

      public CMSDataMapper getDataMapper()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setDataMapper

      public void setDataMapper(CMSDataMapper dataMapper)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getWebPaginationUtils

      public WebPaginationUtils getWebPaginationUtils()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setWebPaginationUtils

      public void setWebPaginationUtils(WebPaginationUtils webPaginationUtils)
      Deprecated, for removal: This API element is subject to removal in a future version.