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 Summary
Modifier and TypeMethodDescriptionGet the allowance setting for the space contentgetSpaces(PageRequest request) Get list of all spaces to be used during the allowlist set up.booleanisExcluded(String spaceKey) Check if the content that belongs to the given space should be excluded during the synchronisationvoidresetFiltering(String source) Re-sets and disables filtering of the content for the sync.voidsetFilteringSettings(Collection<String> spaceKeys, boolean allowNewSpaces, String source) Set space filtering rules.voidsetFilteringSettingsByIds(Collection<Long> spaceIds, boolean allowNewSpaces, String source) Set space filtering rules.
-
Method Details
-
isExcluded
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:
trueif the space is blocked for synchronisation,falseotherwise.
-
setFilteringSettings
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 allowlistallowNewSpaces- defines behaviour for the new spaces:trueif the new spaces have to be added to the allowlist on space creation,falseotherwisesource- 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, theIdsNotFoundExceptionis thrown.- Parameters:
spaceIds- set of space ids in the allowlistallowNewSpaces- defines behaviour for the new spaces:trueif the new spaces have to be added to the allowlist on space creation,falseotherwisesource- identifier source of changes (f.e. client id)- Throws:
IdsNotFoundException
-
resetFiltering
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
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
-