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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionfindComponentsByIds(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.formatSearchPageDataResult(String fields, SearchPageData<AbstractCMSComponentData> searchPageDataResult) Deprecated, for removal: This API element is subject to removal in a future version.Transforms theSearchPageDatacontaining the list of cms component data into aListAdaptedComponentsobject.getComponentById(String componentId, String catalogCode, String productCode, String categoryCode, String fields) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.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.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.searchComponentsByIds(ComponentIDListWsDTO componentIdList, 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.since 1905, please usefindComponentsByIds(List, String, String, String, String, int, int, String)instead.voidsetComponentItemFacade(ComponentItemFacade componentItemFacade) Deprecated, for removal: This API element is subject to removal in a future version.voidsetDataMapper(CMSDataMapper dataMapper) Deprecated, for removal: This API element is subject to removal in a future version.voidsetWebPaginationUtils(WebPaginationUtils webPaginationUtils) Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
DEFAULT_CURRENT_PAGE
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
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.since 1905, please usefindComponentsByIds(List, String, String, String, String, int, int, String)instead.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'scatalogCode- - the catalog code determining the restriction to applyproductCode- - the product code determining the restriction to applycategoryCode- - the category code determining the restriction to applyfields- - the response configuration determining which fields to include in the responsecurrentPage- - the pagination information determining the page indexpageSize- - the pagination information determining the page sizesort- - 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 theSearchPageDatacontaining the list of cms component data into aListAdaptedComponentsobject.- Parameters:
fields- - the response configuration determining which fields to include in the responsesearchPageDataResult- - the configuration containing the pagination and sorting information- Returns:
- a list of components of type
ComponentListWsDTOAdapter.ListAdaptedComponents
-
getComponentItemFacade
Deprecated, for removal: This API element is subject to removal in a future version. -
setComponentItemFacade
Deprecated, for removal: This API element is subject to removal in a future version. -
getDataMapper
Deprecated, for removal: This API element is subject to removal in a future version. -
setDataMapper
Deprecated, for removal: This API element is subject to removal in a future version. -
getWebPaginationUtils
Deprecated, for removal: This API element is subject to removal in a future version. -
setWebPaginationUtils
Deprecated, for removal: This API element is subject to removal in a future version.
-