com.atlassian.confluence.core
Class SpaceContentEntityObject

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.confluence.core.ConfluenceEntityObject
          extended by com.atlassian.confluence.core.AbstractVersionedEntityObject
              extended by com.atlassian.confluence.core.AbstractLabelableEntityObject
                  extended by com.atlassian.confluence.core.ContentEntityObject
                      extended by com.atlassian.confluence.core.SpaceContentEntityObject
All Implemented Interfaces:
com.atlassian.bonnie.Searchable, Content, Addressable, ContentTypeAware, Versioned, EditableLabelable, Labelable, Spaced, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
Direct Known Subclasses:
AbstractPage, ContentEntitySimulacrum, CustomContentEntityObject, Mail, SpaceDescription, UserStatus

public abstract class SpaceContentEntityObject
extends ContentEntityObject
implements Spaced

A ContentEntityObject that is a first-class member of a Space (i.e. pages, mail, news, but not comments or attachments)

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.atlassian.confluence.core.ContentEntityObject
CREATED, CURRENT, DELETED, MODIFIED
 
Fields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
INITIAL_VERSION
 
Constructor Summary
SpaceContentEntityObject()
           
 
Method Summary
 void addTrackbackLink(TrackbackLink link)
           
 void convertToHistoricalVersion()
          Remove all data from the object that does not need to be saved by historical versions.
 java.lang.String getNameForComparison()
          Subclasses should implement this method, giving a String back so that the content can be alphabetically sorted in a mixed-type list of content-entities.
 Space getSpace()
           
 java.lang.String getSpaceKey()
           
 int hashCode()
           
 boolean isIndexable()
          pages, blogs etc that aren't not associated with a space (either because they are historical or corrupt) should not be indexed if they are indexed, and returned in search results, they are broken and are therefore useless
 boolean isInSpace(Space space)
           
 void setSpace(Space space)
           
 
Methods inherited from class com.atlassian.confluence.core.ContentEntityObject
addAttachment, addComment, addOutgoingLink, addPermission, addReferralLink, clone, compareTo, ensureAttachmentBelongsToContent, equals, getAttachmentNamed, getAttachments, getAttachmentsUrlPath, getAttachmentUrlPath, getBodyAsString, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getBodyContents, getComments, getContentPermission, getContentPermissionSet, getContentStatus, getDefaultBodyType, getDisplayTitle, getEntity, getExcerpt, getIdAsString, getLatestVersionsOfAttachments, getOutgoingLinks, getPermissions, getReferralLinks, getRenderedVersionComment, getSearchableDependants, getTitle, getTrackbackLinks, getType, getTypeEnum, getUrlPath, getUserAccessor, getVersionComment, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isRecentlyUpdatedFor, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeOutgoingLink, removeReferralLink, removeTrackbackLink, setAttachments, setBodyAsString, setBodyContent, setBodyContents, setComments, setContent, setContentStatus, setOutgoingLinks, setReferralLinks, setTitle, setTrackbackLinks, setUserAccessor, setVersionComment, toPageContext, toString, trash
 
Methods inherited from class com.atlassian.confluence.core.AbstractLabelableEntityObject
addLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getLabelUtil, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, isFavourite, removeLabelling, setLabellings
 
Methods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
getLatestVersion, getOriginalVersion, getVersion, isLatestVersion, isNew, setOriginalVersion, setVersion
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject
getCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setCreatorName, setLastModifier, setLastModifierName
 
Methods inherited from class com.atlassian.core.bean.EntityObject
getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.bonnie.Searchable
getId
 
Methods inherited from interface com.atlassian.confluence.core.Addressable
getId
 
Methods inherited from interface com.atlassian.confluence.labels.EditableLabelable
getId, isPersistent
 

Constructor Detail

SpaceContentEntityObject

public SpaceContentEntityObject()
Method Detail

getSpace

public Space getSpace()
Specified by:
getSpace in interface Spaced

setSpace

public void setSpace(Space space)

addTrackbackLink

public void addTrackbackLink(TrackbackLink link)
Overrides:
addTrackbackLink in class ContentEntityObject

convertToHistoricalVersion

public void convertToHistoricalVersion()
Description copied from interface: Versioned
Remove all data from the object that does not need to be saved by historical versions. For versioned objects that are persisted, this includes removing associations with other persisted objects that may otherwise cause us to break the expected arity of the database relations.

When using Hibernate to persist versioned objects, take special care to null any field that might contain a Hibernate-persisted collection, as Hibernate does not allow two different persistent objects to refer to the same persisted collection at the same time.

Specified by:
convertToHistoricalVersion in interface Versioned
Overrides:
convertToHistoricalVersion in class ContentEntityObject

hashCode

public int hashCode()
Overrides:
hashCode in class ContentEntityObject

getNameForComparison

public java.lang.String getNameForComparison()
Description copied from class: ContentEntityObject
Subclasses should implement this method, giving a String back so that the content can be alphabetically sorted in a mixed-type list of content-entities.

Specified by:
getNameForComparison in class ContentEntityObject

getSpaceKey

public java.lang.String getSpaceKey()

isIndexable

public boolean isIndexable()
pages, blogs etc that aren't not associated with a space (either because they are historical or corrupt) should not be indexed if they are indexed, and returned in search results, they are broken and are therefore useless

Specified by:
isIndexable in interface com.atlassian.bonnie.Searchable
Overrides:
isIndexable in class ContentEntityObject

isInSpace

public boolean isInSpace(Space space)


Copyright © 2003-2014 Atlassian. All Rights Reserved.