public class CompositePrincipalProvider extends java.lang.Object implements PrincipalProvider
PrincipalProvider implementation that aggregates a list of principal
providers into a single.| Constructor and Description |
|---|
CompositePrincipalProvider(java.util.List<PrincipalProvider> providers) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.util.Iterator<? extends java.security.Principal> |
findPrincipals(int searchType)
Find all principals that match the search type.
|
@NotNull java.util.Iterator<? extends java.security.Principal> |
findPrincipals(@Nullable java.lang.String nameHint,
boolean fullText,
int searchType,
long offset,
long limit)
Find the principals that match the specified nameHint and search type.
|
@NotNull java.util.Iterator<java.security.Principal> |
findPrincipals(@Nullable java.lang.String nameHint,
int searchType)
Find the principals that match the specified nameHint and search type.
|
@NotNull java.util.Set<java.security.acl.Group> |
getGroupMembership(@NotNull java.security.Principal principal)
Returns an iterator over all group principals for which the given
principal is either direct or indirect member of.
|
@Nullable ItemBasedPrincipal |
getItemBasedPrincipal(@NotNull java.lang.String principalOakPath)
Returns the
ItemBasedPrincipal with the specified principalOakPath
or null if no principal with that path exists. |
@NotNull java.util.Set<java.security.Principal> |
getMembershipPrincipals(@NotNull java.security.Principal principal)
Returns an iterator over all group principals for which the given
principal is either direct or indirect member of.
|
@Nullable java.security.Principal |
getPrincipal(@NotNull java.lang.String principalName)
Returns the principal with the specified name or
null if the
principal does not exist. |
@NotNull java.util.Set<java.security.Principal> |
getPrincipals(@NotNull java.lang.String userID)
Tries to resolve the specified
userID to a valid principal and
it's group membership. |
static PrincipalProvider |
of(@NotNull java.util.List<PrincipalProvider> providers) |
public CompositePrincipalProvider(java.util.List<PrincipalProvider> providers)
public static PrincipalProvider of(@NotNull @NotNull java.util.List<PrincipalProvider> providers)
@Nullable
public @Nullable java.security.Principal getPrincipal(@NotNull
@NotNull java.lang.String principalName)
PrincipalProvidernull if the
principal does not exist.getPrincipal in interface PrincipalProviderprincipalName - the name of the principal to retrievenull@Nullable public @Nullable ItemBasedPrincipal getItemBasedPrincipal(@NotNull @NotNull java.lang.String principalOakPath)
PrincipalProviderItemBasedPrincipal with the specified principalOakPath
or null if no principal with that path exists.getItemBasedPrincipal in interface PrincipalProviderprincipalOakPath - the Oak path of the ItemBasedPrincipal to retrievenull@NotNull
public @NotNull java.util.Set<java.security.acl.Group> getGroupMembership(@NotNull
@NotNull java.security.Principal principal)
PrincipalProviderGroup.isMember(Principal)
must return true.
Example:
If Principal is member of Group A, and Group A is member of
Group B, this method will return Group A and Group B.
getGroupMembership in interface PrincipalProviderprincipal - the principal to return it's membership from.Group.isMember(java.security.Principal)@NotNull
public @NotNull java.util.Set<java.security.Principal> getMembershipPrincipals(@NotNull
@NotNull java.security.Principal principal)
PrincipalProviderGroupPrincipal.isMember(Principal)
must return true.
Example:
If Principal is member of Group A, and Group A is member of
Group B, this method will return Group A and Group B.
getMembershipPrincipals in interface PrincipalProviderprincipal - the principal to return it's membership from.GroupPrincipal.isMember(java.security.Principal)@NotNull
public @NotNull java.util.Set<java.security.Principal> getPrincipals(@NotNull
@NotNull java.lang.String userID)
PrincipalProvideruserID to a valid principal and
it's group membership. This method returns an empty set if the
specified ID cannot be resolved.getPrincipals in interface PrincipalProvideruserID - A userID.userID
or an empty set if it cannot be resolved.@NotNull
public @NotNull java.util.Iterator<java.security.Principal> findPrincipals(@Nullable
@Nullable java.lang.String nameHint,
int searchType)
PrincipalProviderfindPrincipals in interface PrincipalProvidernameHint - A name hint to use for non-exact matching.searchType - Limit the search to certain types of principals. Valid
values are any of
@NotNull public @NotNull java.util.Iterator<? extends java.security.Principal> findPrincipals(int searchType)
PrincipalProviderfindPrincipals in interface PrincipalProvidersearchType - Limit the search to certain types of principals. Valid
values are any of
@NotNull
public @NotNull java.util.Iterator<? extends java.security.Principal> findPrincipals(@Nullable
@Nullable java.lang.String nameHint,
boolean fullText,
int searchType,
long offset,
long limit)
PrincipalProviderfindPrincipals in interface PrincipalProvidernameHint - A name hint to use for non-exact matching.fullText - hint to use a full text query for searchsearchType - Limit the search to certain types of principals. Valid
values are any of
offset - Offset from where to start returning results. 0 for no offset.limit - Maximal number of results to return. -1 for no limit.Copyright © 2010 - 2023 Adobe. All Rights Reserved