Class SpaceDescription

All Implemented Interfaces:
Searchable, Content, Addressable, ContentTypeAware, Versioned, RelatableEntity, EditableLabelable, Labelable, Spaced, Serializable, Cloneable, Comparable<ContentEntityObject>
Direct Known Subclasses:
ReadOnlySpaceDescription

public class SpaceDescription extends SpaceContentEntityObject
See Also:
  • Field Details

  • Constructor Details

    • SpaceDescription

      public SpaceDescription()
    • SpaceDescription

      public SpaceDescription(Space space)
  • Method Details

    • 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 interface Addressable
      Overrides:
      getDisplayTitle in class ContentEntityObject
      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 the ContentEntityObject the drafts points to if it exists and the draft itself otherwise.

      Specified by:
      getLatestVersion in interface Versioned
      Overrides:
      getLatestVersion in class AbstractVersionedEntityObject
      Returns:
      the current version of this object.
      See Also:
    • getUrlPath

      public String getUrlPath()
      Specified by:
      getUrlPath in interface Addressable
      Specified by:
      getUrlPath in class ContentEntityObject
      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 interface ContentTypeAware
      Specified by:
      getType in class ContentEntityObject
      Returns:
      the content type
    • getSpaceKey

      public String getSpaceKey()
      Overrides:
      getSpaceKey in class SpaceContentEntityObject
    • isPersonalSpace

      public boolean isPersonalSpace()
    • getDefaultBodyType

      public BodyType getDefaultBodyType()
      Overrides:
      getDefaultBodyType in class ContentEntityObject
    • 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 call Attachment.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 class ContentEntityObject
      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.
    • getPermissionLastModifiedDate

      public Optional<Instant> getPermissionLastModifiedDate()
      Retrieve the last modified date for any permission changes in the current space
      Since:
      9.2.5
    • setPermissionLastModifiedDate

      public void setPermissionLastModifiedDate(long lastModifiedDate)
      Set the last modified date to reflect any permission change in the current space
      Since:
      9.2.5