From 00a2e2efe78a29dc7ab7f47078a26119415aa2ea Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 19 Apr 2023 11:38:01 +0200 Subject: [PATCH] Porting code to redesigned E/R format --- .../resourceregistry/contexts/ContextCreator.java | 4 ++-- .../gcube/informationsystem/resourceregistry/ContextTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ContextCreator.java b/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ContextCreator.java index 14d5d21..d493a15 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ContextCreator.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ContextCreator.java @@ -88,7 +88,7 @@ public class ContextCreator extends ContextElaborator { context.setParent(parentUUID); } context = create(context); - contexts.put(scopeBean.toString(), context.getHeader().getUUID()); + contexts.put(scopeBean.toString(), context.getUUID()); }else { logger.info("Context {} is already present with UUID {}", scopeBean, uuid.toString()); if(oldISResourceUUID==null || uuid.compareTo(oldISResourceUUID)!=0) { @@ -117,7 +117,7 @@ public class ContextCreator extends ContextElaborator { context.setParent(parentUUID); } context = create(context); - contexts.put(scopeBean.toString(), context.getHeader().getUUID()); + contexts.put(scopeBean.toString(), context.getUUID()); }else { logger.info("Context {} is already present with UUID {}", scopeBean, uuid.toString()); } diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/ContextTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/ContextTest.java index d60a223..a3cbd9b 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/ContextTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/ContextTest.java @@ -15,7 +15,7 @@ import org.gcube.common.authorization.utils.secret.SecretUtility; import org.gcube.common.keycloak.KeycloakClientFactory; import org.gcube.common.keycloak.model.TokenResponse; import org.gcube.common.scope.api.ScopeProvider; -import org.gcube.informationsystem.model.reference.properties.Header; +import org.gcube.informationsystem.model.reference.properties.Metadata; import org.junit.AfterClass; import org.junit.BeforeClass; import org.slf4j.Logger; @@ -99,7 +99,7 @@ public class ContextTest { } public static String getUser() { - String user = Header.UNKNOWN_USER; + String user = Metadata.UNKNOWN_USER; try { user = SecretManagerProvider.instance.get().getUser().getUsername(); } catch(Exception e) {