Skip to content

Commit

Permalink
Merge pull request #3846 from chathuranga-jayanath-99/handle-resource…
Browse files Browse the repository at this point in the history
…-key

Handle keys starting with `resources:...` while resolving registry URI
  • Loading branch information
arunans23 authored Dec 20, 2024
2 parents 8cbeb6c + f57c1e0 commit 70920ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,10 @@ private String resolveRegistryURI(String key) {
registryRoot = localRegistry;
resourcePath = key.substring(MicroIntegratorRegistryConstants.LOCAL_REGISTRY_PREFIX.length());

} else if (key.startsWith(MicroIntegratorRegistryConstants.RESOURCES_PREFIX)) {
registryRoot = govRegistry;
resourcePath = MicroIntegratorRegistryConstants.MI_RESOURCES_DIRECTORY_NAME + URL_SEPARATOR +
key.substring(MicroIntegratorRegistryConstants.RESOURCES_PREFIX.length());
} else {
registryRoot = govRegistry;
resourcePath = key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ public class MicroIntegratorRegistryConstants {
public static final String PROTOCOL_HTTPS = "https";
public static final String FILE_PROTOCOL_PREFIX = "file:";


public static final String RESOURCES_PREFIX = "resources:";
public static final String CONFIG_REGISTRY_PREFIX = "conf:";
public static final String GOVERNANCE_REGISTRY_PREFIX = "gov:";
public static final String LOCAL_REGISTRY_PREFIX = "local:";

public static final String MI_RESOURCES_DIRECTORY_NAME = "mi-resources";
public static final String CONFIG_DIRECTORY_NAME = "config";
public static final String GOVERNANCE_DIRECTORY_NAME = "governance";
public static final String LOCAL_DIRECTORY_NAME = "local";
Expand Down

0 comments on commit 70920ac

Please sign in to comment.