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:
Serializable, Cloneable
Direct Known Subclasses:
AbstractLink, AbstractVersionedEntityObject, ContentPermission, Notification, Space, SpaceGroup, SpacePermission

public class ConfluenceEntityObject
extends com.atlassian.core.bean.EntityObject
implements 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()
           
 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()
           
 String getLastModifierName()
          Deprecated. Since Confluence 5.2. See instead. If you need a username you would retrieve it by id from the UserAccessor.
static Class getRealClass(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(String creatorName)
          Deprecated. since 5.2. Use setCreator(ConfluenceUser) instead.
 void setLastModifier(ConfluenceUser lastModifier)
           
 void setLastModifierName(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 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(String creatorName)
Deprecated. since 5.2. Use setCreator(ConfluenceUser) instead.

Set the username of the creator

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

getLastModifierName

public 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(String lastModifierName)
Deprecated. since 5.2. Call setLastModifier(ConfluenceUser) instead

Parameters:
lastModifierName -
Throws:
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 Class getRealClass(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–2015 Atlassian. All rights reserved.