public class CompositePrincipalProvider extends Object implements PrincipalProvider
PrincipalProvider
implementation that aggregates a list of principal
providers into a single.Constructor and Description |
---|
CompositePrincipalProvider(List<PrincipalProvider> providers) |
Modifier and Type | Method and Description |
---|---|
Iterator<? extends Principal> |
findPrincipals(int searchType)
Find all principals that match the search type.
|
Iterator<Principal> |
findPrincipals(String nameHint,
int searchType)
Find the principals that match the specified nameHint and search type.
|
Set<Group> |
getGroupMembership(Principal principal)
Returns an iterator over all group principals for which the given
principal is either direct or indirect member of.
|
Principal |
getPrincipal(String principalName)
Returns the principal with the specified name or
null if the
principal does not exist. |
Set<Principal> |
getPrincipals(String userID)
Tries to resolve the specified
userID to a valid principal and
it's group membership. |
public CompositePrincipalProvider(List<PrincipalProvider> providers)
public Principal getPrincipal(String principalName)
PrincipalProvider
null
if the
principal does not exist.getPrincipal
in interface PrincipalProvider
principalName
- the name of the principal to retrievenull
public Set<Group> getGroupMembership(Principal principal)
PrincipalProvider
Group.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 PrincipalProvider
principal
- the principal to return it's membership from.Group.isMember(java.security.Principal)
public Set<Principal> getPrincipals(String userID)
PrincipalProvider
userID
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 PrincipalProvider
userID
- A userID.userID
or an empty set if it cannot be resolved.public Iterator<Principal> findPrincipals(String nameHint, int searchType)
PrincipalProvider
findPrincipals
in interface PrincipalProvider
nameHint
- A name hint to use for non-exact matching.searchType
- Limit the search to certain types of principals. Valid
values are any of
public Iterator<? extends Principal> findPrincipals(int searchType)
PrincipalProvider
findPrincipals
in interface PrincipalProvider
searchType
- Limit the search to certain types of principals. Valid
values are any of
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"