Class DefaultSyncContext

  • All Implemented Interfaces:
    SyncContext

    public class DefaultSyncContext
    extends java.lang.Object
    implements SyncContext
    Internal implementation of the sync context
    • Method Detail

      • joinPaths

        @Deprecated
        public static java.lang.String joinPaths​(java.lang.String... paths)
        Deprecated.
        Since Oak 1.3.10. Please use PathUtils.concatRelativePaths(String...) instead.
        Robust relative path concatenation.
        Parameters:
        paths - relative paths
        Returns:
        the concatenated path
      • close

        public 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.
        Specified by:
        close in interface SyncContext
      • isKeepMissing

        public boolean isKeepMissing()
        Defines if synchronization keeps missing external identities on synchronization of authorizables. Default is false.
        Specified by:
        isKeepMissing in interface SyncContext
        Returns:
        true if keep missing.
      • isForceUserSync

        public boolean isForceUserSync()
        Defines if synchronization of users always will perform, i.e. ignores the last synced properties.
        Specified by:
        isForceUserSync in interface SyncContext
        Returns:
        true if forced syncing users
      • isForceGroupSync

        public boolean isForceGroupSync()
        Defines if synchronization of groups always will perform, i.e. ignores the last synced properties.
        Specified by:
        isForceGroupSync in interface SyncContext
        Returns:
        true if forced syncing groups
      • sync

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

        @NotNull
        public @NotNull SyncResult sync​(@NotNull
                                        @NotNull java.lang.String id)
                                 throws SyncException
        Synchronizes an authorizable with the corresponding external identity with the repository based on the respective configuration.
        Specified by:
        sync in interface SyncContext
        Parameters:
        id - the id of the authorizable
        Returns:
        the result of the operation
        Throws:
        SyncException - if an error occurs