Yury Bondarenko
abc9bbeae3
Revert "93803: Update DataService constructor signatures"
...
This reverts commit a6fb4a6303
.
2022-09-12 12:29:04 +02:00
Yura Bondarenko
a6fb4a6303
93803: Update DataService constructor signatures
...
Override linkPath/responseMsToLive/constructIdEndpoint
- in class body for inheritable classes (for clarity: it's the first thing you'd read, variable name is right there)
- in constructor for composable classes
* wrapped services must be 'synchronized' with their wrapper
* moved these overrides up in the argument list for emphasis (implementing a new composable feature? first thing is to use the same endpoint!)
2022-09-05 12:30:41 +02:00
Yura Bondarenko
38203490c7
93803: Add missing docstrings
2022-09-05 11:37:57 +02:00
Yura Bondarenko
ee26084d6a
Fix unused imports
2022-08-25 15:53:13 +02:00
Yura Bondarenko
fbaab69121
93803: Ensure data services are called *DataService
2022-08-25 10:28:45 +02:00
Yura Bondarenko
05b131edb9
93803: Rename findAllByHref to findListByHref
...
To avoid confusion with FindAllData:
- findAll is a "feature" to retrieve all resources from the endpoint itself ~ a plain GET
- findAllByHref is retrieves lists of resources in general
2022-08-25 10:28:45 +02:00
Yura Bondarenko
ad316f7316
93803: Resolve circular dependency
...
src/app/core/cache/builders/build-decorators.ts > src/app/core/data/base/hal-data-service.interface.ts > src/app/core/data/paginated-list.model.ts
2022-08-25 10:28:44 +02:00
Yura Bondarenko
a76555c518
93803: Stricter typing for dataService decorator & LinkService
...
The initial idea was to type dataService decorator strictly to BaseDataService.
However, HrefOnlyDataService should not expose methods other than findByHref & findAllByHref, but must still work with LinkService.
To address this we introduce HALDataService: an interface with the minimal requirements for a data service to work with HAL links
- dataService decorator can only decorate a class that implements HALDataService
- services retrieved from DATA_SERVICE_FACTORY should therefore work in LinkService
2022-08-24 19:03:19 +02:00
Yura Bondarenko
cd4ed018dd
93803: Remove legacy DataService class
2022-08-24 19:03:19 +02:00
Yura Bondarenko
42a2c3c7e2
93803: Refactor existing data services
2022-08-24 19:03:19 +02:00
Yura Bondarenko
8f4b3b58fb
93803: Make data services composable
...
Data services should extend BaseDataService (or IdentifiableDataService) for low-level functionality and optionally wrap "data service feature" classes for
- create
- findAll
- patch / update
- put
- delete
2022-08-24 19:03:18 +02:00
Yura Bondarenko
517aee0e8c
93011: Make sure invalidateByHref doesn't track cache state
2022-07-11 18:41:53 +02:00
Yura Bondarenko
5013890b35
93011: Add test for invalidateByHref cache state tracking
...
This test is expected to fail and is be fixed in the next commit.
Currently, invalidateByHref calls keep tracking the cache and may cause objects to be invalidated a second time as soon as the cache is updated.
Practical example:
1. DELETE request
→ object is invalidated
2. POST request related to the same object
→ UUID of pending request is added to the object's cache entry
→ gets picked up by the previous invalidateByHref call
→ the request is set to stale even before it's completed
2022-07-11 18:40:41 +02:00
Giuseppe Digilio
b03c73e0c5
Merge remote-tracking branch 'origin/main' into CST-5668
...
# Conflicts:
# src/app/core/core.module.ts
# src/app/core/profile/researcher-profile.service.ts
# src/app/item-page/simple/item-page.component.ts
# src/app/profile-page/profile-page.component.spec.ts
# src/app/profile-page/profile-page.component.ts
# src/app/shared/shared.module.ts
2022-06-09 17:39:43 +02:00
Giuseppe Digilio
ce9e811526
[CST-5307] fix use of wrong param
2022-06-09 09:40:48 +02:00
Giuseppe Digilio
e2abea7373
[CST-5307] Add useCachedVersionIfAvailable and reRequestOnStale param to isAuthorized method
2022-06-08 12:56:57 +02:00
Luca Giamminonni
b0625342b7
Merge remote-tracking branch '4Science-github/main' into CST-5668
2022-06-07 17:27:00 +02:00
Giuseppe Digilio
2622f374b0
Merge remote-tracking branch 'origin/main' into CST-5307
...
# Conflicts:
# src/app/core/data/data.service.ts
2022-05-26 16:37:24 +02:00
Tim Donohue
c834f8a075
Merge pull request #1608 from atmire/w2p-90252_Cache-redesign-part-3_Simplify-the-invalidation-of-cached-objects
...
Cache redesign part 3: simplify the invalidation of cached objects
2022-05-26 08:52:49 -05:00
Giuseppe Digilio
e6f6bc96f3
[CST-5307] use followlink for retrieving profile item on create and find
2022-05-26 15:32:18 +02:00
Luca Giamminonni
733688bd7e
Merge remote-tracking branch '4Science-bitbucket/main' into CST-5668
2022-05-18 13:25:36 +02:00
Giuseppe Digilio
aec7d9f25b
Merge remote-tracking branch 'origin/main' into CST-5307
...
# Conflicts:
# src/app/core/core.module.ts
# src/app/shared/shared.module.ts
2022-05-11 12:09:00 +02:00
Luca Giamminonni
bdad05b36f
Merge branch 'CST-5307' into CST-5668
2022-05-06 16:23:05 +02:00
Luca Giamminonni
d51dcca87c
[CST-5307] Added missing javadocs, removed showClaimItem feature
2022-05-05 17:46:30 +02:00
nibou230
7f1d1ed7de
Fixes for lint and tests
2022-05-05 11:46:00 -04:00
nibou230
e77821eef0
Use the item's HALLink to get the access status
2022-05-05 10:21:55 -04:00
Luca Giamminonni
0d09dbd498
Merge remote-tracking branch '4Science-bitbucket/CST-5668' into CST-5307
2022-04-27 13:33:27 +02:00
Luca Giamminonni
5c0222747e
Merge remote-tracking branch '4Science-bitbucket/main' into CST-5307
2022-04-27 10:11:45 +02:00
Luca Giamminonni
21241571f7
Merge remote-tracking branch '4Science-bitbucket/CST-5307' into CST-5307
2022-04-27 10:04:36 +02:00
Pratik Rajkotiya
1507bbf733
[CST-5307] claim item added.
2022-04-26 21:07:12 +05:30
Yura Bondarenko
f3e2a7a6f1
Fix missing imports (conflict resolution error)
2022-04-22 09:54:12 +02:00
Yura Bondarenko
e7c56dbb12
Remove unused imports
2022-04-22 09:08:15 +02:00
Yura Bondarenko
a041368019
90252: Fix invalidateByHref not emitting
2022-04-22 09:07:10 +02:00
Yura Bondarenko
c628d4320b
90252: Ensure calls come through if no subscribers
2022-04-22 09:07:08 +02:00
Yura Bondarenko
9699491269
90252: Remove old cleanup code
...
& add tests to confirm that DataService.delete is called
2022-04-22 09:04:58 +02:00
Yura Bondarenko
c19d12c5c0
90252: Invalidate requests containing DSO on DataService.delete
...
Keep track of a list of request UUIDs in the object cache (most recent in front)
When deleting a DSO, mark all of these as stale
2022-04-22 09:04:15 +02:00
nibou230
550eb6c7ab
Adapt the service to a LinkedRepository result
2022-04-21 14:08:01 -04:00
nibou230
459da211be
Display the access status badges
2022-04-21 13:59:29 -04:00
lotte
d806f4da95
Merge branch 'main' into Removing-unnecessary-circular-dependencies
2022-04-21 10:36:45 +02:00
Tim Donohue
e314a70957
Merge pull request #1600 from atmire/w2p-90155_fix-menu-issues
...
Fix for menu issues
2022-04-20 12:20:16 -05:00
Jens Vannerum
f49793ec04
90155: Unnused import and comments
2022-04-20 17:35:51 +02:00
lotte
6784ac39f6
Merge branch 'main' into Removing-unnecessary-circular-dependencies
2022-04-20 14:47:55 +02:00
Pratik Rajkotiya
cc08a2829e
[CST-5668] ORCID Authorizations added.
2022-04-13 17:48:26 +05:30
Yura Bondarenko
99c41b9e80
87968: Minor code changes to pass lint
2022-04-08 17:57:16 +02:00
Yura Bondarenko
bb51609af9
87968: Update ESLint disable/enable comments
...
eslint-disable max-classes-per-file only works at the top of the file now
2022-04-08 17:57:16 +02:00
Yura Bondarenko
245977a432
87968: Automatic migration from TSLint to ESLint
...
Via `ng g @angular-eslint/schematics:convert-tslint-to-eslint`
2022-04-08 17:57:16 +02:00
Yura Bondarenko
8e4f1993bf
87968: Automatic upgrade to NgRx 13
2022-04-08 17:57:15 +02:00
Yura Bondarenko
3eb3afcc96
87968: Fix rxjs/internal imports
2022-04-08 17:57:15 +02:00
lotte
6d3ef58ecc
Removed unused imports
2022-04-05 17:27:45 +02:00
lotte
53c67ac878
fixed after merge
2022-04-05 16:35:24 +02:00