public class CmsGroup extends CmsPrincipal
CmsUser
,
Serialized Formm_description, m_flags, m_id, m_name
FLAG_CORE_LIMIT, FLAG_DISABLED, FLAG_ENABLED, FLAG_GROUP_ROLE, FLAG_GROUP_VIRTUAL, FLAG_USER_MANAGED, FLAG_USER_WEBUSER, PRINCIPAL_GROUP, PRINCIPAL_USER
Constructor and Description |
---|
CmsGroup()
Creates a new, empty OpenCms group principal.
|
CmsGroup(CmsUUID id,
CmsUUID parentId,
java.lang.String name,
java.lang.String description,
int flags)
Creates a new OpenCms group principal.
|
Modifier and Type | Method and Description |
---|---|
void |
checkName(java.lang.String name)
Checks if the provided group name is valid and can be used as an argument value
for
CmsPrincipal.setName(String) . |
java.lang.Object |
clone() |
java.lang.String |
getDescription(java.util.Locale locale)
Returns the description of this organizational unit.
|
CmsUUID |
getParentId()
Returns the parent group id of this group.
|
static boolean |
hasPrefix(java.lang.String principalName)
Checks if the given String starts with
I_CmsPrincipal.PRINCIPAL_GROUP followed by a dot. |
boolean |
isGroup()
Returns
true if this principal is of type . |
boolean |
isRole()
Checks if this group is a role group.
|
boolean |
isUser()
Returns
true if this principal is of type . |
boolean |
isVirtual()
Checks if this group is a virtual group, emulating a role.
|
static java.lang.String |
removePrefix(java.lang.String principalName)
Removes the prefix if the given String starts with
I_CmsPrincipal.PRINCIPAL_GROUP followed by a dot. |
void |
setParentId(CmsUUID parentId)
Sets the parent group id of this group.
|
java.lang.String |
toString() |
compareTo, equals, filterCoreFlag, filterCoreGroups, filterCoreUsers, filterFlag, getDescription, getDisplayName, getDisplayName, getFlags, getId, getName, getOuFqn, getPrefixedGroup, getPrefixedName, getPrefixedUser, getSimpleName, getType, hashCode, isEnabled, readPrefixedPrincipal, readPrincipal, readPrincipal, readPrincipal, readPrincipalIncludingHistory, setDescription, setEnabled, setFlags, setName
public CmsGroup()
public CmsGroup(CmsUUID id, CmsUUID parentId, java.lang.String name, java.lang.String description, int flags)
id
- the unique id of the groupparentId
- the is of the parent groupname
- the fully qualified name of the name of the groupdescription
- the description of the groupflags
- the flags of the grouppublic static boolean hasPrefix(java.lang.String principalName)
I_CmsPrincipal.PRINCIPAL_GROUP
followed by a dot.
null
.
principalName
- the group name to checktrue
in case the String starts with I_CmsPrincipal.PRINCIPAL_GROUP
public static java.lang.String removePrefix(java.lang.String principalName)
I_CmsPrincipal.PRINCIPAL_GROUP
followed by a dot.
null
.
I_CmsPrincipal.PRINCIPAL_GROUP
followed by a dot it is returned unchanged.
principalName
- the group name to remove the prefix fromI_CmsPrincipal.PRINCIPAL_GROUP
with the following dot removedpublic void checkName(java.lang.String name)
CmsPrincipal.setName(String)
.A group name must not be empty or whitespace only.
name
- the group name to checkI_CmsValidationHandler.checkGroupName(String)
public java.lang.Object clone()
clone
in class java.lang.Object
Object.clone()
public java.lang.String getDescription(java.util.Locale locale)
locale
- the localepublic CmsUUID getParentId()
public boolean isGroup()
I_CmsPrincipal
true
if this principal is of type CmsGroup
.isGroup
in interface I_CmsPrincipal
isGroup
in class CmsPrincipal
true
if this principal is of type CmsGroup
I_CmsPrincipal.isGroup()
public boolean isRole()
true
if this group is a role grouppublic boolean isUser()
I_CmsPrincipal
true
if this principal is of type CmsUser
.isUser
in interface I_CmsPrincipal
isUser
in class CmsPrincipal
true
if this principal is of type CmsUser
I_CmsPrincipal.isUser()
public boolean isVirtual()
public void setParentId(CmsUUID parentId)
parentId
- the parent group id to setpublic java.lang.String toString()
toString
in interface java.security.Principal
toString
in class java.lang.Object
Object.toString()