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(DefaultSyncConfig config,
ExternalIdentityProvider idp,
UserManager userManager,
ValueFactory valueFactory) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this context and releases any resources bound to it.
|
static DefaultSyncedIdentity |
createSyncedIdentity(Authorizable auth)
Creates a synced identity from the given authorizable.
|
static ExternalIdentityRef |
getIdentityRef(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. |
SyncContext |
setForceGroupSync(boolean forceGroupSync)
|
SyncContext |
setForceUserSync(boolean forceUserSync)
|
SyncContext |
setKeepMissing(boolean keepMissing)
|
SyncResult |
sync(ExternalIdentity identity)
Synchronizes an external identity with the repository based on the respective configuration.
|
SyncResult |
sync(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(DefaultSyncConfig config, ExternalIdentityProvider idp, UserManager userManager, ValueFactory valueFactory)
public static DefaultSyncedIdentity createSyncedIdentity(Authorizable auth) throws RepositoryException
auth
- the authorizableRepositoryException
- if an error occurspublic static ExternalIdentityRef getIdentityRef(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 SyncContext
public boolean isKeepMissing()
false
.isKeepMissing
in interface SyncContext
true
if keep missing.public SyncContext setKeepMissing(boolean keepMissing)
setKeepMissing
in interface SyncContext
public boolean isForceUserSync()
isForceUserSync
in interface SyncContext
true
if forced syncing userspublic SyncContext setForceUserSync(boolean forceUserSync)
setForceUserSync
in interface SyncContext
public boolean isForceGroupSync()
isForceGroupSync
in interface SyncContext
true
if forced syncing groupspublic SyncContext setForceGroupSync(boolean forceGroupSync)
SyncContext
setForceGroupSync
in interface SyncContext
public SyncResult sync(ExternalIdentity identity) throws SyncException
sync
in interface SyncContext
identity
- the identity to sync.SyncException
- if an error occurspublic SyncResult sync(java.lang.String id) throws SyncException
sync
in interface SyncContext
id
- the id of the authorizableSyncException
- if an error occurs"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"