Refs #11902: Use new REST interface in Resource Registry Client
Task-Url: https://support.d4science.org/issues/11902 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@169037 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2925ef950a
commit
33ee498c81
|
@ -22,6 +22,7 @@ import org.gcube.informationsystem.resourceregistry.api.rest.AccessPath;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.rest.ContextPath;
|
import org.gcube.informationsystem.resourceregistry.api.rest.ContextPath;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.rest.httputils.HTTPCall.HTTPMETHOD;
|
import org.gcube.informationsystem.resourceregistry.api.rest.httputils.HTTPCall.HTTPMETHOD;
|
||||||
import org.gcube.informationsystem.resourceregistry.context.ContextManagement;
|
import org.gcube.informationsystem.resourceregistry.context.ContextManagement;
|
||||||
|
import org.gcube.informationsystem.resourceregistry.context.ContextUtility;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -78,7 +79,12 @@ public class ContextManager {
|
||||||
logger.info("Requested to read {} with id {} ", Context.NAME, uuid);
|
logger.info("Requested to read {} with id {} ", Context.NAME, uuid);
|
||||||
setCalledMethod(HTTPMETHOD.GET, uuid);
|
setCalledMethod(HTTPMETHOD.GET, uuid);
|
||||||
|
|
||||||
|
|
||||||
ContextManagement contextManagement = new ContextManagement();
|
ContextManagement contextManagement = new ContextManagement();
|
||||||
|
if(uuid.compareTo(AccessPath.CURRENT_CONTEXT)==0){
|
||||||
|
uuid = ContextUtility.getCurrentSecurityContext().getUUID().toString();
|
||||||
|
}
|
||||||
|
|
||||||
contextManagement.setUUID(UUID.fromString(uuid));
|
contextManagement.setUUID(UUID.fromString(uuid));
|
||||||
return contextManagement.read();
|
return contextManagement.read();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue