add Costants to Storage ServiceEndpoint coordinates

This commit is contained in:
Roberto Cirillo 2021-09-03 15:34:21 +02:00
parent 81a3481faa
commit 496e4d05f4
2 changed files with 3 additions and 3 deletions

View File

@ -51,8 +51,8 @@ public class Configuration {
private static final String HL_CONTEXT = "/d4science.research-infrastructures.eu";
private static final String HL_CONTEXT_DEV = "/gcube";
private static final String HL_CONTEXT_PRE = "/pred4s";
protected static final String STORAGE_SERVICEENDPOINT_NAME="StorageManager";
protected static final String STORAGE_SERVICEENDPOINT_CATEGORY="Storage";
/**
* Loads all the configuration parameters in a java object
* @param sc: service class of the remote resource

View File

@ -63,7 +63,7 @@ public class ISClientConnector {
ScopeProvider.instance.set(scope);
}
SimpleQuery query = queryFor(ServiceEndpoint.class);
query.addCondition("$resource/Profile/Category/text() eq 'Storage' and $resource/Profile/Name eq 'StorageManager' ");
query.addCondition("$resource/Profile/Category/text() eq '"+Configuration.STORAGE_SERVICEENDPOINT_CATEGORY+"' and $resource/Profile/Name eq '"+Configuration.STORAGE_SERVICEENDPOINT_NAME+"' ");
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
List<ServiceEndpoint> resources = client.submit(query);
if(scope!=null){