|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Representation of an identity in the cms (currently user or group), used to define permissions on a resource.
Field Summary | |
static int |
FLAG_CORE_LIMIT
Upper limit for core flags, any principal object with flags greater than this value will be filtered out. |
static int |
FLAG_DISABLED
This flag is set for disabled principals in the database. |
static int |
FLAG_ENABLED
This flag is set for enabled principals in the database. |
static int |
FLAG_GROUP_PROJECT_MANAGER
Flag to indicate a group is a potential project manager group. |
static int |
FLAG_GROUP_PROJECT_USER
Flag to indicate a group is a potential project user group. |
static int |
FLAG_GROUP_WORKFLOW_ROLE
Flag to indicate a group is used as a role in the workflow. |
static java.lang.String |
PRINCIPAL_GROUP
Identifier for group principals. |
static java.lang.String |
PRINCIPAL_USER
Identifier for user principals. |
Method Summary | |
void |
checkName(java.lang.String name)
Checks if the provided principal name is valid and can be used as an argument value for setName(String) . |
boolean |
equals(java.lang.Object obj)
Compares the given object with this principal. |
java.lang.String |
getDescription()
Returns the description of this principal. |
int |
getFlags()
Returns the flags of this principal. |
CmsUUID |
getId()
Returns the unique id of this principal. |
java.lang.String |
getName()
Returns the unique name of this principal. |
java.lang.String |
getPrefixedName()
Returns this principals unique name prefixed with it's type. |
int |
hashCode()
Returns the hash code of this object. |
boolean |
isEnabled()
Returns true if this principal is enabled. |
boolean |
isGroup()
Returns true if this principal is of type . |
boolean |
isUser()
Returns true if this principal is of type . |
void |
setDescription(java.lang.String description)
Sets the description of this principal. |
void |
setEnabled(boolean enabled)
Enables (or disables) this principal, depending on the given status. |
void |
setFlags(int value)
Sets this principals flags to the specified value. |
void |
setName(java.lang.String name)
Sets the unique name of this principal. |
Methods inherited from interface java.security.Principal |
toString |
Field Detail |
public static final int FLAG_CORE_LIMIT
public static final int FLAG_DISABLED
public static final int FLAG_ENABLED
public static final int FLAG_GROUP_PROJECT_MANAGER
public static final int FLAG_GROUP_PROJECT_USER
public static final int FLAG_GROUP_WORKFLOW_ROLE
public static final java.lang.String PRINCIPAL_GROUP
public static final java.lang.String PRINCIPAL_USER
Method Detail |
public void checkName(java.lang.String name)
setName(String)
.
name
- the principal name to checkpublic boolean equals(java.lang.Object obj)
equals
in interface java.security.Principal
obj
- object to comapre
public java.lang.String getDescription()
public int getFlags()
The principal flags are used to store special information about the
principals state encoded bitwise. Usually the flags int value should not
be directly accessed. Utility methods like
provide a much easier way to access the information contained in the flags.isEnabled()
public CmsUUID getId()
public java.lang.String getName()
getName
in interface java.security.Principal
public java.lang.String getPrefixedName()
The type prefix can either be
(for groups) or PRINCIPAL_GROUP
.
(for users).PRINCIPAL_USER
.
public int hashCode()
hashCode
in interface java.security.Principal
public boolean isEnabled()
true
if this principal is enabled.A principal may be disabled in order to deactivate it, for example to prevent logins of a user. If a principal is just disabled but not deleted, the credentials of the principal in the VFS are still valid.
true
if this principal is enabledpublic boolean isGroup()
true
if this principal is of type CmsGroup
.
true
if this principal is of type CmsGroup
public boolean isUser()
true
if this principal is of type CmsUser
.
true
if this principal is of type CmsUser
public void setDescription(java.lang.String description)
description
- the principal description to setpublic void setEnabled(boolean enabled)
enabled
- the principal status to setpublic void setFlags(int value)
The principal flags are used to store special information about the
principals state encoded bitwise. Usually the flags int value should not
be directly accessed. Utility methods like
provide a much easier way to manipulate the information contained in the flags.setEnabled(boolean)
value
- the value to set this principals flags topublic void setName(java.lang.String name)
name
- the unique name of this principal to set
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |