Skip to content

Commit

Permalink
handle resource key while resolving registry URI
Browse files Browse the repository at this point in the history
  • Loading branch information
chathuranga-jayanath-99 committed Dec 18, 2024
1 parent d66c807 commit f57c1e0
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 f57c1e0

Please sign in to comment.