Interface SyncContext
- 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 Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this context and releases any resources bound to it.booleanDefines if synchronization of groups always will perform, i.e.booleanDefines if synchronization of users always will perform, i.e.booleanDefines if synchronization keeps missing external identities on synchronization of authorizables.@NotNull SyncContextsetForceGroupSync(boolean force) @NotNull SyncContextsetForceUserSync(boolean force) @NotNull SyncContextsetKeepMissing(boolean keep) SeeisKeepMissing()@NotNull SyncResultSynchronizes an authorizable with the corresponding external identity with the repository based on the respective configuration.@NotNull SyncResultsync(@NotNull ExternalIdentity identity) Synchronizes an external identity with the repository based on the respective configuration.
-
Method Details
-
isKeepMissing
boolean isKeepMissing()Defines if synchronization keeps missing external identities on synchronization of authorizables. Default isfalse.- Returns:
trueif keep missing.
-
setKeepMissing
SeeisKeepMissing() -
isForceUserSync
boolean isForceUserSync()Defines if synchronization of users always will perform, i.e. ignores the last synced properties.- Returns:
trueif forced syncing users
-
setForceUserSync
-
isForceGroupSync
boolean isForceGroupSync()Defines if synchronization of groups always will perform, i.e. ignores the last synced properties.- Returns:
trueif forced syncing groups
-
setForceGroupSync
-
sync
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
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 theRootpassed during the creation call. This is the responsibility of the application.
-