com.cenqua.crucible.model
Class Principal.Anonymous

java.lang.Object
  extended by com.cenqua.crucible.model.Principal.Anonymous
All Implemented Interfaces:
Principal
Enclosing interface:
Principal

public static class Principal.Anonymous
extends java.lang.Object
implements Principal


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.cenqua.crucible.model.Principal
Principal.Anonymous
 
Field Summary
static Principal.Anonymous ANON
           
 
Method Summary
 java.lang.String getDisplayName()
           
 java.lang.String getUserName()
           
static boolean isAnon(Principal p)
          Check whether a given principal represents ANON -- either by being null or by being equal to ANON.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANON

public static final Principal.Anonymous ANON
Method Detail

getUserName

public java.lang.String getUserName()
Specified by:
getUserName in interface Principal

getDisplayName

public java.lang.String getDisplayName()
Specified by:
getDisplayName in interface Principal

isAnon

public static boolean isAnon(Principal p)
Check whether a given principal represents ANON -- either by being null or by being equal to ANON. As Principal is implemented by classes which use the convention of being null if the current user is anonymous, comparing a concrete Principal with ANON via equals() is unsafe.