Class AbstractController
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
- Direct Known Subclasses:
AbstractCMSComponentController,AbstractPageController,AddToCartController,MiniCartController,OfferListingController,ServicePlansListingPageController
Base controller for all controllers. Provides common functionality for all controllers.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.servlet.http.HttpServletRequestaddRequestToModel(javax.servlet.http.HttpServletRequest request) protected <T> THelper method to lookup a spring bean in the context of a request.
-
Field Details
-
REDIRECT_PREFIX
- See Also:
-
FORWARD_PREFIX
- See Also:
-
ROOT
- See Also:
-
-
Constructor Details
-
AbstractController
public AbstractController()
-
-
Method Details
-
addRequestToModel
@ModelAttribute("request") public javax.servlet.http.HttpServletRequest addRequestToModel(javax.servlet.http.HttpServletRequest request) -
getBean
protected <T> T getBean(javax.servlet.http.HttpServletRequest request, String beanName, Class<T> beanType) Helper method to lookup a spring bean in the context of a request. This should only be used to lookup beans that are request scoped. The looked up bean is cached in the request attributes so it should not have a narrower scope than request scope. This method should not be used for beans that could be injected into this bean.- Type Parameters:
T- the expected type of the bean- Parameters:
request- the current requestbeanName- the name of the bean to lookupbeanType- the expected type of the bean- Returns:
- the bean found or null
-