org.opencms.file.history
Class CmsHistoryPrincipal

java.lang.Object
  extended by org.opencms.security.CmsPrincipal
      extended by org.opencms.file.history.CmsHistoryPrincipal
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.security.Principal, I_CmsPrincipal

public class CmsHistoryPrincipal
extends CmsPrincipal
implements java.lang.Cloneable

Describes an OpenCms historical principal entry.

Since:
6.9.1
Version:
$Revision: 1.7 $
Author:
Michael Moossen

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_PROJECT_MANAGER, FLAG_GROUP_PROJECT_USER, FLAG_GROUP_ROLE, FLAG_GROUP_VIRTUAL, FLAG_USER_MANAGED, FLAG_USER_WEBUSER, PRINCIPAL_GROUP, PRINCIPAL_USER
 
Constructor Summary
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
 void checkName(java.lang.String name)
          Checks if the provided principal name is valid and can be used as an argument value for I_CmsPrincipal.setName(String).
 java.lang.Object clone()
           
 long getDateDeleted()
          Returns the date the user was deleted.
 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()
          Returns true if this principal is of type CmsGroup.
 boolean isUser()
          Returns true if this principal is of type CmsUser.
 
Methods inherited from class org.opencms.security.CmsPrincipal
compareTo, equals, filterCore, filterCoreFlag, filterFlag, getDescription, getDisplayName, getFlags, getId, getName, getOuFqn, getPrefixedGroup, getPrefixedName, getPrefixedUser, getSimpleName, hashCode, isEnabled, readPrefixedPrincipal, readPrincipal, readPrincipal, readPrincipalIncludingHistory, setDescription, setEnabled, setFlags, setName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
toString
 

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 principal
name - the fully qualified name
description - the description
type - the principal type
email - the email address
userDeleted - the id of user that deleted this principal
dateDeleted - 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 for I_CmsPrincipal.setName(String).

Specified by:
checkName in interface I_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 class java.lang.Object
See Also:
Object.clone()

getDateDeleted

public long getDateDeleted()
Returns the date the user was deleted.

Returns:
the date the user was deleted

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
Returns true if this principal is of type CmsGroup.

Specified by:
isGroup in interface I_CmsPrincipal
Overrides:
isGroup in class CmsPrincipal
Returns:
true if this principal is of type CmsGroup
See Also:
CmsPrincipal.isGroup()

isUser

public boolean isUser()
Description copied from interface: I_CmsPrincipal
Returns true if this principal is of type CmsUser.

Specified by:
isUser in interface I_CmsPrincipal
Overrides:
isUser in class CmsPrincipal
Returns:
true if this principal is of type CmsUser
See Also:
CmsPrincipal.isUser()