| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jetspeed.security.impl.BasePrincipalImpl
public abstract class BasePrincipalImpl
 BasePrincipal interface implementation.
 
| Field Summary | |
|---|---|
| private  boolean | enabledis this principal enabled | 
| private  String | fullPathThe full path. | 
| private  boolean | isMappingis this principal a mapping | 
| private  String | nameThe principal name. | 
| private static long | serialVersionUIDThe version uid. | 
| Fields inherited from interface org.apache.jetspeed.security.BasePrincipal | 
|---|
| PREFS_GROUP_ROOT, PREFS_ROLE_ROOT, PREFS_USER_ROOT | 
| Constructor Summary | |
|---|---|
| BasePrincipalImpl(String name,
                  String prefsRoot,
                  boolean hiearchicalNames)Principal constructor given a name and preferences root. | |
| BasePrincipalImpl(String name,
                  String prefsRoot,
                  boolean hiearchicalNames,
                  boolean isEnabled,
                  boolean isMapping) | |
| Method Summary | |
|---|---|
|  String | getFullPath() | 
| static String | getFullPathFromPrincipalName(String name,
                             String prefsRoot,
                             boolean hiearchicalNames)Gets the principal implementation full path from the principal name. | 
|  String | getName() | 
| static String | getPrincipalNameFromFullPath(String fullPath,
                             String prefsRoot,
                             boolean hiearchicalNames)Gets the principal name from the principal implementation full path. | 
|  int | hashCode() | 
|  boolean | isEnabled() | 
|  boolean | isMapping() | 
|  void | setEnabled(boolean enabled) | 
|  String | toString()Returns a string representation of this principal. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface java.security.Principal | 
|---|
| equals | 
| Field Detail | 
|---|
private static final long serialVersionUID
private final String name
private final String fullPath
private boolean enabled
private boolean isMapping
| Constructor Detail | 
|---|
public BasePrincipalImpl(String name,
                         String prefsRoot,
                         boolean hiearchicalNames)
Principal constructor given a name and preferences root.
name - The principal name.prefsRoot - The preferences root node.
public BasePrincipalImpl(String name,
                         String prefsRoot,
                         boolean hiearchicalNames,
                         boolean isEnabled,
                         boolean isMapping)
| Method Detail | 
|---|
public String getFullPath()
getFullPath in interface org.apache.jetspeed.security.BasePrincipalBasePrincipal.getFullPath()public String getName()
getName in interface PrincipalPrincipal.getName()public int hashCode()
hashCode in interface PrincipalhashCode in class ObjectObject.hashCode()public String toString()
Returns a string representation of this principal.
toString in interface PrincipaltoString in class Object
public static String getFullPathFromPrincipalName(String name,
                                                  String prefsRoot,
                                                  boolean hiearchicalNames)
Gets the principal implementation full path from the principal name.
Hierarchical principal names should follow: {principal}.{subprincipal}. "." is used as the separator for hierarchical elements.
The implementation path follow /PREFS_{PRINCIPAL}_ROOT/{principal}/{subprincipal}.
name - The principal name.prefsRoot - The preferences root node.hiearchicalNames - indicator if hierarchy encoding (replacing '.' with '/') should be done
public static String getPrincipalNameFromFullPath(String fullPath,
                                                  String prefsRoot,
                                                  boolean hiearchicalNames)
Gets the principal name from the principal implementation full path.
Hierarchical principal names should follow: {principal}.{subprincipal}. "." is used as the separator for hierarchical elements.
The implementation path follow /PREFS_{PRINCIPAL}_ROOT/{principal}/{subprincipal}.
fullPath - The principal full path.prefsRoot - The preferences root node.hiearchicalNames - indicator if hierarchical decoding (replacing '/' with '.') should be done
public boolean isEnabled()
isEnabled in interface org.apache.jetspeed.security.BasePrincipalBasePrincipal.isEnabled()public void setEnabled(boolean enabled)
setEnabled in interface org.apache.jetspeed.security.BasePrincipalBasePrincipal.setEnabled(boolean)public boolean isMapping()
isMapping in interface org.apache.jetspeed.security.BasePrincipal| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||