Interface SyncHandler

    • Method Detail

      • getName

        @NotNull
        @NotNull java.lang.String getName()
        Returns the name of this sync handler.
        Returns:
        sync handler name
      • createContext

        @NotNull
        @NotNull SyncContext createContext​(@NotNull
                                           @NotNull ExternalIdentityProvider idp,
                                           @NotNull
                                           @NotNull UserManager userManager,
                                           @NotNull
                                           @NotNull ValueFactory valueFactory)
        Initializes a sync context which is used to start the sync operations.
        Parameters:
        idp - the external identity provider used for syncing
        userManager - user manager for managing authorizables
        valueFactory - the value factory to create values
        Returns:
        the sync context
      • findIdentity

        @Nullable
        @Nullable SyncedIdentity findIdentity​(@NotNull
                                              @NotNull UserManager userManager,
                                              @NotNull
                                              @NotNull java.lang.String id)
                                       throws RepositoryException
        Tries to find the identity with the given authorizable id or name.
        Parameters:
        userManager - the user manager
        id - the id or name of the authorizable
        Returns:
        a synced identity object or null
        Throws:
        RepositoryException - if an error occurs
      • requiresSync

        boolean requiresSync​(@NotNull
                             @NotNull SyncedIdentity identity)
        Checks if the identity requires sync based on the configuration, type and last sync time.
        Parameters:
        identity - the identity to check
        Returns:
        true if the identity requires synchronization.
      • listIdentities

        @NotNull
        @NotNull java.util.Iterator<SyncedIdentity> listIdentities​(@NotNull
                                                                   @NotNull UserManager userManager)
                                                            throws RepositoryException
        Lists all externally synced identities.
        Parameters:
        userManager - the user manager
        Returns:
        an iterator over all authorizable that are externally synced.
        Throws:
        RepositoryException - if an error occurs