Class SyncMBeanImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.authentication.external.impl.jmx.SyncMBeanImpl
-
- All Implemented Interfaces:
SynchronizationMBean
public class SyncMBeanImpl extends Object implements SynchronizationMBean
Implementation of theSynchronizationMBean
interface.
-
-
Constructor Summary
Constructors Constructor Description SyncMBeanImpl(@NotNull ContentRepository repository, @NotNull SecurityProvider securityProvider, @NotNull SyncManager syncManager, @NotNull String syncName, @NotNull ExternalIdentityProviderManager idpManager, @NotNull String idpName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String[]
convertToDynamicMembership()
Migrates all previously synchronized users to have dynamic membership if theSyncHandler
has the dynamic membership option enabled.@NotNull String
getIDPName()
Returns the name of theExternalIdentityProvider
that this MBean operates on.@NotNull String
getSyncHandlerName()
Returns the name of theSyncHandler
that this MBean operates on.@NotNull String[]
listOrphanedUsers()
Returns a list of orphaned users, i.e.@NotNull String[]
purgeOrphanedUsers()
Purges all orphaned users.@NotNull String[]
syncAllExternalUsers()
Synchronizes all the external users, i.e.@NotNull String[]
syncAllUsers(boolean purge)
Synchronizes all local users for the given IDP.@NotNull String[]
syncExternalUsers(@NotNull String[] externalIds)
Synchronizes the external users with the given external ids.@NotNull String[]
syncUsers(@NotNull String[] userIds, boolean purge)
Synchronizes the local users with the given user ids.
-
-
-
Constructor Detail
-
SyncMBeanImpl
public SyncMBeanImpl(@NotNull @NotNull ContentRepository repository, @NotNull @NotNull SecurityProvider securityProvider, @NotNull @NotNull SyncManager syncManager, @NotNull @NotNull String syncName, @NotNull @NotNull ExternalIdentityProviderManager idpManager, @NotNull @NotNull String idpName)
-
-
Method Detail
-
getSyncHandlerName
@NotNull public @NotNull String getSyncHandlerName()
Description copied from interface:SynchronizationMBean
Returns the name of theSyncHandler
that this MBean operates on.- Specified by:
getSyncHandlerName
in interfaceSynchronizationMBean
- Returns:
- the name of the sync handler.
-
getIDPName
@NotNull public @NotNull String getIDPName()
Description copied from interface:SynchronizationMBean
Returns the name of theExternalIdentityProvider
that this MBean operates on.- Specified by:
getIDPName
in interfaceSynchronizationMBean
- Returns:
- the name of the IDP.
-
syncUsers
@NotNull public @NotNull String[] syncUsers(@NotNull @NotNull String[] userIds, boolean purge)
Description copied from interface:SynchronizationMBean
Synchronizes the local users with the given user ids.- Specified by:
syncUsers
in interfaceSynchronizationMBean
- Parameters:
userIds
- the user idspurge
- iftrue
users that don't exist in the IDP are deleted.- Returns:
- result messages.
-
syncAllUsers
@NotNull public @NotNull String[] syncAllUsers(boolean purge)
Description copied from interface:SynchronizationMBean
Synchronizes all local users for the given IDP. Note that this can be an expensive operation since all potential users need to be examined.- Specified by:
syncAllUsers
in interfaceSynchronizationMBean
- Parameters:
purge
- iftrue
users that don't exist in the IDP are deleted.- Returns:
- result messages.
-
syncExternalUsers
@NotNull public @NotNull String[] syncExternalUsers(@NotNull @NotNull String[] externalIds)
Description copied from interface:SynchronizationMBean
Synchronizes the external users with the given external ids.- Specified by:
syncExternalUsers
in interfaceSynchronizationMBean
- Parameters:
externalIds
- the external id- Returns:
- result messages.
-
syncAllExternalUsers
@NotNull public @NotNull String[] syncAllExternalUsers()
Description copied from interface:SynchronizationMBean
Synchronizes all the external users, i.e. basically imports the entire IDP. Note that this can be an expensive operation.- Specified by:
syncAllExternalUsers
in interfaceSynchronizationMBean
- Returns:
- result messages.
-
listOrphanedUsers
@NotNull public @NotNull String[] listOrphanedUsers()
Description copied from interface:SynchronizationMBean
Returns a list of orphaned users, i.e. users that don't exist anymore on the IDP. Note that this can be an expensive operation since all potential users need to be examined.- Specified by:
listOrphanedUsers
in interfaceSynchronizationMBean
- Returns:
- a list of the user ids of orphaned users.
-
purgeOrphanedUsers
@NotNull public @NotNull String[] purgeOrphanedUsers()
Description copied from interface:SynchronizationMBean
Purges all orphaned users. this is similar to invokeSynchronizationMBean.syncUsers(String[], boolean)
with the list of orphaned users. Note tha this can be an expensive operation since all potential users need to be examined.- Specified by:
purgeOrphanedUsers
in interfaceSynchronizationMBean
- Returns:
- result messages.
-
convertToDynamicMembership
@NotNull public @NotNull String[] convertToDynamicMembership()
Description copied from interface:SynchronizationMBean
Migrates all previously synchronized users to have dynamic membership if the
Note: calling this method will only migrate existing group membership information to the dynamic persistence format. It does not retrieve the latest membership information from the external identity provider. Membership information will therefore only be updated upon the next synchronization.SyncHandler
has the dynamic membership option enabled. Otherwise this method will have no effect.- Specified by:
convertToDynamicMembership
in interfaceSynchronizationMBean
- Returns:
- result messages
- See Also:
DefaultSyncConfig.User.getDynamicMembership()
-
-