org.n52.security.common.subject
Class NamedScope

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

public class NamedScope
extends Object
implements Scope

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.common.subject.Scope
GLOBAL
 
Constructor Summary
NamedScope(String name)
          Constructor creates a new NamedScope with the specified name.
NamedScope(String name, Scope scope)
          Constructor creates a new NamedScope with the specified name.
 
Method Summary
 boolean equals(Object o)
           
 String getName()
          Method gets the name of this NamedScope object.
 Scope getScope()
          Method gets the scope of this NamedScope object.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamedScope

public NamedScope(String name)
           throws 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:
IllegalArgumentException - if the given string is null.

NamedScope

public NamedScope(String name,
                  Scope scope)
           throws 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:
IllegalArgumentException - if the given string is null.
Method Detail

getName

public 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(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


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