org.n52.security.authentication.principals
Class RolePrincipal

java.lang.Object
  extended by org.n52.security.authentication.principals.NamePrincipal
      extended by org.n52.security.authentication.principals.RolePrincipal
All Implemented Interfaces:
java.io.Serializable, java.security.Principal, Scope

public class RolePrincipal
extends NamePrincipal
implements java.io.Serializable

Class RolePrincipal represents a role(-identity) of a user.

Version:
$Revision: $
Author:
Marko Reiprecht Created on 16.09.2007
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.n52.security.authentication.principals.Scope
GLOBAL
 
Constructor Summary
RolePrincipal(java.lang.String name)
          Creates a role principal with the given name and valid in the global scope.
RolePrincipal(java.lang.String name, Scope scope)
          Creates a role principal with the given name and valid only for the specified scope.
 
Method Summary
 
Methods inherited from class org.n52.security.authentication.principals.NamePrincipal
equals, getName, getScope, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
toString
 

Constructor Detail

RolePrincipal

public RolePrincipal(java.lang.String name)
              throws java.lang.IllegalArgumentException
Creates a role principal with the given name and valid in the global scope.

It throws an IllegalArgumentException if one of the arguments is null.

Parameters:
name - a role name != null.
Throws:
java.lang.IllegalArgumentException - if one of the arguments is null.

RolePrincipal

public RolePrincipal(java.lang.String name,
                     Scope scope)
              throws java.lang.IllegalArgumentException
Creates a role principal with the given name and valid only for the specified scope.

It throws an IllegalArgumentException if one of the arguments is null.

Parameters:
name - a role name != null.
scope - the scope of the role != null.
Throws:
java.lang.IllegalArgumentException - if one of the arguments is null.


Copyright © 2004-2009 52north.org. All Rights Reserved.