Added constraint in query
This commit is contained in:
parent
ea71d5d8e5
commit
c85b66e026
|
@ -21,6 +21,7 @@ import org.gcube.com.fasterxml.jackson.databind.JsonNode;
|
||||||
import org.gcube.com.fasterxml.jackson.databind.ObjectMapper;
|
import org.gcube.com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.gcube.com.fasterxml.jackson.databind.node.ArrayNode;
|
import org.gcube.com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
import org.gcube.com.fasterxml.jackson.databind.node.ObjectNode;
|
import org.gcube.com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
import org.gcube.common.authorization.utils.manager.SecretManager;
|
||||||
import org.gcube.common.resources.gcore.GenericResource;
|
import org.gcube.common.resources.gcore.GenericResource;
|
||||||
import org.gcube.common.resources.gcore.ServiceEndpoint;
|
import org.gcube.common.resources.gcore.ServiceEndpoint;
|
||||||
import org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint;
|
import org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint;
|
||||||
|
@ -165,6 +166,7 @@ public class GCoreISConfigurationProxy {
|
||||||
*/
|
*/
|
||||||
private List<ServiceEndpoint> getServiceEndpoints(String category, String name) {
|
private List<ServiceEndpoint> getServiceEndpoints(String category, String name) {
|
||||||
SimpleQuery query = queryFor(ServiceEndpoint.class);
|
SimpleQuery query = queryFor(ServiceEndpoint.class);
|
||||||
|
query.addCondition("$resource/Scopes/Scope/text() eq '" + SecretManager.instance.get().getContext() + "'");
|
||||||
query.addCondition("$resource/Profile/Category/text() eq '" + category + "'");
|
query.addCondition("$resource/Profile/Category/text() eq '" + category + "'");
|
||||||
query.addCondition("$resource/Profile/Name/text() eq '" + name + "'");
|
query.addCondition("$resource/Profile/Name/text() eq '" + name + "'");
|
||||||
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
|
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
|
||||||
|
|
Loading…
Reference in New Issue