org.apache.jetspeed.security.impl
Class UserPrincipalImpl

java.lang.Object
  extended byorg.apache.jetspeed.security.impl.BasePrincipalImpl
      extended byorg.apache.jetspeed.security.impl.UserPrincipalImpl
All Implemented Interfaces:
org.apache.jetspeed.security.BasePrincipal, Principal, Serializable, org.apache.jetspeed.security.UserPrincipal

public class UserPrincipalImpl
extends BasePrincipalImpl
implements org.apache.jetspeed.security.UserPrincipal

UserPrincipal interface implementation.

Version:
$Id: UserPrincipalImpl.java 290457 2005-09-20 14:14:31Z ate $
Author:
David Sean Taylor
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.jetspeed.security.impl.BasePrincipalImpl
 
Fields inherited from interface org.apache.jetspeed.security.BasePrincipal
PREFS_GROUP_ROOT, PREFS_ROLE_ROOT, PREFS_USER_ROOT
 
Constructor Summary
UserPrincipalImpl(String userName)
          The user principal constructor.
 
Method Summary
 boolean equals(Object another)
          Compares this principal to the specified object.
static String getFullPathFromPrincipalName(String name)
          Gets the principal implementation full path from the principal name.
static String getPrincipalNameFromFullPath(String fullPath)
          Gets the principal name from the principal implementation full path.
 
Methods inherited from class org.apache.jetspeed.security.impl.BasePrincipalImpl
getFullPath, getFullPathFromPrincipalName, getName, getPrincipalNameFromFullPath, hashCode, isEnabled, setEnabled, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jetspeed.security.BasePrincipal
getFullPath, isEnabled, setEnabled
 
Methods inherited from interface java.security.Principal
getName, hashCode, toString
 

Constructor Detail

UserPrincipalImpl

public UserPrincipalImpl(String userName)

The user principal constructor.

Parameters:
userName - The user principal name.
Method Detail

equals

public boolean equals(Object another)

Compares this principal to the specified object. Returns true if the object passed in matches the principal represented by the implementation of this interface.

Specified by:
equals in interface Principal
Parameters:
another - Principal to compare with.
Returns:
True if the principal passed in is the same as that encapsulated by this principal, and false otherwise.

getFullPathFromPrincipalName

public static String getFullPathFromPrincipalName(String name)

Gets the principal implementation full path from the principal name.

Prepends PREFS_USER_ROOT if not prepended.

Parameters:
name - The principal name.
Returns:
The preferences full path / principal name.

getPrincipalNameFromFullPath

public static String getPrincipalNameFromFullPath(String fullPath)

Gets the principal name from the principal implementation full path.

Remove prepended PREFS_GROUP_ROOT if present.

Parameters:
fullPath - The principal full path.
Returns:
The principal name.


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.