public class MembershipTypeEventListener
extends org.exoplatform.container.component.BaseComponentPlugin
<configuration> [..] <external-component-plugins> <target-component>org.exoplatform.services.organization.OrganizationService</target-component> <component-plugin> <name>my.membership.type.listener</name> <set-method>addListenerPlugin</set-method> <type>my.package.MyMembershipTypeEventListener</type> <description>your listener description</description> </component-plugin> </external-component-plugins> [...] /configuration>
Constructor and Description |
---|
MembershipTypeEventListener() |
Modifier and Type | Method and Description |
---|---|
void |
postDelete(MembershipType type)
This method should be called after the membership type has been removed from the
database but not commited yet.
|
void |
postSave(MembershipType type,
boolean isNew)
This method is called after the membership type has been saved but not commited
yet
|
void |
preDelete(MembershipType type)
This method is called before the membership type is removed
|
void |
preSave(MembershipType type,
boolean isNew)
This method is called before the membership type object is saved.
|
public void preSave(MembershipType type, boolean isNew) throws Exception
type
- the membership type to be savedisNew
- If the membership type 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 type.public void postSave(MembershipType type, boolean isNew) throws Exception
type
- The mebership type objectisNew
- The membership type 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.public void preDelete(MembershipType type) throws Exception
type
- The membership type 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 type record from the database.public void postDelete(MembershipType type) throws Exception
type
- The membership type 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.Copyright © 2003-2018 eXo Platform SAS. All Rights Reserved.