SK.gnome.dwarf.auth
Class GenericPrincipal
java.lang.Object
SK.gnome.dwarf.auth.GenericPrincipal
- All Implemented Interfaces:
- java.security.Principal
- Direct Known Subclasses:
- RolePrincipal, ServicePrincipal, UserPrincipal
- public abstract class GenericPrincipal
- extends java.lang.Object
- implements java.security.Principal
This class implements a generic Principal.
Constructor Summary |
GenericPrincipal(java.lang.String name)
Creates a new GenericPrincipal.
|
Method Summary |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getName()
Returns the principal name. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
GenericPrincipal
public GenericPrincipal(java.lang.String name)
- Creates a new GenericPrincipal.
The string argument is trimmed before it is used for the principal name.
- Parameters:
name
- the principal name
- Throws:
java.lang.NullPointerException
- if the name argument is null
java.lang.IllegalArgumentException
- if the name argument is an empty string
getName
public final java.lang.String getName()
- Returns the principal name.
- Specified by:
getName
in interface java.security.Principal
- Returns:
- the name
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interface java.security.Principal
hashCode
public int hashCode()
- Specified by:
hashCode
in interface java.security.Principal
toString
public java.lang.String toString()
- Specified by:
toString
in interface java.security.Principal
Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.