Class SiteLanguageInterceptor

java.lang.Object
com.hybris.merchandising.interceptors.SiteLanguageInterceptor
All Implemented Interfaces:
org.springframework.web.servlet.HandlerInterceptor

public class SiteLanguageInterceptor extends Object implements org.springframework.web.servlet.HandlerInterceptor
Default interceptor to run before controllers' execution to extract the site-id from the request URI and to set the current session value.
  • Constructor Details

    • SiteLanguageInterceptor

      public SiteLanguageInterceptor()
  • Method Details

    • preHandle

      public boolean preHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler)
      Adds the siteId to the session. When siteId is not valid, the current session siteId is set to null.
      Specified by:
      preHandle in interface org.springframework.web.servlet.HandlerInterceptor
    • getBaseSiteService

      protected BaseSiteService getBaseSiteService()
      Gets the configured BaseSiteService used to set what site we're currently using.
      Returns:
      baseSiteService the configured BaseSiteService.
    • setBaseSiteService

      public void setBaseSiteService(BaseSiteService baseSiteService)
      Sets the configured BaseSiteService used to set what site we're currently using.
      Parameters:
      baseSiteService - the BaseSiteService to set.
    • getAdminSiteService

      protected CMSAdminSiteService getAdminSiteService()
      Gets the configured CMSAdminSiteService used to set what site we're currently using.
      Returns:
      adminSiteService the configured CMSAdminSiteService.
    • setAdminSiteService

      public void setAdminSiteService(CMSAdminSiteService adminSiteService)
      Sets the configured CMSAdminSiteService used to set what site we're currently using.
      Parameters:
      adminSiteService - the configured CMSAdminSiteService.