Class AccountKindUsersListenerImpl

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.services.organization.MembershipEventListener
org.exoplatform.social.core.listeners.AccountKindUsersListenerImpl
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

public class AccountKindUsersListenerImpl extends org.exoplatform.services.organization.MembershipEventListener
Keeps the account kind Profile.ACCOUNT_KIND of a user profile in sync with its memberships in the groups the AccountKindPlugins name, the way ExternalUsersListenerImpl does for Profile.EXTERNAL: on any membership change in such a group, the kind is computed again from every declared kind's group.
  • Field Summary

    Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin

    desc, name
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    postDelete(org.exoplatform.services.organization.Membership m)
    Recomputes the member's account kind when a membership in a plugin's group is removed: any membership type counts, so the kind stays while another membership in the group remains.
    void
    postSave(org.exoplatform.services.organization.Membership m, boolean isNew)
    Recomputes the member's account kind when a membership in a plugin's group is saved.

    Methods inherited from class org.exoplatform.services.organization.MembershipEventListener

    preDelete, preSave

    Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

    getDescription, getName, setDescription, setName

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AccountKindUsersListenerImpl

      public AccountKindUsersListenerImpl()
  • Method Details

    • postSave

      public void postSave(org.exoplatform.services.organization.Membership m, boolean isNew)
      Recomputes the member's account kind when a membership in a plugin's group is saved.
      Overrides:
      postSave in class org.exoplatform.services.organization.MembershipEventListener
      Parameters:
      m - the saved membership
      isNew - whether the membership was created
    • postDelete

      public void postDelete(org.exoplatform.services.organization.Membership m)
      Recomputes the member's account kind when a membership in a plugin's group is removed: any membership type counts, so the kind stays while another membership in the group remains.
      Overrides:
      postDelete in class org.exoplatform.services.organization.MembershipEventListener
      Parameters:
      m - the deleted membership