|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.security.auth.PrincipalCollectionImpl
public class PrincipalCollectionImpl
Principal collection implementation based on simple list. Collection is managed externally. Date: Jun 29, 2005
Constructor Summary | |
---|---|
PrincipalCollectionImpl()
|
Method Summary | |
---|---|
void |
add(Principal principal)
Adds principal to the internal collection of principals. |
void |
addAll(Collection<Principal> principal)
Adds principals to the internal collection of principals. |
void |
clearAll()
removes all principals from the collection. |
boolean |
contains(Principal principal)
Checks if this collection contains specified principal. |
boolean |
contains(String name)
Checks if this collection contains principal with the specified name. |
Principal |
get(String name)
Gets principal associated to the specified name from the collection. |
String |
getName()
Gets name given to this principal. |
Iterator<Principal> |
iterator()
Returns an iterator over the collection of principals. |
void |
remove(Principal principal)
Removes principal from the collection if present or does nothing in case principal was not present in the collection. |
void |
set(Collection<Principal> collection)
Deprecated. since 4.5 |
void |
setName(String name)
Sets this principal name. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.security.Principal |
---|
equals, hashCode |
Constructor Detail |
---|
public PrincipalCollectionImpl()
Method Detail |
---|
public String getName()
getName
in interface PrincipalCollection
getName
in interface Principal
public void setName(String name)
setName
in interface PrincipalCollection
@Deprecated public void set(Collection<Principal> collection)
set
in interface PrincipalCollection
public void add(Principal principal)
add
in interface PrincipalCollection
principal
- to be added to the collectionpublic void addAll(Collection<Principal> principal)
addAll
in interface PrincipalCollection
principal
- to be added to the collectionpublic void remove(Principal principal)
remove
in interface PrincipalCollection
principal
- to be removed from the collectionpublic void clearAll()
clearAll
in interface PrincipalCollection
public boolean contains(Principal principal)
contains
in interface PrincipalCollection
public boolean contains(String name)
contains
in interface PrincipalCollection
name
-
public Principal get(String name)
get
in interface PrincipalCollection
name
-
public Iterator<Principal> iterator()
iterator
in interface PrincipalCollection
iterator
in interface Iterable<Principal>
public String toString()
toString
in interface Principal
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |