info.magnolia.jaas.principal
Class AbstractPrincipalList

java.lang.Object
  extended by info.magnolia.jaas.principal.AbstractPrincipalList
All Implemented Interfaces:
info.magnolia.cms.security.auth.PrincipalList, Serializable, Principal
Direct Known Subclasses:
GroupListImpl, RoleListImpl

public abstract class AbstractPrincipalList
extends Object
implements info.magnolia.cms.security.auth.PrincipalList

Implementation of the PrincipalList providing most common functionality.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph
See Also:
Serialized Form

Constructor Summary
protected AbstractPrincipalList()
           
 
Method Summary
 void add(String name)
          Adds a name to the list.
 Collection getList()
          Gets list of roles as string.
 String getName()
          Gets name given to this principal.
 boolean has(String name)
          Checks if the role name exist in this list.
 void setName(String name)
          Sets 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

AbstractPrincipalList

protected AbstractPrincipalList()
Method Detail

getName

public String getName()
Gets name given to this principal.

Specified by:
getName in interface info.magnolia.cms.security.auth.PrincipalList
Specified by:
getName in interface Principal
Returns:
name

setName

public void setName(String name)
Sets principal name.

Specified by:
setName in interface info.magnolia.cms.security.auth.PrincipalList
Parameters:
name -

add

public void add(String name)
Adds a name to the list.

Specified by:
add in interface info.magnolia.cms.security.auth.PrincipalList
Parameters:
name -

getList

public Collection getList()
Gets list of roles as string.

Specified by:
getList in interface info.magnolia.cms.security.auth.PrincipalList
Returns:
roles

has

public boolean has(String name)
Checks if the role name exist in this list.

Specified by:
has in interface info.magnolia.cms.security.auth.PrincipalList
Parameters:
name -

toString

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


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