Class AbstractController
- java.lang.Object
-
- de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
-
- Direct Known Subclasses:
AbstractCMSComponentController
,AbstractPageController
,AddToCartController
,AddToCartController
,AssistedServiceComponentController
,BaseIntegrationController
,BundleAddToCartController
,CMSPageUrlResolvingController
,CPQReorderController
,EstimateTaxesController
,FavIconController
,MiniCartController
,MiniCartControllerForSelectiveCart
,MiniCartControllerForSelectiveCart
,RobotsController
,SiteMapController
,StoreSessionController
public abstract class AbstractController extends java.lang.Object
Base controller for all controllers. Provides common functionality for all controllers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractController.HttpNotFoundException
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FORWARD_PREFIX
static java.lang.String
REDIRECT_PREFIX
static java.lang.String
ROOT
-
Constructor Summary
Constructors Constructor Description AbstractController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.servlet.http.HttpServletRequest
addRequestToModel(javax.servlet.http.HttpServletRequest request)
protected <T> T
getBean(javax.servlet.http.HttpServletRequest request, java.lang.String beanName, java.lang.Class<T> beanType)
Helper method to lookup a spring bean in the context of a request.
-
-
-
Field Detail
-
REDIRECT_PREFIX
public static final java.lang.String REDIRECT_PREFIX
- See Also:
- Constant Field Values
-
FORWARD_PREFIX
public static final java.lang.String FORWARD_PREFIX
- See Also:
- Constant Field Values
-
ROOT
public static final java.lang.String ROOT
- See Also:
- Constant Field Values
-
-
Method Detail
-
addRequestToModel
@ModelAttribute("request") public javax.servlet.http.HttpServletRequest addRequestToModel(javax.servlet.http.HttpServletRequest request)
-
getBean
protected <T> T getBean(javax.servlet.http.HttpServletRequest request, java.lang.String beanName, java.lang.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
-
-