Class AbstractConditionalResourceBeforeHandler

java.lang.Object
de.hybris.platform.addonsupport.interceptors.AbstractConditionalResourceBeforeHandler
All Implemented Interfaces:
BeforeViewHandlerAdaptee

public abstract class AbstractConditionalResourceBeforeHandler extends Object implements BeforeViewHandlerAdaptee
Allows an AddOn to Include Java Script and CSS conditionally.
  • Field Details

  • Constructor Details

    • AbstractConditionalResourceBeforeHandler

      public AbstractConditionalResourceBeforeHandler()
  • Method Details

    • beforeView

      public String beforeView(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.ModelMap model, String viewName) throws Exception
      Specified by:
      beforeView in interface BeforeViewHandlerAdaptee
      Throws:
      Exception
    • addOrAppendListAttribute

      protected void addOrAppendListAttribute(org.springframework.ui.ModelMap model, String key, List newVals)
    • getCommonCssPathKey

      protected String getCommonCssPathKey()
    • getThemeCssPathKey

      protected String getThemeCssPathKey()
    • getJavaScriptPathsKey

      protected String getJavaScriptPathsKey()
    • isIncludeResource

      protected abstract boolean isIncludeResource(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.ModelMap model, String viewName)
    • getAddOnResourcePaths

      protected List getAddOnResourcePaths(String contextPath, List<String> addOnNames, String[] propertyNames)
    • addResourcePaths

      protected void addResourcePaths(String contextPath, List<String> addOnResourcePaths, String addon, String propertyName)
    • getAddOnCommonCSSPaths

      protected List getAddOnCommonCSSPaths(String contextPath, String uiExperience, List<String> addOnNames)
    • getAddOnThemeCSSPaths

      protected List getAddOnThemeCSSPaths(String contextPath, String themeName, String uiExperience, List<String> addOnNames)
    • getAddOnJSPaths

      protected List getAddOnJSPaths(String contextPath, String siteName, String uiExperience, List<String> addOnNames)
    • getThemeNameForSite

      protected String getThemeNameForSite(CMSSiteModel site)
    • 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
    • getRequestContextData

      protected RequestContextData getRequestContextData(javax.servlet.http.HttpServletRequest request)
    • getDefaultThemeName

      protected String getDefaultThemeName()
    • setDefaultThemeName

      public void setDefaultThemeName(String defaultThemeName)
    • getPathPropertyPrefix

      public abstract String getPathPropertyPrefix()