|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.n52.security.authentication.principals.NamePrincipal
public abstract class NamePrincipal
Class NamePrincipal is a minimal implementation of an principal. It is declared abstract to avoid the usage of such unspecific principals.
A login module shall use one of its subclasses for better application support. To support better differentiation of principals a scope is introduced, this can be used to distinguish principals with the same name and class.
Field Summary |
---|
Fields inherited from interface org.n52.security.authentication.principals.Scope |
---|
GLOBAL |
Constructor Summary | |
---|---|
NamePrincipal(java.lang.String name,
Scope scope)
Constructor NamePrincipal creates a new NamePrincipal instance, which name is only valid within the given scope. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Returns the equaltiy. |
java.lang.String |
getName()
Method gets the name of this NamePrincipal object. |
Scope |
getScope()
Returns the scope of this name principal. |
int |
hashCode()
Returns the 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 |
---|
public NamePrincipal(java.lang.String name, Scope scope) throws java.lang.IllegalArgumentException
name
- the name != null.scope
- the scope != null.
java.lang.IllegalArgumentException
- if one of the arguments is null.Method Detail |
---|
public java.lang.String getName()
getName
in interface java.security.Principal
getName
in interface Scope
public Scope getScope()
getScope
in interface Scope
Scope.getScope()
public boolean equals(java.lang.Object o)
equals
in interface java.security.Principal
equals
in class java.lang.Object
o
- the other object.
public int hashCode()
hashCode
in interface java.security.Principal
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |