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 -
Method Summary
Modifier and TypeMethodDescriptionvoidpostDelete(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.voidpostSave(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, preSaveMethods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
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:
postSavein classorg.exoplatform.services.organization.MembershipEventListener- Parameters:
m- the saved membershipisNew- 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:
postDeletein classorg.exoplatform.services.organization.MembershipEventListener- Parameters:
m- the deleted membership
-