Package com.atlassian.confluence.spaces
Class SpaceDescription
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- All Implemented Interfaces:
Searchable
,Content
,Addressable
,ContentTypeAware
,Versioned
,RelatableEntity
,EditableLabelable
,Labelable
,Spaced
,Serializable
,Cloneable
,Comparable<ContentEntityObject>
public class SpaceDescription extends SpaceContentEntityObject
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONTENT_TYPE_PERSONAL_SPACEDESC
static String
CONTENT_TYPE_SPACEDESC
-
Fields inherited from class com.atlassian.confluence.core.ContentEntityObject
COLLABORATIVE_EDITING_UUID, CONFLUENCE_RECOVERY, CONFLUENCE_RECOVERY_WITH_EXTERNAL_CHANGE, CONTENT_RESTORED_SYNC_REV_SOURCE, CREATED, CURRENT, DELETED, DELETED_BY, DELETED_BY_ANON_VALUE, DRAFT, DUMMY_SYNC_REV, LIMITED_MODE_SYNC_REV_SOURCE, MODIFIED, SHARE_ID, SYNC_REV, SYNC_REV_SOURCE, SYNCHRONY_ACK_SYNC_REV_SOURCE, SYNCHRONY_RECOVERY, SYNCHRONY_RECOVERY_WITH_EXTERNAL_CHANGE, SYNCHRONY_SYNC_REV_SOURCE
-
Fields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
INITIAL_VERSION
-
-
Constructor Summary
Constructors Constructor Description SpaceDescription()
SpaceDescription(Space space)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAttachmentUrlPath(Attachment attachment)
Gets the path relative to Confluence's base URL to view the given attachment in the context of this content (for example, highlighted in the content's list of attachments).BodyType
getDefaultBodyType()
String
getDisplayTitle()
Returns the display title.ContentEntityObject
getLatestVersion()
Get the latest, current version of this versioned object.String
getSpaceKey()
String
getType()
An easy name for the type of this content: makes it easy for things like the #contentLink macro to work out what to draw.String
getUrlPath()
boolean
isPersonalSpace()
-
Methods inherited from class com.atlassian.confluence.core.SpaceContentEntityObject
convertToHistoricalVersion, getNameForComparison, getSpace, hashCode, isIndexable, isInSpace, setSpace
-
Methods inherited from class com.atlassian.confluence.core.ContentEntityObject
addAttachment, addComment, addCustomContent, addOutgoingLink, addPermission, applyChildVersioningPolicy, applyChildVersioningPolicy, clone, compareTo, ensureAttachmentBelongsToContent, equals, getAttachmentManager, getAttachmentNamed, getAttachments, getAttachmentsUrlPath, getBodyAsString, getBodyAsStringWithoutMarkup, getBodyContent, getBodyContent, getBodyContents, getCollaborativeEditingUuid, getComments, getContainerContent, getContentId, getContentPermission, getContentPermissionSet, getContentStatus, getContentStatusObject, getCustomContent, getEntity, getExcerpt, getIdAsString, getLatestVersionId, getLatestVersionsOfAttachments, getLowerTitle, getOriginalVersionId, getOutgoingLinks, getPermissions, getProperties, getRenderedVersionComment, getSearchableDependants, getSelector, getShareId, getSynchronyRevision, getSynchronyRevisionSource, getTitle, getTrashDate, getTypeEnum, getVersionComment, hasContentPermissions, hasPermissions, isCurrent, isDeleted, isDraft, isUnpublished, isVersionCommentAvailable, removeAttachment, removeComment, removeContentPermissionSet, removeCustomContent, removeOutgoingLink, replaceContentProperties, restore, restoreDependents, setAttachments, setBodyAsString, setBodyContent, setBodyContents, setCollaborativeEditingUuid, setComments, setContainerContent, setContentPropertiesFrom, setContentStatus, setOriginalVersion, setOriginalVersionId, setOutgoingLinks, setShareId, setSynchronyRevision, setSynchronyRevisionSource, setTitle, setVersionComment, sharedAccessAllowed, sharedAccessAllowed, toPageContext, toString, trash, trash, trashDependents, wasCreatedBy
-
Methods inherited from class com.atlassian.confluence.core.AbstractLabelableEntityObject
addLabelling, getGlobalLabels, getLabelCount, getLabellings, getLabels, getLabelsForDisplay, getPersonalLabels, getTeamLabels, getVisibleLabels, isFavourite, removeLabelling, setLabellings
-
Methods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
getConfluenceRevision, getVersion, getVersionChildPolicy, isLatestVersion, isNew, 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.confluence.core.Addressable
getId
-
Methods inherited from interface com.atlassian.confluence.labels.EditableLabelable
getId, isPersistent
-
Methods inherited from interface com.atlassian.bonnie.Searchable
getId
-
-
-
-
Field Detail
-
CONTENT_TYPE_SPACEDESC
public static final String CONTENT_TYPE_SPACEDESC
- See Also:
- Constant Field Values
-
CONTENT_TYPE_PERSONAL_SPACEDESC
public static final String CONTENT_TYPE_PERSONAL_SPACEDESC
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SpaceDescription
public SpaceDescription()
-
SpaceDescription
public SpaceDescription(Space space)
-
-
Method Detail
-
getDisplayTitle
public String getDisplayTitle()
Description copied from class:ContentEntityObject
Returns the display title. Some entities don't have titles for identification. For example, personal information objects use the user's fullname. Override this method to provide a custom title.- Specified by:
getDisplayTitle
in interfaceAddressable
- Overrides:
getDisplayTitle
in classContentEntityObject
- Returns:
- the display title
-
getLatestVersion
public ContentEntityObject getLatestVersion()
Description copied from interface:Versioned
Get the latest, current version of this versioned object. If this object is the current version, return this object.Note that drafts are a special version of a
ContentEntityObject
so for drafts this method should return theContentEntityObject
the drafts points to if it exists and the draft itself otherwise.- Specified by:
getLatestVersion
in interfaceVersioned
- Overrides:
getLatestVersion
in classAbstractVersionedEntityObject
- Returns:
- the current version of this object.
- See Also:
ContentEntityObject.DRAFT
-
getUrlPath
public String getUrlPath()
- Specified by:
getUrlPath
in interfaceAddressable
- Specified by:
getUrlPath
in classContentEntityObject
- Returns:
- a link to the home page of the associated space
-
getType
public String getType()
Description copied from class:ContentEntityObject
An easy name for the type of this content: makes it easy for things like the #contentLink macro to work out what to draw.This is a bit of a hack, but it saves heaps of code elsewhere, especially since we tend to get back these objects wrapped in all sorts of Hibernate CGLIB stuff.
- Specified by:
getType
in interfaceContentTypeAware
- Specified by:
getType
in classContentEntityObject
- Returns:
- the content type
-
getSpaceKey
public String getSpaceKey()
- Overrides:
getSpaceKey
in classSpaceContentEntityObject
-
isPersonalSpace
public boolean isPersonalSpace()
-
getDefaultBodyType
public BodyType getDefaultBodyType()
- Overrides:
getDefaultBodyType
in classContentEntityObject
-
getAttachmentUrlPath
public String getAttachmentUrlPath(Attachment attachment)
Description copied from class:ContentEntityObject
Gets the path relative to Confluence's base URL to view the given attachment in the context of this content (for example, highlighted in the content's list of attachments). Generally you will want to callAttachment.getUrlPath()
instead of this method: if we ever implement view pages for individual attachments, that's the method that will be changed to point to them.The default implementation just returns the view page for this content.
- Overrides:
getAttachmentUrlPath
in classContentEntityObject
- Parameters:
attachment
- one of this content's attachments- Returns:
- the path relative to the base url to view the attachment in the context of this content.
-
-