public class FallbackPrincipalProvider extends Object implements PrincipalProvider
FallbackPrincipalProvider
is used to provide any desired
principal. It is used to defined ACE for principals that are not known to
the repository yet or that were deleted.Modifier and Type | Field and Description |
---|---|
static String |
OPTION_DISABLED
name of the "disabled" option.
|
Constructor and Description |
---|
FallbackPrincipalProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
canReadPrincipal(Session session,
Principal principalToRead)
Tests if the provided session is allowed to read the given principal.
|
void |
close()
This is called when a provider is not longer used by the repository.
|
org.apache.jackrabbit.api.security.principal.PrincipalIterator |
findPrincipals(String simpleFilter)
Searches for
Principal s that match the given String. |
org.apache.jackrabbit.api.security.principal.PrincipalIterator |
findPrincipals(String simpleFilter,
int searchType)
Searches for
Principal s that match the given String. |
org.apache.jackrabbit.api.security.principal.PrincipalIterator |
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 given name if is known to this provider
|
org.apache.jackrabbit.api.security.principal.PrincipalIterator |
getPrincipals(int searchType)
Returns an iterator over all principals that match the given search type.
|
void |
init(Properties options)
Initialize this provider.
|
public static final String OPTION_DISABLED
public Principal getPrincipal(String principalName)
getPrincipal
in interface PrincipalProvider
principalName
- the name of the principal to retrieveUnknownPrincipal
with the given name.public org.apache.jackrabbit.api.security.principal.PrincipalIterator findPrincipals(String simpleFilter)
Principal
s that match the given String.
NOTE: Group
s are included in the search result.findPrincipals
in interface PrincipalProvider
PrincipalProvider.findPrincipals(String,int)
public org.apache.jackrabbit.api.security.principal.PrincipalIterator findPrincipals(String simpleFilter, int searchType)
Principal
s that match the given String.findPrincipals
in interface PrincipalProvider
searchType
- searchType Any of the following constants:
PrincipalManager.SEARCH_TYPE_ALL
PrincipalManager.SEARCH_TYPE_GROUP
PrincipalManager.SEARCH_TYPE_NOT_GROUP
PrincipalProvider.findPrincipals(String)
public org.apache.jackrabbit.api.security.principal.PrincipalIterator getPrincipals(int searchType)
getPrincipals
in interface PrincipalProvider
searchType
- searchType Any of the following constants:
PrincipalManager.SEARCH_TYPE_ALL
PrincipalManager.SEARCH_TYPE_GROUP
PrincipalManager.SEARCH_TYPE_NOT_GROUP
public org.apache.jackrabbit.api.security.principal.PrincipalIterator getGroupMembership(Principal principal)
GroupPrincipal.isMember(Principal)
evaluates to true
. A principal is an indirect member of a
group if any of its groups (to any degree of separation) is direct member
of the group.
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.public void init(Properties options)
init
in interface PrincipalProvider
options
- the options that are setpublic void close()
close
in interface PrincipalProvider
public boolean canReadPrincipal(Session session, Principal principalToRead)
canReadPrincipal
in interface PrincipalProvider
principalToRead
- The principal to be accessed by the specified subject.true
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.