[MGNLRESTCL-54] RestClientRegistry should extend AbstractRegistry Created: 06/May/19  Updated: 16/Jul/19  Resolved: 16/Jul/19

Status: Closed
Project: REST Client
Component/s: None
Affects Version/s: 1.5.3
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Richard Gange Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
duplicate
is duplicated by MGNLRESTCL-31 Refactor REST-Client registry to be a... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

Whenever I am trying to register a restClient I end up with this warning:

2019-05-06 14:12:03,672 WARN  agnolia.ui.framework.availability.IsDefinitionRule: Error evaluating availability for node [/modules/salesforce-rest-connector/restClient/salesforceClient], returning false: null

I believe this happens because IsDefinitionRule checks to see if the configuration has a registered definition in the registry:

    @SuppressWarnings("unchecked")
    private boolean hasDefinitionFor(String nodePath) {
        // We're doing this stuff in a sub-optimal way unless the issue MAGNOLIA-6086 is fixed
        for (Registry registry : registries) {
            Collection<DefinitionProvider> providers = registry.getAllProviders();
            for (DefinitionProvider provider : providers) {
                if (provider.getMetadata().getLocation().equals(nodePath)) {
                    return true;
                }
            }
        }
        return false;
    }

Generated at Mon Feb 12 10:42:45 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.