From ac4486f7e20b1c73111873d48f8ad875e5f3446f Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 1 Apr 2020 17:55:46 +0200 Subject: [PATCH] ref 18964: Create a Generic Resource to record Dismissed VREs https://support.d4science.org/issues/18964 Create a library to support the resource access --- .../detachedreslibrary/server/DetachedREsClient.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/infrastructure/detachedres/detachedreslibrary/server/DetachedREsClient.java b/src/main/java/org/gcube/infrastructure/detachedres/detachedreslibrary/server/DetachedREsClient.java index d05795e..83c50ed 100644 --- a/src/main/java/org/gcube/infrastructure/detachedres/detachedreslibrary/server/DetachedREsClient.java +++ b/src/main/java/org/gcube/infrastructure/detachedres/detachedreslibrary/server/DetachedREsClient.java @@ -36,10 +36,19 @@ public class DetachedREsClient { public DetachedREs getDetachedREs() throws Exception { retrieveAuthInfo(); + logger.debug("Use: [userName={}, scope={}, token={}]",userName,scope,token); return DetachedREsBuilder.build(scope); } + public DetachedREs getDetachedREsInScope(String scope) throws Exception { + retrieveAuthInfo(); + this.scope=scope; + logger.debug("Use: [userName={}, scope={}, token={}]",userName,scope,token); + return DetachedREsBuilder.build(scope); + + } + private void retrieveAuthInfo() throws Exception { if (Constants.DEBUG_MODE) { logger.debug("Debug Mode"); @@ -66,8 +75,7 @@ public class DetachedREsClient { } - logger.debug("Use: [userName={}, scope={}, token={}]",userName,scope,token); - + } }