All Known Implementing Classes:
DefaultSyncContext

public interface SyncContext
SyncContext is used as scope for sync operations. Implementations are free to associate any resources with the sync context. The sync context must not be accessed concurrently and must be closed after use.
  • Method Details

    • isKeepMissing

      boolean isKeepMissing()
      Defines if synchronization keeps missing external identities on synchronization of authorizables. Default is false.
      Returns:
      true if keep missing.
    • setKeepMissing

      @NotNull @NotNull SyncContext setKeepMissing(boolean keep)
    • isForceUserSync

      boolean isForceUserSync()
      Defines if synchronization of users always will perform, i.e. ignores the last synced properties.
      Returns:
      true if forced syncing users
    • setForceUserSync

      @NotNull @NotNull SyncContext setForceUserSync(boolean force)
    • isForceGroupSync

      boolean isForceGroupSync()
      Defines if synchronization of groups always will perform, i.e. ignores the last synced properties.
      Returns:
      true if forced syncing groups
    • setForceGroupSync

      @NotNull @NotNull SyncContext setForceGroupSync(boolean force)
    • sync

      @NotNull @NotNull SyncResult sync(@NotNull @NotNull ExternalIdentity identity) throws SyncException
      Synchronizes an external identity with the repository based on the respective configuration.
      Parameters:
      identity - the identity to sync.
      Returns:
      the result of the operation
      Throws:
      SyncException - if an error occurs
    • sync

      @NotNull @NotNull SyncResult sync(@NotNull @NotNull String id) throws SyncException
      Synchronizes an authorizable with the corresponding external identity with the repository based on the respective configuration.
      Parameters:
      id - the id of the authorizable
      Returns:
      the result of the operation
      Throws:
      SyncException - if an error occurs
    • close

      void close()
      Closes this context and releases any resources bound to it. Note that an implementation must not commit the Root passed during the creation call. This is the responsibility of the application.