[ACS-9166] Migrate Saved Searches to preferences API from config file (#10559)

* [ACS-9166] Migrate Saved Searches to preferences API from config file

* [ACS-9166][ci:force] Unit test coverage

* [ACS-9166] Unit test fixes

* [ACS-9166] Remove obsolete comment
This commit is contained in:
MichalKinas
2025-01-20 08:22:02 +01:00
committed by GitHub
parent 4fb0fdd107
commit 184a38a0ef
5 changed files with 171 additions and 130 deletions

View File

@@ -1,7 +1,7 @@
# Saved Searches Service
Manages operations related to saving and retrieving user-defined searches in the Alfresco Process Services (APS) environment.
Manages operations related to saving and retrieving user-defined searches.
## Class members
@@ -14,7 +14,7 @@ Manages operations related to saving and retrieving user-defined searches in the
#### getSavedSearches(): [`Observable`](https://rxjs.dev/api/index/class/Observable)`<SavedSearch[]>`
Fetches the file with list of saved searches either from a locally cached node ID or by querying the APS server. Then it reads the file and maps JSON objects into SavedSearches
Fetches the file with list of saved searches either from a locally cached node ID or by querying the ACS server. Then it reads the file and maps JSON objects into SavedSearches
- **Returns**:
- [`Observable`](https://rxjs.dev/api/index/class/Observable)`<SavedSearch[]>` - An observable that emits the list of saved searches.
@@ -51,14 +51,3 @@ this.savedSearchService.saveSearch(newSearch).subscribe((response) => {
console.log('Saved new search:', response);
});
```
#### Creating Saved Searches Node
When the saved searches file does not exist, it will be created:
```typescript
this.savedSearchService.createSavedSearchesNode('parent-node-id').subscribe((node) => {
console.log('Created config.json node:', node);
});
```