Class SocialGroupEventListenerImpl
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.services.organization.GroupEventListener
org.exoplatform.social.core.space.impl.SocialGroupEventListenerImpl
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
public class SocialGroupEventListenerImpl
extends org.exoplatform.services.organization.GroupEventListener
-
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.Group group) This method should be called after the group has been removed from the database but not commited yet.voidpostSave(org.exoplatform.services.organization.Group group, boolean isNew) This method is called after the group has been saved but not commited yetvoidpreDelete(org.exoplatform.services.organization.Group group) This method is called before a group should be deletedvoidpreSave(org.exoplatform.services.organization.Group group, boolean isNew) This method is called before the group is persisted to the database.Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Constructor Details
-
SocialGroupEventListenerImpl
public SocialGroupEventListenerImpl()Constructor.
-
-
Method Details
-
preSave
public void preSave(org.exoplatform.services.organization.Group group, boolean isNew) throws Exception This method is called before the group is persisted to the database.- Overrides:
preSavein classorg.exoplatform.services.organization.GroupEventListener- Parameters:
group- The group to be savedisNew- if the group is a new record in the database or not- Throws:
Exception- The developer can decide to throw an exception or not. If the listener throw an exception, the organization service should not save/update the group to the database
-
postSave
public void postSave(org.exoplatform.services.organization.Group group, boolean isNew) throws Exception This method is called after the group has been saved but not commited yet- Overrides:
postSavein classorg.exoplatform.services.organization.GroupEventListener- Parameters:
group- The group has been saved.isNew- if the group is a new record in the database or not- Throws:
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 GroupHandler.addChild(..) or GroupHandler.saveGroup(..) is called.
-
preDelete
This method is called before a group should be deleted- Overrides:
preDeletein classorg.exoplatform.services.organization.GroupEventListener- Parameters:
group- the group to be delete- Throws:
Exception- The developer can decide to throw the exception or not. If the method throw an exception. The organization service should not remove the group record from the database.
-
postDelete
This method should be called after the group has been removed from the database but not commited yet.- Overrides:
postDeletein classorg.exoplatform.services.organization.GroupEventListener- Parameters:
group- The group has been removed.- Throws:
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 GroupHandler.removeGroup(..) is called.
-