info.magnolia.jaas.principal
Class PrincipalCollectionImpl

java.lang.Object
  extended by info.magnolia.jaas.principal.PrincipalCollectionImpl
All Implemented Interfaces:
PrincipalCollection, java.io.Serializable, java.security.Principal

public class PrincipalCollectionImpl
extends java.lang.Object
implements PrincipalCollection

Date: Jun 29, 2005

Author:
Sameer Charles $Id: PrincipalCollectionImpl.java 32667 2010-03-13 00:37:06Z gjoseph $
See Also:
Serialized Form

Constructor Summary
PrincipalCollectionImpl()
           
 
Method Summary
 void add(java.security.Principal principal)
          Add to collection
 void clearAll()
          Clear collection
 boolean contains(java.security.Principal principal)
          Check if this collection contains specified object
 boolean contains(java.lang.String name)
          Checks if this collection contains object with the specified name
 java.security.Principal get(java.lang.String name)
          Get principal associated to the specified name from the collection
 java.lang.String getName()
          Get name given to this principal
 java.util.Iterator iterator()
          Returns an iterator on principals
 void remove(java.security.Principal principal)
          Remove from the collection
 void set(java.util.Collection collection)
          Set collection
 void setName(java.lang.String name)
          Set this principal name
 java.lang.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

PrincipalCollectionImpl

public PrincipalCollectionImpl()
Method Detail

getName

public java.lang.String getName()
Get name given to this principal

Specified by:
getName in interface PrincipalCollection
Specified by:
getName in interface java.security.Principal
Returns:
name

setName

public void setName(java.lang.String name)
Set this principal name

Specified by:
setName in interface PrincipalCollection

set

public void set(java.util.Collection collection)
Set collection

Specified by:
set in interface PrincipalCollection
Parameters:
collection -

add

public void add(java.security.Principal principal)
Add to collection

Specified by:
add in interface PrincipalCollection
Parameters:
principal - to be added to the collection

remove

public void remove(java.security.Principal principal)
Remove from the collection

Specified by:
remove in interface PrincipalCollection
Parameters:
principal - to be removed from the collection

clearAll

public void clearAll()
Clear collection

Specified by:
clearAll in interface PrincipalCollection

contains

public boolean contains(java.security.Principal principal)
Check if this collection contains specified object

Specified by:
contains in interface PrincipalCollection
Parameters:
principal -
Returns:
true if the specified object exist in the collection

contains

public boolean contains(java.lang.String name)
Checks if this collection contains object with the specified name

Specified by:
contains in interface PrincipalCollection
Parameters:
name -
Returns:
true if the collection contains the principal by the specified name

get

public java.security.Principal get(java.lang.String name)
Get principal associated to the specified name from the collection

Specified by:
get in interface PrincipalCollection
Parameters:
name -
Returns:
principal object associated to the specified name

iterator

public java.util.Iterator iterator()
Returns an iterator on principals

Returns:
iterator for Principal objects

toString

public java.lang.String toString()
Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2003-2010 Magnolia International Ltd.. All Rights Reserved.