|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PrincipalManager
This interface defines the principal manager which is the clients view on all principals known to the repository. Each principal manager is bound to a session and is restricted by the respective access control. The principal manager in addition provides basic search facilities.
APrincipal
is an object used to connect
to any kind of security mechanism. Example for this are the
login modules
that use principals
to process the login procedure. Group
. A
group is a principal itself and can therefore be a member of a group again.
Please note the following security considerations that need to be respected
when implementing the PrincipalManager: All principals returned by this
manager as well as Group.members()
must respect access restrictions
that may be present for the Session
this manager has been built
for. The same applies for getGroupMembership(Principal)
.
Field Summary | |
---|---|
static int |
SEARCH_TYPE_ALL
Filter flag indicating that all Principal s should be search
irrespective whether they represent a group of Principals or not. |
static int |
SEARCH_TYPE_GROUP
Filter flag indicating that only Principal s that represent
a group of Principals should be searched
and returned. |
static int |
SEARCH_TYPE_NOT_GROUP
Filter flag indicating that only Principal s that do NOT
represent a group should be searched
and returned. |
Method Summary | |
---|---|
PrincipalIterator |
findPrincipals(String simpleFilter)
Gets the principals matching a simple filter expression applied against the principal name . |
PrincipalIterator |
findPrincipals(String simpleFilter,
int searchType)
Gets the principals matching a simple filter expression applied against the principal name AND the specified search
type. |
Principal |
getEveryone()
Returns the Principal which is implicitely is applied to
every subject. |
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 manager (with respect to the sessions access rights). |
PrincipalIterator |
getPrincipals(int searchType)
Returns all Principal s matching the specified search type. |
boolean |
hasPrincipal(String principalName)
Checks if the principal with the given name is known to this manager (in respect to the sessions access rights). |
Field Detail |
---|
static final int SEARCH_TYPE_NOT_GROUP
Principal
s that do NOT
represent a group
should be searched
and returned.
static final int SEARCH_TYPE_GROUP
Principal
s that represent
a group
of Principals should be searched
and returned.
static final int SEARCH_TYPE_ALL
Principal
s should be search
irrespective whether they represent a group of Principals or not.
Method Detail |
---|
boolean hasPrincipal(String principalName)
true
then the following expression evaluates to true
as well: PrincipalManager.getPrincipal(name).getName().equals(name)
principalName
- the name of the principal to check
true
if the principal with this name is known
to this manager; false
otherwise.Principal getPrincipal(String principalName)
PrincipalManager
has been built for.
principalName
- the name of the principal to retrieve
null
if not existsPrincipalIterator findPrincipals(String simpleFilter)
principal name
.
TODO: define the filter expression.
simpleFilter
-
PrincipalIterator
over the Principal
s
matching the given filter.PrincipalIterator findPrincipals(String simpleFilter, int searchType)
principal name
AND the specified search
type.
TODO: define the filter expression.
simpleFilter
- searchType
- Any of the following constants:
PrincipalIterator
over the Principal
s
matching the given filter and search type.PrincipalIterator getPrincipals(int searchType)
Principal
s matching the specified search type.
searchType
- Any of the following constants:
PrincipalIterator
over all the Principal
s
matching the given search type.PrincipalIterator getGroupMembership(Principal principal)
principal
- the principal to return it's membership from.
Principal getEveryone()
Principal
which is implicitely is applied to
every subject.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |