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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes this context and releases any resources bound to it.boolean
isForceGroupSync()
Defines if synchronization of groups always will perform, i.e.boolean
isForceUserSync()
Defines if synchronization of users always will perform, i.e.boolean
isKeepMissing()
Defines if synchronization keeps missing external identities on synchronization of authorizables.@NotNull SyncContext
setForceGroupSync(boolean force)
@NotNull SyncContext
setForceUserSync(boolean force)
@NotNull SyncContext
setKeepMissing(boolean keep)
SeeisKeepMissing()
@NotNull SyncResult
sync(@NotNull java.lang.String id)
Synchronizes an authorizable with the corresponding external identity with the repository based on the respective configuration.@NotNull SyncResult
sync(@NotNull ExternalIdentity identity)
Synchronizes an external identity with the repository based on the respective configuration.
-
-
-
Method Detail
-
isKeepMissing
boolean isKeepMissing()
Defines if synchronization keeps missing external identities on synchronization of authorizables. Default isfalse
.- Returns:
true
if keep missing.
-
setKeepMissing
@NotNull @NotNull SyncContext setKeepMissing(boolean keep)
SeeisKeepMissing()
-
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 java.lang.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 theRoot
passed during the creation call. This is the responsibility of the application.
-
-