public class MembershipEventListener
extends org.exoplatform.container.component.BaseComponentPlugin
<configuration> [..] <external-component-plugins> <target-component>org.exoplatform.services.organization.OrganizationService</target-component> <component-plugin> <name>my.membership.listener</name> <set-method>addListenerPlugin</set-method> <type>my.package.MyMembershipEventListener</type> <description>your listener description</description> </component-plugin> </external-component-plugins> [...] /configuration>
Constructor and Description |
---|
MembershipEventListener() |
Modifier and Type | Method and Description |
---|---|
void |
postDelete(Membership m)
This method should be called after the membership has been removed from the
database but not commited yet.
|
void |
postSave(Membership m,
boolean isNew)
This method is called after the membership has been saved but not commited
yet
|
void |
preDelete(Membership m)
This method is called before the membership is removed
|
void |
preSave(Membership m,
boolean isNew)
This method is called before the membership object is saved.
|
public void preSave(Membership m, boolean isNew) throws Exception
m
- the membership to be savedisNew
- If the membership is a new record in the database or not.Exception
- The developer can decide to throw the exception or not.
If the method throw an exception. The organization service should
not save the membership.public void postSave(Membership m, boolean isNew) throws Exception
m
- The mebership objectisNew
- The membership is a new record or not.Exception
- The developer can decide to throw the exception or not.
If the method throw an exception. The organization service should
role back the data to the state before the method
MembershipHandler.linkMembership(..) is called.public void preDelete(Membership m) throws Exception
m
- The membership object to be removedException
- he developer can decide to throw the exception or not. If
the method throw an exception. The organization service should
not remove the membership record from the database.public void postDelete(Membership m) throws Exception
m
- The membership which has been removed from the database.Exception
- The developer can decide to throw the exception or not.
If the method throw the exception, the organization service
should role back the database to the state before the method
MembershipHandler.linkMembership(..) is called.Copyright © 2003–2019 eXo Platform SAS. All rights reserved.