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
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    postDelete(org.exoplatform.services.organization.Group group)
    This method should be called after the group has been removed from the database but not commited yet.
    void
    postSave(org.exoplatform.services.organization.Group group, boolean isNew)
    This method is called after the group has been saved but not commited yet
    void
    preDelete(org.exoplatform.services.organization.Group group)
    This method is called before a group should be deleted
    void
    preSave(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      preSave in class org.exoplatform.services.organization.GroupEventListener
      Parameters:
      group - The group to be saved
      isNew - 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:
      postSave in class org.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

      public void preDelete(org.exoplatform.services.organization.Group group) throws Exception
      This method is called before a group should be deleted
      Overrides:
      preDelete in class org.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

      public void postDelete(org.exoplatform.services.organization.Group group) throws Exception
      This method should be called after the group has been removed from the database but not commited yet.
      Overrides:
      postDelete in class org.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.