Class Space

java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.confluence.core.ConfluenceEntityObject
com.atlassian.confluence.spaces.Space
All Implemented Interfaces:
Searchable, Addressable, ContentTypeAware, Serializable, Cloneable
Direct Known Subclasses:
ReadOnlySpace

public class Space extends ConfluenceEntityObject implements Searchable, Addressable
See Also:
  • Field Details

  • Constructor Details

    • Space

      public Space()
    • Space

      public Space(String spaceKey)
  • Method Details

    • isValidSpaceKey

      public static boolean isValidSpaceKey(String key)
      Is the key a valid space key of any type? Tests validity of both personal and global space keys
    • isValidGlobalSpaceKey

      public static boolean isValidGlobalSpaceKey(String key)
    • isValidPersonalSpaceKey

      public static boolean isValidPersonalSpaceKey(String key)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getKey

      public String getKey()
    • setKey

      public void setKey(String key)
    • getLowerKey

      public String getLowerKey()
    • getSpaceType

      public SpaceType getSpaceType()
    • setSpaceType

      public void setSpaceType(SpaceType spaceType)
    • getDescription

      public SpaceDescription getDescription()
    • setDescription

      public void setDescription(SpaceDescription description)
    • getHomePage

      public Page getHomePage()
    • setHomePage

      public void setHomePage(Page homePage)
    • getPermissions

      public List<SpacePermission> getPermissions()
    • setPermissions

      public void setPermissions(List<SpacePermission> permissions)
    • addPermission

      public void addPermission(SpacePermission permission)
    • removePermission

      public void removePermission(SpacePermission permission)
    • removeAllPermissions

      public void removeAllPermissions()
      Remove all permissions from this Space
      Since:
      5.5
    • getPageTemplates

      public List<PageTemplate> getPageTemplates()
    • addPageTemplate

      public void addPageTemplate(PageTemplate pageTemplate)
    • removePageTemplate

      public void removePageTemplate(PageTemplate pageTemplate)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class com.atlassian.core.bean.EntityObject
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class com.atlassian.core.bean.EntityObject
    • clone

      public Object clone() throws CloneNotSupportedException
      Overrides:
      clone in class com.atlassian.core.bean.EntityObject
      Throws:
      CloneNotSupportedException
    • getSearchableDependants

      public Collection getSearchableDependants()
      only here because the interface needs it like this. When a space gets deleted, all content with a space index matching to the space will be unindexed. Therefore we don't need to retrieve the searchable dependants with this function.
      Specified by:
      getSearchableDependants in interface Searchable
    • isIndexable

      public boolean isIndexable()
      Description copied from interface: Searchable
      Allows an object to tell the search indexer that it is not allowed to be indexed
      Specified by:
      isIndexable in interface Searchable
    • setSpaceManager

      @Deprecated public void setSpaceManager(SpaceManager spaceManager)
      Deprecated.
      since 7.5 remove in 8.0
    • getUrlPath

      public String getUrlPath()
      Specified by:
      getUrlPath in interface Addressable
    • getDeepLinkUri

      public URI getDeepLinkUri()
      This method returns a link directly to the space homepage. It is not safe to persist this link as the space homepage can change. If no space homepage is defined, it falls back to getUrlPath() above.
    • getBrowseUrlPath

      public String getBrowseUrlPath()
    • getAdvancedTabUrlPath

      public String getAdvancedTabUrlPath()
    • getBlogTabUrlPath

      public String getBlogTabUrlPath()
    • getDisplayTitle

      public String getDisplayTitle()
      Specified by:
      getDisplayTitle in interface Addressable
      Returns:
      the title of the addressable object, suitable for display in a list
    • getType

      public String getType()
      Specified by:
      getType in interface ContentTypeAware
      Returns:
      the content type
    • isPersonal

      public boolean isPersonal()
    • isGlobal

      public boolean isGlobal()
    • getSpaceGroup

      @Deprecated public SpaceGroup getSpaceGroup()
      Deprecated.
      in 5.9.

      SpaceGroup and related classes like SpaceGroupManager and SpaceGroupComparator will be removed. Please do not use them.

    • setSpaceGroup

      @Deprecated public void setSpaceGroup(SpaceGroup spaceGroup)
      Deprecated.
      in 5.9.

      SpaceGroup and related classes like SpaceGroupManager and SpaceGroupComparator will be removed. Please do not use them.

    • getSpaceStatus

      public SpaceStatus getSpaceStatus()
    • setSpaceStatus

      public void setSpaceStatus(SpaceStatus spaceStatus)
    • getDefaultHomepageTitle

      public Message getDefaultHomepageTitle()
    • isArchived

      public boolean isArchived()
    • toString

      public String toString()
      Overrides:
      toString in class Object