public class DefaultSyncContext extends java.lang.Object implements SyncContext
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REP_EXTERNAL_ID
Name of the
ExternalIdentity.getExternalId() property of a synchronized identity. |
static java.lang.String |
REP_LAST_SYNCED
Name of the property that stores the time when an identity was synced.
|
| Constructor and Description |
|---|
DefaultSyncContext(@NotNull DefaultSyncConfig config,
@NotNull ExternalIdentityProvider idp,
@NotNull UserManager userManager,
@NotNull ValueFactory valueFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this context and releases any resources bound to it.
|
static @Nullable DefaultSyncedIdentity |
createSyncedIdentity(@Nullable Authorizable auth)
Creates a synced identity from the given authorizable.
|
static @Nullable ExternalIdentityRef |
getIdentityRef(@Nullable Authorizable auth)
Retrieves the external identity ref from the authorizable
|
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.
|
static java.lang.String |
joinPaths(java.lang.String... paths)
Deprecated.
Since Oak 1.3.10. Please use
PathUtils.concatRelativePaths(String...) instead. |
@NotNull SyncContext |
setForceGroupSync(boolean forceGroupSync)
|
@NotNull SyncContext |
setForceUserSync(boolean forceUserSync)
|
@NotNull SyncContext |
setKeepMissing(boolean keepMissing)
|
@NotNull SyncResult |
sync(@NotNull ExternalIdentity identity)
Synchronizes an external identity with the repository based on the respective configuration.
|
@NotNull SyncResult |
sync(@NotNull java.lang.String id)
Synchronizes an authorizable with the corresponding external identity with the repository based on the respective
configuration.
|
public static final java.lang.String REP_EXTERNAL_ID
ExternalIdentity.getExternalId() property of a synchronized identity.public static final java.lang.String REP_LAST_SYNCED
public DefaultSyncContext(@NotNull
@NotNull DefaultSyncConfig config,
@NotNull
@NotNull ExternalIdentityProvider idp,
@NotNull
@NotNull UserManager userManager,
@NotNull
@NotNull ValueFactory valueFactory)
@Nullable public static @Nullable DefaultSyncedIdentity createSyncedIdentity(@Nullable @Nullable Authorizable auth) throws RepositoryException
auth - the authorizableRepositoryException - if an error occurs@Nullable public static @Nullable ExternalIdentityRef getIdentityRef(@Nullable @Nullable Authorizable auth) throws RepositoryException
auth - the authorizableRepositoryException - if an error occurspublic static java.lang.String joinPaths(java.lang.String... paths)
PathUtils.concatRelativePaths(String...) instead.paths - relative pathspublic void close()
Root passed during the creation call. This is the responsibility of the
application.close in interface SyncContextpublic boolean isKeepMissing()
false.isKeepMissing in interface SyncContexttrue if keep missing.@NotNull public @NotNull SyncContext setKeepMissing(boolean keepMissing)
setKeepMissing in interface SyncContextpublic boolean isForceUserSync()
isForceUserSync in interface SyncContexttrue if forced syncing users@NotNull public @NotNull SyncContext setForceUserSync(boolean forceUserSync)
setForceUserSync in interface SyncContextpublic boolean isForceGroupSync()
isForceGroupSync in interface SyncContexttrue if forced syncing groups@NotNull public @NotNull SyncContext setForceGroupSync(boolean forceGroupSync)
SyncContextsetForceGroupSync in interface SyncContext@NotNull public @NotNull SyncResult sync(@NotNull @NotNull ExternalIdentity identity) throws SyncException
sync in interface SyncContextidentity - the identity to sync.SyncException - if an error occurs@NotNull public @NotNull SyncResult sync(@NotNull @NotNull java.lang.String id) throws SyncException
sync in interface SyncContextid - the id of the authorizableSyncException - if an error occursCopyright © 2010 - 2023 Adobe. All Rights Reserved