org.n52.security.authentication.principals
Class NamedScope

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

public class NamedScope
extends java.lang.Object
implements Scope

Class NamedScope is a scope with a name.

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

Field Summary
 
Fields inherited from interface org.n52.security.authentication.principals.Scope
GLOBAL
 
Constructor Summary
NamedScope(java.lang.String name)
          Constructor creates a new NamedScope with the specified name.
NamedScope(java.lang.String name, Scope scope)
          Constructor creates a new NamedScope with the specified name.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns the equaltiy.
 java.lang.String getName()
          Method gets the name of this NamedScope object.
 Scope getScope()
          Method gets the scope of this NamedScope object.
 int hashCode()
          Returns the hashCode.
 java.lang.String toString()
          Method toString return the name getName().
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamedScope

public NamedScope(java.lang.String name)
           throws java.lang.IllegalArgumentException
Constructor creates a new NamedScope with the specified name.

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

Parameters:
name - the name != null.
Throws:
java.lang.IllegalArgumentException - if the given string is null.

NamedScope

public NamedScope(java.lang.String name,
                  Scope scope)
           throws java.lang.IllegalArgumentException
Constructor creates a new NamedScope with the specified name.

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

Parameters:
name - the name != null.
scope - the scope != null.
Throws:
java.lang.IllegalArgumentException - if the given string is null.
Method Detail

getName

public java.lang.String getName()
Method gets the name of this NamedScope object.

Specified by:
getName in interface Scope
Returns:
String.
See Also:
Scope.getName()

getScope

public Scope getScope()
Method gets the scope of this NamedScope object.

Specified by:
getScope in interface Scope
Returns:
Scope.
See Also:
Scope.getScope()

equals

public boolean equals(java.lang.Object o)
Returns the equaltiy.

Overrides:
equals in class java.lang.Object
Parameters:
o - the o.
Returns:
boolean.

hashCode

public int hashCode()
Returns the hashCode.

Overrides:
hashCode in class java.lang.Object
Returns:
int.

toString

public java.lang.String toString()
Method toString return the name getName().

Overrides:
toString in class java.lang.Object
Returns:
String.


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