diff --git a/pom.xml b/pom.xml index df0ae32..90a23e8 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ org.gcube.distribution gcube-bom - 2.1.0 + 3.0.0-SNAPSHOT pom import @@ -49,8 +49,8 @@ gcube-jackson-databind - org.gcube.core - common-scope + org.gcube.common + common-security diff --git a/src/main/java/org/gcube/gcat/api/configuration/CatalogueConfiguration.java b/src/main/java/org/gcube/gcat/api/configuration/CatalogueConfiguration.java index 2e1535d..46d4f40 100644 --- a/src/main/java/org/gcube/gcat/api/configuration/CatalogueConfiguration.java +++ b/src/main/java/org/gcube/gcat/api/configuration/CatalogueConfiguration.java @@ -9,7 +9,7 @@ import org.gcube.com.fasterxml.jackson.annotation.JsonAnySetter; import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore; import org.gcube.com.fasterxml.jackson.annotation.JsonProperty; import org.gcube.com.fasterxml.jackson.annotation.JsonSetter; -import org.gcube.common.scope.impl.ScopeBean; +import org.gcube.common.security.ContextBean; /** * @author Luca Frosini (ISTI - CNR) @@ -35,7 +35,7 @@ public class CatalogueConfiguration { protected String id; protected String context; - protected ScopeBean scopeBean; + protected ContextBean contextBean; protected String defaultOrganization; protected Set supportedOrganizations; @@ -56,12 +56,12 @@ public class CatalogueConfiguration { * Return the CKAN organization name using the current context name */ public static String getOrganizationName(String context) { - ScopeBean scopeBean = new ScopeBean(context); - return getOrganizationName(scopeBean); + ContextBean contextBean = new ContextBean(context); + return getOrganizationName(contextBean); } - public static String getOrganizationName(ScopeBean scopeBean) { - String contextName = scopeBean.name(); + public static String getOrganizationName(ContextBean contextBean) { + String contextName = contextBean.name(); return contextName.toLowerCase().replace(" ", "_"); } @@ -103,12 +103,12 @@ public class CatalogueConfiguration { @JsonSetter private void setContext(String context) { this.context = context; - this.scopeBean = new ScopeBean(context); + this.contextBean = new ContextBean(context); } @JsonIgnore - public ScopeBean getScopeBean() { - return scopeBean; + public ContextBean getContextBean() { + return contextBean; } @JsonProperty(value = DEFAULT_ORGANIZATION_KEY)