Interface SynchroGroupManager

  • All Known Implementing Classes:
    DefaultSynchroGroupManager

    public interface SynchroGroupManager
    This manager maintains a context of synchronized groups in the final aim to perform manual or scheduled synchronizations.

    A secondary goal of this manager is to avoid to request the database each time a synchronization is requested. That is why it maintains a context of synchronized group that MUST be updated mainly by administration services.

    API Note:
    the synchronization group manager MUST be application scoped in order to be handled properly.
    Implementation Note:
    no @PostConstruct annotation is used to call resetContext() to initialize the context. The reset method is called by Administration implementation.
    • Method Detail

      • synchronize

        void synchronize()
        Performs the synchronization of synchronized groups.
        API Note:
        the synchronized groups are those from the contexts, no database requests are performed.
        Implementation Requirements:
        implementation takes into account that several call can be performed at a same time.
      • updateContextWith

        void updateContextWith​(Group group)
        Updates the context of the manager with the given group data.

        If the group is a synchronized one, then it will be added to the list of group to perform update on. If it is not synchronized, then it is removed from this list.

        Parameters:
        group - data representing a group.
        Throws:
        IllegalArgumentException - if group identifier does not exist into data.
      • removeFromContext

        void removeFromContext​(Group group)
        Removes the given group from the context of the manager.
        Parameters:
        group - data representing a group.
        Throws:
        IllegalArgumentException - if group identifier does not exist into data.
      • resetContext

        void resetContext()
        Resets the context of the manager.
        API Note:
        it performs mainly the load of synchronized groups from the repository (database).