Skip to content
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

[Issue #2446] Don't open new ResourceResolver to resolve clientlib categories #2528

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Jun 11, 2023

  1. Change Utils#getSuperTypes to use `ResourceResolver#getParentResour…

    …ceType(String);
    
    Updates `Utils#getSuperType` to use `resourceResolver.getParentResourceType(superType)`
    instead of `resourceResolver.getResource(superType).getResourceSuperType`.
    
    This change is made because any `ResourceResolver` can always resolve the resource
    super type hierarchy via `ResourceResolver#getParentResourceType(String)`, even if
    `ResrouceResolver#getResource(String)` would be unable to resolve the super type
    resource due to permissions.
    
    After this change, the only requirement for the `ResourceResolver` passed to
    `Utils#getSuperTypes()` is that it be an active `ResourceResolver` - it does
    not need to be a special `ResourceResolver` with any elevated permissions.
    
    ----
    refs issue adobe#2446
    ky940819 committed Jun 11, 2023
    Configuration menu
    Copy the full SHA
    4be3d35 View commit details
    Browse the repository at this point in the history
  2. Add ClientLibrariesLookupService

    Adds a new service `ClientLibrariesLookupService`.
    This service provides a means by which to resolve ClientLibraries
    by resource type.
    
    The service will internally cache `resourceType` -> `ClientLibrary`
    mappings such that future lookups for the same `resourceType` will
    not require costly lookup or service-user sessions.
    
    This service listens to the event topic: `com/adobe/granite/ui/librarymanager/INVALIDATED`.
    When an event matching this topic occurs, then the cache items are cleared.
    
    ----
    refs issue adobe#2446
    ky940819 committed Jun 11, 2023
    Configuration menu
    Copy the full SHA
    230d8f4 View commit details
    Browse the repository at this point in the history
  3. Update ClientLibrariesImpl model to use ClientLibrariesLookupService

    Updates the `ClientLibrariesImpl` model by removing the clientlib lookup
    logic and making use of the `ClientLibrariesLookupService` instead.
    
    ----
    refs issue adobe#2446
    ky940819 committed Jun 11, 2023
    Configuration menu
    Copy the full SHA
    0eb7ccd View commit details
    Browse the repository at this point in the history