Interface SpaceFilteringService

All Known Implementing Classes:
SpaceFilteringServiceImpl

@ExperimentalApi @Internal public interface SpaceFilteringService
Service to manage allowlists of spaces, which are used to exclude content from some particular spaces from synchronisation with the external services. At the moment, this API is meant to be used for internal purposes only. Before version 9.2.8 this class name was SpaceExclusionService
Since:
9.2.7
  • Method Details

    • isExcluded

      boolean isExcluded(String spaceKey)
      Check if the content that belongs to the given space should be excluded during the synchronisation
      Parameters:
      spaceKey - key of the space to be checked
      Returns:
      true if the space is blocked for synchronisation, false otherwise.
    • setFilteringSettings

      void setFilteringSettings(Collection<String> spaceKeys, boolean allowNewSpaces, String source)
      Set space filtering rules. This version of the service supports allowlist of spaces with additional flag to include new spaces in the allowlist. This inclusion may happen either automatically on DC side or by the external call to the service methods (f.e. by the Cloud connector). Adding new space behaviour is controlled via the darkfeature. IMPORTANT: space existence is not validated here, so it is possible to add space keys for the spaces that don't exist in the database
      Parameters:
      spaceKeys - set of space keys in the allowlist
      allowNewSpaces - defines behaviour for the new spaces: true if the new spaces have to be added to the allowlist on space creation, false otherwise
      source - identifier source of changes (f.e. client id)
    • setFilteringSettingsByIds

      void setFilteringSettingsByIds(Collection<Long> spaceIds, boolean allowNewSpaces, String source) throws IdsNotFoundException
      Set space filtering rules. This version of the service supports allowlist of spaces with additional flag to include new spaces in the allowlist. This inclusion may happen either automatically on DC side or by the external call to the service methods (f.e. by the Cloud connector). Adding new space behaviour is controlled via the darkfeature. IMPORTANT: space existence is validated here. If there is no space for the given space id in the database, the IdsNotFoundException is thrown.
      Parameters:
      spaceIds - set of space ids in the allowlist
      allowNewSpaces - defines behaviour for the new spaces: true if the new spaces have to be added to the allowlist on space creation, false otherwise
      source - identifier source of changes (f.e. client id)
      Throws:
      IdsNotFoundException
    • resetFiltering

      void resetFiltering(String source)
      Re-sets and disables filtering of the content for the sync.
      Parameters:
      source - identifier source of changes (f.e. client id)
    • getAllowList

      Optional<InclusionList> getAllowList()
      Get the allowance setting for the space content
      Returns:
      allowance setting for the space content
    • getSpaces

      PageResponse<Space> getSpaces(PageRequest request)
      Get list of all spaces to be used during the allowlist set up. There is not hard limit on total number of spaces returned by this method. Returned list of spaces would be sanitised to contain only space key, space id, space name and space icon
      Parameters:
      request - page request
      Returns:
      response with collection of spaces