add Costants to Storage ServiceEndpoint coordinates

v3.0.0
ROBERTO CIRILLO 3 years ago
parent 81a3481faa
commit 496e4d05f4

@ -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

@ -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){

Loading…
Cancel
Save