org.apache.jetspeed.security.impl
Class GroupPrincipalImpl

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

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

GroupPrincipal interface implementation.

Version:
$Id: GroupPrincipalImpl.java 592149 2007-11-05 21:05:25Z taylor $
Author:
David Sean Taylor
See Also:
Serialized Form

Field Summary
private static boolean hiearchicalNames
           
private static long serialVersionUID
          The serial version uid.
 
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.
GroupPrincipalImpl(String groupName, boolean isEnabled, boolean isMapping)
           
 
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 getFullPathFromPrincipalName(String name, String prefsRoot)
           
static String getPrincipalNameFromFullPath(String fullPath)
          Gets the principal name from the principal implementation full path.
static Object useHierarchicalNames(boolean hierarchicalNames)
           
 
Methods inherited from class org.apache.jetspeed.security.impl.BasePrincipalImpl
getFullPath, getFullPathFromPrincipalName, getName, getPrincipalNameFromFullPath, hashCode, isEnabled, isMapping, 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, isMapping, setEnabled
 
Methods inherited from interface java.security.Principal
getName, hashCode, toString
 

Field Detail

serialVersionUID

private static final long serialVersionUID
The serial version uid.

See Also:
Constant Field Values

hiearchicalNames

private static boolean hiearchicalNames
Constructor Detail

GroupPrincipalImpl

public GroupPrincipalImpl(String groupName)

The group principal constructor.

Parameters:
groupName - The group principal name.

GroupPrincipalImpl

public GroupPrincipalImpl(String groupName,
                          boolean isEnabled,
                          boolean isMapping)
Method Detail

useHierarchicalNames

public static final Object useHierarchicalNames(boolean hierarchicalNames)

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
Overrides:
equals in class Object
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.

getFullPathFromPrincipalName

public static String getFullPathFromPrincipalName(String name,
                                                  String prefsRoot)


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