@Service public class DefaultSyncHandler extends Object implements SyncHandler
DefaultSyncHandler implements an sync handler that synchronizes users and groups from an external identity
provider with the repository users.
Please refer to DefaultSyncConfigImpl for configuration options.
| Constructor and Description |
|---|
DefaultSyncHandler()
Default constructor for OSGi
|
DefaultSyncHandler(DefaultSyncConfig config)
Constructor for non-OSGi cases.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull SyncContext |
createContext(@NotNull ExternalIdentityProvider idp,
@NotNull UserManager userManager,
@NotNull ValueFactory valueFactory)
Initializes a sync context which is used to start the sync operations.
|
SyncedIdentity |
findIdentity(@NotNull UserManager userManager,
@NotNull String id)
Tries to find the identity with the given authorizable id or name.
|
@NotNull String |
getName()
Returns the name of this sync handler.
|
@NotNull Iterator<SyncedIdentity> |
listIdentities(@NotNull UserManager userManager)
Lists all externally synced identities.
|
boolean |
requiresSync(@NotNull SyncedIdentity identity)
Checks if the identity requires sync based on the configuration, type and last sync time.
|
public DefaultSyncHandler()
public DefaultSyncHandler(DefaultSyncConfig config)
config - the configuration@NotNull public @NotNull String getName()
getName in interface SyncHandler@NotNull public @NotNull SyncContext createContext(@NotNull @NotNull ExternalIdentityProvider idp, @NotNull @NotNull UserManager userManager, @NotNull @NotNull ValueFactory valueFactory) throws SyncException
createContext in interface SyncHandleridp - the external identity provider used for syncinguserManager - user manager for managing authorizablesvalueFactory - the value factory to create valuesSyncException - if an error occurspublic SyncedIdentity findIdentity(@NotNull @NotNull UserManager userManager, @NotNull @NotNull String id) throws RepositoryException
findIdentity in interface SyncHandleruserManager - the user managerid - the id or name of the authorizablenullRepositoryException - if an error occurspublic boolean requiresSync(@NotNull
@NotNull SyncedIdentity identity)
requiresSync in interface SyncHandleridentity - the identity to checktrue if the identity requires synchronization.@NotNull public @NotNull Iterator<SyncedIdentity> listIdentities(@NotNull @NotNull UserManager userManager) throws RepositoryException
listIdentities in interface SyncHandleruserManager - the user managerRepositoryException - if an error occursCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.