java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
Direct Known Subclasses:
AbstractCMSComponentController, AbstractPageController, AddToCartController, MiniCartController, OfferListingController, ServicePlansListingPageController

public abstract class AbstractController extends Object
Base controller for all controllers. Provides common functionality for all controllers.
  • Field Details

  • 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 request
      beanName - the name of the bean to lookup
      beanType - the expected type of the bean
      Returns:
      the bean found or null