Class SpacesQuery

java.lang.Object
com.atlassian.confluence.spaces.SpacesQuery

public class SpacesQuery extends Object
An attempt to remove some of the proliferation of almost-identical space listing queries from Space.hbm.xml.

Dynamically builds a hibernate query which saves us from defining a query for every combination and permutation of input.

  • Method Details

    • newQuery

      public static SpacesQuery.Builder newQuery()
    • getSpaceType

      public SpaceType getSpaceType()
    • getPermissionType

      public String getPermissionType()
    • getUser

      public com.atlassian.user.User getUser()
    • getUserGroups

      @Deprecated public List<String> getUserGroups()
      Deprecated.
      since 5.9, no replacement. Permissions are checked based on all groups the user is a member of (if a user is specified), which is determined in the implementation, so this is effectively ignored (and has been for a long time).
      Returns:
      an empty list
    • 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.

    • getSpaceKeys

      public List<String> getSpaceKeys()
    • getSortBy

      public List<String> getSortBy()
    • getCreationDate

      public Date getCreationDate()
    • getSpaceStatuses

      public Set<SpaceStatus> getSpaceStatuses()
    • getLabels

      public List<Label> getLabels()
    • getFavourite

      public Optional<Boolean> getFavourite()
    • getHasRetentionPolicy

      public Optional<Boolean> getHasRetentionPolicy()
    • getSpaceIds

      public Set<Long> getSpaceIds()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object