Class AfterSessionUserChangeListener

  • All Implemented Interfaces:
    java.util.EventListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<AfterSessionUserChangeEvent>

    @Deprecated(since="4.4")
    public class AfterSessionUserChangeListener
    extends AbstractEventListener<AfterSessionUserChangeEvent>
    Deprecated.
    Since 4.4. Uses JaloSession migration pending fix https://jira.hybris.com/browse/PLA-10932
    This listener sets up the organization branch & root unit of the currently logged in user in the.

    SessionContext as well as current currency from the list of available currencies from the list of cost centers for the currently logged in user.

    • Constructor Detail

      • AfterSessionUserChangeListener

        public AfterSessionUserChangeListener()
        Deprecated.
    • Method Detail

      • getSession

        @Deprecated(since="4.4")
        protected Session getSession​(JaloSession jaloSession)
        Deprecated.
        Since 4.4. Use SystemService when it becomes availabe from hybris
        Looks up Session via SessionService ignores NullPointerException thown from SessionService.getSession(String) assuming that system is initializing when the listener got called
        Parameters:
        jaloSession - A hybris JaloSession
        Returns:
        A service layer Session object.
      • executeEvent

        protected boolean executeEvent​(AfterSessionUserChangeEvent event)
        Deprecated.
        Parameters:
        event -
        Returns:
        True if even executed.
      • resetCurrency

        protected void resetCurrency​(UserModel user)
        Deprecated.
        Sets the the current currency from the list of available currencies from the users cost centers.
        Parameters:
        user - the session user.
      • getUserService

        protected UserService getUserService()
        Deprecated.
      • setUserService

        public void setUserService​(UserService userService)
        Deprecated.
      • getCommonI18NService

        protected CommonI18NService getCommonI18NService()
        Deprecated.
      • setCommonI18NService

        public void setCommonI18NService​(CommonI18NService commonI18NService)
        Deprecated.
      • setB2BCostCenterService

        public void setB2BCostCenterService​(B2BCostCenterService b2bCostCenterService)
        Deprecated.
      • getModelService

        protected ModelService getModelService()
        Deprecated.
      • setModelService

        public void setModelService​(ModelService modelService)
        Deprecated.
      • getSessionService

        protected SessionService getSessionService()
        Deprecated.
      • setSessionService

        public void setSessionService​(SessionService sessionService)
        Deprecated.