org.apache.jetspeed.security.impl
Class GroupPrincipalImpl

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

public class GroupPrincipalImpl
extends BasePrincipalImpl
implements org.apache.jetspeed.security.GroupPrincipal

GroupPrincipal interface implementation.

Version:
$Id: GroupPrincipalImpl.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
GroupPrincipalImpl(String groupName)
          The group 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

GroupPrincipalImpl

public GroupPrincipalImpl(String groupName)

The group principal constructor.

Parameters:
groupName - The group 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_GROUP_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.