com.atlassian.confluence.core
Class ConfluenceEntityObject

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.confluence.core.ConfluenceEntityObject
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
AbstractLink, AbstractVersionedEntityObject, ContentPermission, Notification, Space, SpaceGroup, SpacePermission

public class ConfluenceEntityObject
extends com.atlassian.core.bean.EntityObject
implements java.io.Serializable

The superclass of all entity objects within Confluence.

It provides an ID as well as creator/modifier username and date fields.

See Also:
Serialized Form

Constructor Summary
ConfluenceEntityObject()
           
 
Method Summary
 ConfluenceUser getCreator()
           
 java.lang.String getCreatorName()
          Deprecated. Since Confluence 5.2. See instead. If you need a username you would retrieve it by id from the UserAccessor.
 ConfluenceUser getLastModifier()
           
 java.lang.String getLastModifierName()
          Deprecated. Since Confluence 5.2. See instead. If you need a username you would retrieve it by id from the UserAccessor.
static java.lang.Class getRealClass(java.lang.Object ceo)
          Get the real class of a content entity object.
 boolean isPersistent()
          This object is persistent if the id is not 0.
 void setCreator(ConfluenceUser creator)
           
 void setCreatorName(java.lang.String creatorName)
          Deprecated. since 5.2. Use setCreator(ConfluenceUser) instead.
 void setLastModifier(ConfluenceUser lastModifier)
           
 void setLastModifierName(java.lang.String lastModifierName)
          Deprecated. since 5.2. Call setLastModifier(ConfluenceUser) instead
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, equals, getCreationDate, getCurrentDate, getId, getLastModificationDate, hashCode, setClock, setCreationDate, setId, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfluenceEntityObject

public ConfluenceEntityObject()
Method Detail

getCreatorName

public java.lang.String getCreatorName()
Deprecated. Since Confluence 5.2. See instead. If you need a username you would retrieve it by id from the UserAccessor.

Returns:
username of the creator, or null if created anonymously

getCreator

public ConfluenceUser getCreator()
Since:
5.2

setCreatorName

@Deprecated
public void setCreatorName(java.lang.String creatorName)
Deprecated. since 5.2. Use setCreator(ConfluenceUser) instead.

Set the username of the creator

Parameters:
creatorName -
Throws:
java.lang.IllegalArgumentException - if the username supplied does not identify a known user in the system.

getLastModifierName

public java.lang.String getLastModifierName()
Deprecated. Since Confluence 5.2. See instead. If you need a username you would retrieve it by id from the UserAccessor.

Returns:
username of the last modifier, or null if none.

getLastModifier

public ConfluenceUser getLastModifier()
Since:
5.2

setLastModifierName

@Deprecated
public void setLastModifierName(java.lang.String lastModifierName)
Deprecated. since 5.2. Call setLastModifier(ConfluenceUser) instead

Parameters:
lastModifierName -
Throws:
java.lang.IllegalArgumentException - if the username supplied does not identify a known user in the system.

setCreator

public void setCreator(ConfluenceUser creator)
Since:
5.2

setLastModifier

public void setLastModifier(ConfluenceUser lastModifier)
Since:
5.2

isPersistent

public boolean isPersistent()
This object is persistent if the id is not 0.

Returns:
true if this instance is a persisted label.

getRealClass

public static java.lang.Class getRealClass(java.lang.Object ceo)
Get the real class of a content entity object. This is necessary as the object may be wrapped by a hibernate proxy.

Parameters:
ceo - Content entity object
Returns:
Underlying class of the ceo


Copyright © 2003-2014 Atlassian. All Rights Reserved.