Class BaBaseController
java.lang.Object
de.hybris.platform.billingaccounttmfwebservices.v2.controllers.BaBaseController
- Direct Known Subclasses:
BaBillingAccountController,BaListenerController
Abstract Base Controller defining common methods and fields to be used by other API controllers.
- Since:
- 2208
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected de.hybris.platform.webservicescommons.mapping.DataMapperprotected de.hybris.platform.servicelayer.i18n.I18NServiceprotected org.springframework.context.MessageSourceprotected com.fasterxml.jackson.databind.ObjectMapperprotected StringgetQueryStringWithoutOffsetAndLimit(javax.servlet.http.HttpServletRequest request) protected org.springframework.http.ResponseEntitygetUnsuccessfulResponse(String errorMessage, Exception e, org.springframework.http.HttpStatus httpStatus) protected org.springframework.http.ResponseEntitygetUnsuccessfulResponse(String message, org.springframework.http.HttpStatus httpStatus) protected ErrorhandleInternalError(String message) protected booleanChecks if the user has given role.voidinit()protected Stringprotected StringsanitizeQueryString(String queryString) protected String
-
Constructor Details
-
BaBaseController
public BaBaseController()
-
-
Method Details
-
init
@PostConstruct public void init() -
handleModelNotFoundException
-
getUnsuccessfulResponse
-
getUnsuccessfulResponse
protected org.springframework.http.ResponseEntity getUnsuccessfulResponse(String message, org.springframework.http.HttpStatus httpStatus) -
validate
-
getMessageSource
protected org.springframework.context.MessageSource getMessageSource() -
getI18nService
protected de.hybris.platform.servicelayer.i18n.I18NService getI18nService() -
handleInternalError
-
getQueryStringWithoutOffsetAndLimit
-
sanitizeQueryString
-
filter
-
hasRole
protected boolean hasRole(String role, org.springframework.security.core.Authentication authentication) Checks if the user has given role.- Parameters:
role- The role is provided as string- Returns:
- False if logged in user doesn't have given role, otherwise true.
-
sanitize
-
getDataMapper
protected de.hybris.platform.webservicescommons.mapping.DataMapper getDataMapper() -
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-