Interface AutoMembershipConfig
-
public interface AutoMembershipConfig
Optional extension of theDefaultSyncConfig.Authorizable.getAutoMembership()
that allows to define conditional auto-membership based on the nature of a givenAuthorizable
.
-
-
Field Summary
Fields Modifier and Type Field Description static AutoMembershipConfig
EMPTY
static java.lang.String
PARAM_SYNC_HANDLER_NAME
Name of the configuration property that defines the name of the synchronization handler for which this instance ofAutoMembershipConfig
takes effect.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Iterator<Authorizable>
getAutoMembers(@NotNull UserManager userManager, @NotNull Group group)
Best-effort attempt to retrieve all automatically defined members of the givenGroup
.@NotNull java.util.Set<java.lang.String>
getAutoMembership(@NotNull Authorizable authorizable)
Returns the group ids which the given synchronized external user/group should automatically be added as member.java.lang.String
getName()
Returns the name of the sync handler for which this configuration takes effect.
-
-
-
Field Detail
-
PARAM_SYNC_HANDLER_NAME
static final java.lang.String PARAM_SYNC_HANDLER_NAME
Name of the configuration property that defines the name of the synchronization handler for which this instance ofAutoMembershipConfig
takes effect.- See Also:
AutoMembershipAware
, Constant Field Values
-
EMPTY
static final AutoMembershipConfig EMPTY
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name of the sync handler for which this configuration takes effect.- Returns:
- the sync handler name.
- See Also:
PARAM_SYNC_HANDLER_NAME
-
getAutoMembership
@NotNull @NotNull java.util.Set<java.lang.String> getAutoMembership(@NotNull @NotNull Authorizable authorizable)
Returns the group ids which the given synchronized external user/group should automatically be added as member.- Parameters:
authorizable
- An external identity that has been synchronized into the repository.- Returns:
- A set of group ids which define the automatic membership for the given authorizable.
-
getAutoMembers
java.util.Iterator<Authorizable> getAutoMembers(@NotNull @NotNull UserManager userManager, @NotNull @NotNull Group group)
Best-effort attempt to retrieve all automatically defined members of the givenGroup
.- Parameters:
userManager
- The user manager associated with the givengroup
.group
- The target group for which the known automatically added synced identities should be retrieved.- Returns:
- An iterator of synced external identities. If the given group is not configured to hold any automatic members or if the implementation is not able to determined the members an empty iterator is returned.
- See Also:
DynamicMembershipProvider.getMembers(Group, boolean)
-
-