@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 |
|---|---|
SyncContext |
createContext(ExternalIdentityProvider idp,
UserManager userManager,
ValueFactory valueFactory)
Initializes a sync context which is used to start the sync operations.
|
SyncedIdentity |
findIdentity(UserManager userManager,
String id)
Tries to find the identity with the given authorizable id or name.
|
String |
getName()
Returns the name of this sync handler.
|
Iterator<SyncedIdentity> |
listIdentities(UserManager userManager)
Lists all externally synced identities.
|
boolean |
requiresSync(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@Nonnull public String getName()
getName in interface SyncHandler@Nonnull public SyncContext createContext(@Nonnull ExternalIdentityProvider idp, @Nonnull UserManager userManager, @Nonnull 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(@Nonnull UserManager userManager, @Nonnull String id) throws RepositoryException
findIdentity in interface SyncHandleruserManager - the user managerid - the id or name of the authorizablenullRepositoryException - if an error occurspublic boolean requiresSync(@Nonnull SyncedIdentity identity)
requiresSync in interface SyncHandleridentity - the identity to checktrue if the identity requires synchronization.@Nonnull public Iterator<SyncedIdentity> listIdentities(@Nonnull UserManager userManager) throws RepositoryException
listIdentities in interface SyncHandleruserManager - the user managerRepositoryException - if an error occursCopyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.