Class BmBaseController
java.lang.Object
de.hybris.platform.billmanagementtmfwebservices.v2.controller.BmBaseController
- Direct Known Subclasses:
BmAppliedCustomerBillingRateController,BmCustomerBillController,BmCustomerBillOnDemandController
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 StringaddDefaultFields(String fields) Retrieves the attributes that the user wants to receive in responseprotected 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 booleanChecks if the user has given role.voidinit()protected Stringprotected String
-
Constructor Details
-
BmBaseController
public BmBaseController()
-
-
Method Details
-
init
@PostConstruct public void init() -
handleModelNotFoundException
-
getUnsuccessfulResponse
-
getUnsuccessfulResponse
protected org.springframework.http.ResponseEntity getUnsuccessfulResponse(String message, org.springframework.http.HttpStatus httpStatus) -
getQueryStringWithoutOffsetAndLimit
-
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.
-
addDefaultFields
Retrieves the attributes that the user wants to receive in response- Parameters:
fields- a string representing attributes we want to receive in response- Returns:
- a string consisting of default fields id,href and fields given by the user in request null, if user didn't provide any value for fields attribute
-
validate
-
sanitize
-
getDataMapper
protected de.hybris.platform.webservicescommons.mapping.DataMapper getDataMapper() -
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
getMessageSource
protected org.springframework.context.MessageSource getMessageSource() -
getI18nService
protected de.hybris.platform.servicelayer.i18n.I18NService getI18nService()
-