Class AfterSessionUserChangeListener

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

@Deprecated(since="4.4", forRemoval=true) public class AfterSessionUserChangeListener extends AbstractEventListener<AfterSessionUserChangeEvent>
Deprecated, for removal: This API element is subject to removal in a future version.
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 Details

    • AfterSessionUserChangeListener

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

    • onEvent

      protected void onEvent(AfterSessionUserChangeEvent event)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: AbstractEventListener
      This method is called by ApplicationListener.onApplicationEvent(ApplicationEvent) and processes the given event.
      Specified by:
      onEvent in class AbstractEventListener<AfterSessionUserChangeEvent>
      Parameters:
      event - the event to be processed
      See Also:
      • ApplicationListener.onApplicationEvent(ApplicationEvent)
    • getSession

      @Deprecated(since="4.4", forRemoval=true) protected Session getSession(JaloSession jaloSession)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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, for removal: This API element is subject to removal in a future version.
      Parameters:
      event -
      Returns:
      True if even executed.
    • resetCurrency

      protected void resetCurrency(UserModel user)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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, for removal: This API element is subject to removal in a future version.
    • setUserService

      public void setUserService(UserService userService)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getCommonI18NService

      protected CommonI18NService getCommonI18NService()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setCommonI18NService

      public void setCommonI18NService(CommonI18NService commonI18NService)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getB2BCostCenterService

      protected B2BCostCenterService getB2BCostCenterService()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setB2BCostCenterService

      public void setB2BCostCenterService(B2BCostCenterService b2bCostCenterService)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getB2BUnitService

      protected B2BUnitService<B2BUnitModel,B2BCustomerModel> getB2BUnitService()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setB2BUnitService

      public void setB2BUnitService(B2BUnitService<B2BUnitModel,B2BCustomerModel> b2bUnitService)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getModelService

      protected ModelService getModelService()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setModelService

      public void setModelService(ModelService modelService)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getSessionService

      protected SessionService getSessionService()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setSessionService

      public void setSessionService(SessionService sessionService)
      Deprecated, for removal: This API element is subject to removal in a future version.