@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 DefaultSyncConfig for configuration options.
| Modifier and Type | Field and Description |
|---|---|
static String |
REP_EXTERNAL_ID
Name of the
ExternalIdentity.getExternalId() property of a synchronized identity. |
static String |
REP_LAST_SYNCED
Name of the property that stores the time when an identity was synced.
|
| 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,
org.apache.jackrabbit.api.security.user.UserManager userManager,
ValueFactory valueFactory)
Initializes a sync context which is used to start the sync operations.
|
SyncedIdentity |
findIdentity(org.apache.jackrabbit.api.security.user.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(org.apache.jackrabbit.api.security.user.UserManager userManager)
Lists all externally synced identities.
|
public static final String REP_EXTERNAL_ID
ExternalIdentity.getExternalId() property of a synchronized identity.public static final String REP_LAST_SYNCED
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 org.apache.jackrabbit.api.security.user.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 org.apache.jackrabbit.api.security.user.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 Iterator<SyncedIdentity> listIdentities(@Nonnull org.apache.jackrabbit.api.security.user.UserManager userManager) throws RepositoryException
listIdentities in interface SyncHandleruserManager - the user managerRepositoryException - if an error occursCopyright © 2012-2015 The Apache Software Foundation. All Rights Reserved.