Class TmaProductsController
java.lang.Object
de.hybris.platform.b2ctelcoocc.controllers.BaseController
de.hybris.platform.b2ctelcoocc.controllers.TmaProductsController
@Controller
@RequestMapping("/{baseSiteId}/products")
public class TmaProductsController
extends BaseController
Web Services Controller to expose the functionality of the
TmaProductOfferFacade and SearchFacade.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class de.hybris.platform.b2ctelcoocc.controllers.BaseController
DEFAULT_FIELD_SET, FULL_FIELD_SET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringaddPaginationField(String fields) protected StringgetApplicableUID(String userId) getProductByCode(String productCode, String processType, String userId, String fields, @Valid String region) getProducts(String query, int currentPage, int pageSize, String sort, String searchQueryContext, String fields, javax.servlet.http.HttpServletResponse response) protected booleanMethods inherited from class de.hybris.platform.b2ctelcoocc.controllers.BaseController
getDataMapper, getI18nService, getMessageSource, handleErrorInternal, handleModelNotFoundException, sanitize, setDataMapper, setI18nService, setMessageSource, validate
-
Field Details
-
HEADER_TOTAL_COUNT
- See Also:
-
DEFAULT_PAGE_SIZE
- See Also:
-
DEFAULT_CURRENT_PAGE
- See Also:
-
-
Constructor Details
-
TmaProductsController
public TmaProductsController()
-
-
Method Details
-
getProductByCode
@RequestMapping(value="/{productCode}", method=GET) @Cacheable(value="productCache", key="T(de.hybris.platform.commercewebservicescommons.cache.CommerceCacheKeyGenerator).generateKey(true,true,true,true,true,#productCode,#processType,#userId,#fields,#region)") @ResponseStatus(OK) @ResponseBody public ProductWsDTO getProductByCode(@PathVariable String productCode, @RequestParam(required=false) String processType, @RequestParam(required=false) String userId, @RequestParam(defaultValue="DEFAULT") String fields, @Valid @RequestParam(value="region",required=false) @Valid String region) -
getProducts
@RequestMapping(value="/search", method=GET) @ResponseBody public ProductSearchPageWsDTO getProducts(@RequestParam(required=false) String query, @RequestParam(defaultValue="0") int currentPage, @RequestParam(defaultValue="20") int pageSize, @RequestParam(required=false) String sort, @RequestParam(required=false) String searchQueryContext, @RequestParam(defaultValue="DEFAULT") String fields, javax.servlet.http.HttpServletResponse response) -
addPaginationField
-
getApplicableUID
-
hasRole
-