|
||||||||||
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 |
enabled
Gets the principal name from the principal implementation full path. |
private String |
fullPath
The full path. |
private String |
name
The principal name. |
private static long |
serialVersionUID
The 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. |
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()
|
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
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}.
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.Method Detail |
---|
public String getFullPath()
getFullPath
in interface org.apache.jetspeed.security.BasePrincipal
BasePrincipal.getFullPath()
public String getName()
getName
in interface Principal
Principal.getName()
public int hashCode()
hashCode
in interface Principal
hashCode
in class Object
Object.hashCode()
public String toString()
Returns a string representation of this principal.
toString
in interface Principal
toString
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.BasePrincipal
BasePrincipal.isEnabled()
public void setEnabled(boolean enabled)
setEnabled
in interface org.apache.jetspeed.security.BasePrincipal
BasePrincipal.setEnabled(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |