-
Notifications
You must be signed in to change notification settings - Fork 277
[MNT-24459] Aspect list get all aspects when not all were fetched by first call #10980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MNT-24459] Aspect list get all aspects when not all were fetched by first call #10980
Conversation
lib/content-services/src/lib/aspect-list/services/aspect-list.service.spec.ts
Outdated
Show resolved
Hide resolved
lib/content-services/src/lib/aspect-list/services/aspect-list.service.spec.ts
Outdated
Show resolved
Hide resolved
lib/content-services/src/lib/aspect-list/services/aspect-list.service.spec.ts
Outdated
Show resolved
Hide resolved
lib/content-services/src/lib/aspect-list/services/aspect-list.service.spec.ts
Outdated
Show resolved
Hide resolved
lib/content-services/src/lib/aspect-list/services/aspect-list.service.spec.ts
Outdated
Show resolved
Hide resolved
lib/content-services/src/lib/aspect-list/services/aspect-list.service.spec.ts
Outdated
Show resolved
Hide resolved
lib/content-services/src/lib/aspect-list/services/aspect-list.service.spec.ts
Outdated
Show resolved
Hide resolved
lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts
Outdated
Show resolved
Hide resolved
lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts
Outdated
Show resolved
Hide resolved
|
|
||
| getCustomAspects(whiteList?: string[]): Observable<AspectEntry[]> { | ||
| getCustomAspects(whiteList?: string[], paginationOptions?: ContentPagingQuery): Observable<AspectPaging> { | ||
| const where = `(not namespaceUri matches('http://www.alfresco.*'))`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That function almost completely duplicates previous function. Can we avoid duplications? Basically everything except 'where' seems the same. We can move everything except where to reusable private function OR we can pass where as parameter and then we will have only one function.
Maybe second option has more sense because do we really need 2 separate functions just to separate custom and standards aspects if both load the same (aspects)? So we can specify just by parameter which aspects should be loaded. In that case I think we may need to introduce one more type for Where to avoid creating that complicated string on consumer side - consumer can just specify fields in that Where parameter and then 'where' string can be built inside function based on these parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored, it should look better now
|



Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behaviour? (You can also link to an open issue here)
https://hyland.atlassian.net/browse/MNT-24459
What is the new behaviour?
Now when there are still more aspects to be loaded, they will be fetched until all are loaded as user should have the access to all visible aspects.
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: