Package org.opencms.file.history
Class CmsHistoryPrincipal
- java.lang.Object
-
- org.opencms.security.CmsPrincipal
-
- org.opencms.file.history.CmsHistoryPrincipal
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<I_CmsPrincipal>
,java.security.Principal
,I_CmsPrincipal
public class CmsHistoryPrincipal extends CmsPrincipal implements java.lang.Cloneable
Describes an OpenCms historical principal entry.- Since:
- 6.9.1
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.opencms.security.CmsPrincipal
m_description, m_flags, m_id, m_name
-
Fields inherited from interface org.opencms.security.I_CmsPrincipal
FLAG_CORE_LIMIT, FLAG_DISABLED, FLAG_ENABLED, FLAG_GROUP_ROLE, FLAG_GROUP_VIRTUAL, FLAG_USER_MANAGED, FLAG_USER_WEBUSER, PRINCIPAL_GROUP, PRINCIPAL_USER
-
-
Constructor Summary
Constructors Constructor Description CmsHistoryPrincipal(CmsUUID id, java.lang.String name, java.lang.String description, java.lang.String email, java.lang.String type, CmsUUID userDeleted, long dateDeleted)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkName(java.lang.String name)
Checks if the provided principal name is valid and can be used as an argument value forI_CmsPrincipal.setName(String)
.java.lang.Object
clone()
long
getDateDeleted()
Returns the date the user was deleted.java.lang.String
getDescription(java.util.Locale locale)
Returns the description of this principal.java.lang.String
getEmail()
Returns the email address of this deleted user, if this principal is a user.java.lang.String
getType()
Returns the principal type.CmsUUID
getUserDeleted()
Returns the id of user that deleted this user.boolean
isGroup()
Returnstrue
if this principal is of type
.CmsGroup
boolean
isUser()
Returnstrue
if this principal is of type
.CmsUser
-
Methods inherited from class org.opencms.security.CmsPrincipal
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
-
-
-
-
Constructor Detail
-
CmsHistoryPrincipal
public CmsHistoryPrincipal(CmsUUID id, java.lang.String name, java.lang.String description, java.lang.String email, java.lang.String type, CmsUUID userDeleted, long dateDeleted)
Default constructor.- Parameters:
id
- the unique id of this principalname
- the fully qualified namedescription
- the descriptiontype
- the principal typeemail
- the email addressuserDeleted
- the id of user that deleted this principaldateDeleted
- the date the principal was deleted
-
-
Method Detail
-
checkName
public void checkName(java.lang.String name)
Description copied from interface:I_CmsPrincipal
Checks if the provided principal name is valid and can be used as an argument value forI_CmsPrincipal.setName(String)
.- Specified by:
checkName
in interfaceI_CmsPrincipal
- Parameters:
name
- the principal name to check- See Also:
I_CmsPrincipal.checkName(java.lang.String)
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
- See Also:
Object.clone()
-
getDateDeleted
public long getDateDeleted()
Returns the date the user was deleted.- Returns:
- the date the user was deleted
-
getDescription
public java.lang.String getDescription(java.util.Locale locale)
Description copied from interface:I_CmsPrincipal
Returns the description of this principal.- Specified by:
getDescription
in interfaceI_CmsPrincipal
- Parameters:
locale
- locale of the description- Returns:
- the description of this principal
- See Also:
I_CmsPrincipal.getDescription(java.util.Locale)
-
getEmail
public java.lang.String getEmail()
Returns the email address of this deleted user, if this principal is a user.- Returns:
- the email address of this deleted user
-
getType
public java.lang.String getType()
Returns the principal type.- Returns:
- the principal type
-
getUserDeleted
public CmsUUID getUserDeleted()
Returns the id of user that deleted this user.- Returns:
- the id of user that deleted this user
-
isGroup
public boolean isGroup()
Description copied from interface:I_CmsPrincipal
Returnstrue
if this principal is of type
.CmsGroup
- Specified by:
isGroup
in interfaceI_CmsPrincipal
- Overrides:
isGroup
in classCmsPrincipal
- Returns:
true
if this principal is of typeCmsGroup
- See Also:
CmsPrincipal.isGroup()
-
isUser
public boolean isUser()
Description copied from interface:I_CmsPrincipal
Returnstrue
if this principal is of type
.CmsUser
- Specified by:
isUser
in interfaceI_CmsPrincipal
- Overrides:
isUser
in classCmsPrincipal
- Returns:
true
if this principal is of typeCmsUser
- See Also:
CmsPrincipal.isUser()
-
-