Class HybrisInitFilter

java.lang.Object
de.hybris.platform.util.RootRequestFilter
de.hybris.platform.util.HybrisInitFilter
All Implemented Interfaces:
javax.servlet.Filter
Direct Known Subclasses:
WebServicesInitFilter

@Deprecated(since="5.0", forRemoval=true) public class HybrisInitFilter extends RootRequestFilter
Deprecated, for removal: This API element is subject to removal in a future version.
since 5.0, please use the filter chain.

Filter that will do initialization work for each web application which include:

  • Getting the JaloSession from the HttpSession or, if not available, create a new JaloSession
  • Activate this JaloSession so that calls to JaloSession.getCurrentSession() can be performed.
  • Register the core beans (ItemBean and ObjectBean)
  • Iterate through all managers and call the doPreRequest(..) method.

      Install the filter in your web.xml file as follows. Note that the mapping should be changed according to your needs.

         <filter>
            <filter-name>hybrisinitfilter</filter-name>
            <filter-class>de.hybris.platform.util.HybrisInitFilter</filter-class>
        </filter>
      
        <filter-mapping>
            <filter-name>hybrisinitfilter</filter-name>
            <url-pattern>*.jsp</url-pattern>
        </filter-mapping>
        <filter-mapping>
            <filter-name>hybrisinitfilter</filter-name>
            <url-pattern>*.do</url-pattern>
        </filter-mapping>
       
  • Constructor Details

    • HybrisInitFilter

      public HybrisInitFilter()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • init

      public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      init in interface javax.servlet.Filter
      Overrides:
      init in class RootRequestFilter
      Throws:
      javax.servlet.ServletException
    • doPreRequest

      public boolean doPreRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: RootRequestFilter
      This method is called once before the chained request is called.
      Overrides:
      doPreRequest in class RootRequestFilter
      Returns:
      true if the request should be processed
      Throws:
      javax.servlet.ServletException
    • notifyExtensions

      protected void notifyExtensions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean pre)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • doPostRequest

      public void doPostRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: RootRequestFilter
      This method is called once after the chained request is called.
      Overrides:
      doPostRequest in class RootRequestFilter
      Throws:
      javax.servlet.ServletException
    • getLoginCookieName

      protected String getLoginCookieName()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getJaloSession

      protected JaloSession getJaloSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean pre) throws JaloConnectException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      JaloConnectException
    • matchTenantSystemIDToken

      protected String matchTenantSystemIDToken(String uri)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      matchTenantSystemIDToken in class RootRequestFilter