|
JSecurity | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PrincipalCollection
A collection of all principals associated with a corresponding Subject.
| Method Summary | ||
|---|---|---|
List |
asList()
Returns a single Subject's principals retrieved from all configured Realms as a List, or an empty List if there are not any principals. |
|
Set |
asSet()
Returns a single Subject's principals retrieved from all configured Realms as a Set, or an empty Set if there are not any principals. |
|
|
byType(Class<T> type)
Returns all principals assignable from the specified type, or an empty Collection if no principals of that type are contained. |
|
Collection |
fromRealm(String realmName)
Returns a single Subject's principals retrieved from the specified Realm only as a Collection, or an empty Collection if there are not any principals from that realm. |
|
Set<String> |
getRealmNames()
Returns the realm names that this collection has principals for. |
|
boolean |
isEmpty()
Returns true if this collection is empty, false otherwise. |
|
|
oneByType(Class<T> type)
Returns a single principal assignable from the specified type, or null if there are none of the specified type. |
|
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
<T> T oneByType(Class<T> type)
Note that this would return null List always if the corresponding subject has not logged in.
type - the type of the principal that should be returned.
<T> Collection<T> byType(Class<T> type)
Note that this would return an empty Collection always if the corresponding subject has not logged in.
type - the type of the principals that should be returned.
List asList()
Note that this would return an empty List always if the corresponding subject has not logged in.
Set asSet()
Note that this would return an empty Set always if the corresponding subject has not logged in.
Collection fromRealm(String realmName)
Note that this would return an empty Collection always if the corresponding subject has not logged in.
realmName - the name of the Realm from which the principals were retrieved.
Set<String> getRealmNames()
boolean isEmpty()
true if this collection is empty, false otherwise.
true if this collection is empty, false otherwise.
|
JSecurity | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||