|
||||||||||
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 |
---|
Fields inherited from interface org.apache.jetspeed.security.BasePrincipal |
---|
PREFS_GROUP_ROOT, PREFS_ROLE_ROOT, PREFS_USER_ROOT |
Constructor Summary | |
---|---|
BasePrincipalImpl(java.lang.String name,
java.lang.String prefsRoot,
boolean hiearchicalNames)
Principal constructor given a name and preferences root. |
|
BasePrincipalImpl(java.lang.String name,
java.lang.String prefsRoot,
boolean hiearchicalNames,
boolean isEnabled,
boolean isMapping)
|
Method Summary | |
---|---|
java.lang.String |
getFullPath()
Provides the principal full path prepending PREFS_{PRINCPAL}_ROOT if not prepended. |
static java.lang.String |
getFullPathFromPrincipalName(java.lang.String name,
java.lang.String prefsRoot,
boolean hiearchicalNames)
Gets the principal implementation full path from the principal name. |
java.lang.String |
getName()
|
static java.lang.String |
getPrincipalNameFromFullPath(java.lang.String fullPath,
java.lang.String prefsRoot,
boolean hiearchicalNames)
Gets the principal name from the principal implementation full path. |
int |
hashCode()
|
boolean |
isEnabled()
Getter for the enabled state |
boolean |
isMapping()
is this principal a security principal mapping or a real principal |
void |
setEnabled(boolean enabled)
Setter for the enabled state |
java.lang.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 |
Constructor Detail |
---|
public BasePrincipalImpl(java.lang.String name, java.lang.String prefsRoot, boolean hiearchicalNames)
Principal constructor given a name and preferences root.
name
- The principal name.prefsRoot
- The preferences root node.public BasePrincipalImpl(java.lang.String name, java.lang.String prefsRoot, boolean hiearchicalNames, boolean isEnabled, boolean isMapping)
Method Detail |
---|
public java.lang.String getFullPath()
BasePrincipal
Provides the principal full path prepending PREFS_{PRINCPAL}_ROOT if not prepended.
getFullPath
in interface BasePrincipal
BasePrincipal.getFullPath()
public java.lang.String getName()
getName
in interface java.security.Principal
Principal.getName()
public int hashCode()
hashCode
in interface java.security.Principal
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.String toString()
Returns a string representation of this principal.
toString
in interface java.security.Principal
toString
in class java.lang.Object
public static java.lang.String getFullPathFromPrincipalName(java.lang.String name, java.lang.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 java.lang.String getPrincipalNameFromFullPath(java.lang.String fullPath, java.lang.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()
BasePrincipal
Getter for the enabled state
isEnabled
in interface BasePrincipal
BasePrincipal.isEnabled()
public void setEnabled(boolean enabled)
BasePrincipal
setEnabled
in interface BasePrincipal
enabled
- The enabled stateBasePrincipal.setEnabled(boolean)
public boolean isMapping()
BasePrincipal
is this principal a security principal mapping or a real principal
isMapping
in interface BasePrincipal
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |