org.freshcookies.security.policy
Class UnresolvedPrincipal

java.lang.Object
  extended by org.freshcookies.security.policy.UnresolvedPrincipal
All Implemented Interfaces:
java.security.Principal

public final class UnresolvedPrincipal
extends java.lang.Object
implements java.security.Principal

Represents a Principal whose class cannot be resolved by the classloader.


Constructor Summary
UnresolvedPrincipal(java.lang.String clazz, java.lang.String name)
          Constructs a new UnresolvedPrincipal.
UnresolvedPrincipal(java.lang.String clazz, java.lang.String name, java.lang.Exception e)
          Constructs a new UnresolvedPrincipal.
 
Method Summary
 java.lang.Exception getException()
          Returns the Exception used to instantiate this UnresolvedPrincipal.
 java.lang.String getName()
          Returns the name of the principal.
 java.lang.String getPrincipalClass()
          Returns the class of the unresolved Principal as a String.
 java.lang.String toString()
          Returns a string representation of this Principal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode
 

Constructor Detail

UnresolvedPrincipal

public UnresolvedPrincipal(java.lang.String clazz,
                           java.lang.String name)
Constructs a new UnresolvedPrincipal.

Parameters:
clazz - the name of the unresolved class
name - the name of the Principal

UnresolvedPrincipal

public UnresolvedPrincipal(java.lang.String clazz,
                           java.lang.String name,
                           java.lang.Exception e)
Constructs a new UnresolvedPrincipal.

Parameters:
clazz - the name of the unresolved class
name - the name of the Principal
e - the Exception indicating the reason why the Principal could not be resolved
Method Detail

getException

public final java.lang.Exception getException()
Returns the Exception used to instantiate this UnresolvedPrincipal.

Returns:
the Exception, or null if not constructed with one.

getPrincipalClass

public final java.lang.String getPrincipalClass()
Returns the class of the unresolved Principal as a String.

Returns:
the String representation of the unresolved Principal class

getName

public final java.lang.String getName()
Returns the name of the principal.

Specified by:
getName in interface java.security.Principal
See Also:
Principal.getName()

toString

public final java.lang.String toString()
Returns a string representation of this Principal.

Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()