org.n52.security.common.subject
Class RolePrincipal

java.lang.Object
  extended by org.n52.security.common.subject.NamePrincipal
      extended by org.n52.security.common.subject.RolePrincipal
All Implemented Interfaces:
Serializable, Principal, Scope

public class RolePrincipal
extends NamePrincipal
implements Serializable

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.common.subject.Scope
GLOBAL
 
Constructor Summary
RolePrincipal(String name)
          Creates a role principal with the given name and valid in the global scope.
RolePrincipal(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.common.subject.NamePrincipal
equals, getName, getScope, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RolePrincipal

public RolePrincipal(String name)
              throws 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:
IllegalArgumentException - if one of the arguments is null.

RolePrincipal

public RolePrincipal(String name,
                     Scope scope)
              throws 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:
IllegalArgumentException - if one of the arguments is null.


Copyright © 2004–2014 52north.org. All rights reserved.