Class BaseController

java.lang.Object
de.hybris.platform.b2b.occ.v2.controllers.BaseController
Direct Known Subclasses:
AccountSummaryController, B2BCartsController, B2BCategoriesController, B2BCostCentersController, B2BMiscsController, B2BOrdersController, B2BProductsController, B2BUsersController, BudgetManagementController, OrderApprovalPermissionsController, OrderApprovalPermissionTypesController, OrderApprovalsController, OrgCustomerManagementController, OrgUnitsController, OrgUnitUserGroupsController, QuoteController, ReplenishmentOrderController

@Controller public class BaseController extends Object
Base Controller. It defines the exception handler to be used by all controllers. Extending controllers can add or overwrite the exception handler if needed. Duplicate of de.hybris.platform.ycommercewebservices.v2.controller.BaseController as b2boccaddon does not depend on ycommercewebservice
  • Field Details

  • Constructor Details

    • BaseController

      public BaseController()
  • Method Details

    • logParam

      protected static String logParam(String paramName, long paramValue)
    • logParam

      protected static String logParam(String paramName, Long paramValue)
    • logParam

      protected static String logParam(String paramName, String paramValue)
    • logValue

      protected static String logValue(String paramValue)
    • sanitize

      protected static String sanitize(String input)
    • handleModelNotFoundException

      @ResponseStatus(BAD_REQUEST) @ResponseBody @ExceptionHandler(ModelNotFoundException.class) public ErrorListWsDTO handleModelNotFoundException(Exception ex)
    • handleErrorInternal

      protected ErrorListWsDTO handleErrorInternal(String type, String message)
    • validate

      protected void validate(Object object, String objectName, org.springframework.validation.Validator validator)
    • addPaginationField

      protected String addPaginationField(String fields)
      Adds pagination field to the 'fields' parameter
      Parameters:
      fields -
      Returns:
      fields with pagination
    • setTotalCountHeader

      protected void setTotalCountHeader(javax.servlet.http.HttpServletResponse response, PaginationWsDTO paginationDto)
    • setTotalCountHeader

      protected void setTotalCountHeader(javax.servlet.http.HttpServletResponse response, PaginationData paginationDto)
    • getDataMapper

      protected DataMapper getDataMapper()
    • setDataMapper

      protected void setDataMapper(DataMapper dataMapper)
    • handleDuplicateUidException

      @ResponseStatus(BAD_REQUEST) @ResponseBody @ExceptionHandler(DuplicateUidException.class) public ErrorListWsDTO handleDuplicateUidException(DuplicateUidException ex)
    • handleHttpMessageNotReadableException

      @ResponseStatus(BAD_REQUEST) @ResponseBody @ExceptionHandler(org.springframework.http.converter.HttpMessageNotReadableException.class) public ErrorListWsDTO handleHttpMessageNotReadableException(Exception ex)