diff --git a/.classpath b/.classpath
index 502bd4a..71e1373 100644
--- a/.classpath
+++ b/.classpath
@@ -1,5 +1,15 @@
+
+
+
+
+
+
+
+
+
+
@@ -13,16 +23,5 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index cd2a88f..021e6ca 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -1,6 +1,7 @@
-
+
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ae81762..c8b0b37 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [v3.0.0-SNAPSHOT] - [2022-05-13]
+
+porting to new IAM
+
## [v2.1.0] - [2022-02-04]
added OfflineObserver for test purpose
diff --git a/pom.xml b/pom.xml
index c70d7fe..b22fd59 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,5 @@
-
4.0.0
@@ -12,7 +13,7 @@
common-smartgears-app
3.0.0-SNAPSHOT
Smartgears Application
-
+
distro
@@ -24,6 +25,18 @@
https://code-repo.d4science.org/gCubeSystem/common-smartgears-app
+
+
+
+ org.gcube.distribution
+ gcube-smartgears-bom
+ 3.0.0-SNAPSHOT
+ pom
+ import
+
+
+
+
@@ -56,8 +69,8 @@
org.gcube.core
common-smartgears
- [3.0.0-SNAPSHOT,4.0.0-SNAPSHOT)
- provided
+
+
diff --git a/src/main/java/org/gcube/smartgears/ContextListener.java b/src/main/java/org/gcube/smartgears/ContextListener.java
index 343f66c..b162b20 100644
--- a/src/main/java/org/gcube/smartgears/ContextListener.java
+++ b/src/main/java/org/gcube/smartgears/ContextListener.java
@@ -4,12 +4,10 @@ import java.net.URL;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
-
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
-import org.gcube.smartgears.Constants;
import org.gcube.smartgears.annotations.ManagedBy;
import org.gcube.smartgears.application.manager.AppManagerObserver;
import org.gcube.smartgears.context.application.ApplicationContext;
@@ -66,7 +64,7 @@ public class ContextListener implements ServletContextListener {
}
if (managers.size()>0){
observer = ApplicationManagerProvider.instance.getObserver();
- observer.setStartingTokens(context.configuration().startTokens());
+ observer.setStartingTokens(context.configuration().authorizedContexts());
observer.setApplicationManagerClasses(managers);
observer.register();
diff --git a/src/main/java/org/gcube/smartgears/ContextProvider.java b/src/main/java/org/gcube/smartgears/ContextProvider.java
index 4398a32..3d0429e 100644
--- a/src/main/java/org/gcube/smartgears/ContextProvider.java
+++ b/src/main/java/org/gcube/smartgears/ContextProvider.java
@@ -3,12 +3,13 @@ package org.gcube.smartgears;
import javax.servlet.ServletContext;
import org.gcube.common.events.Hub;
+import org.gcube.common.resources.gcore.GCoreEndpoint;
import org.gcube.smartgears.configuration.application.ApplicationConfiguration;
import org.gcube.smartgears.context.Properties;
import org.gcube.smartgears.context.application.ApplicationContext;
import org.gcube.smartgears.context.container.ContainerContext;
import org.gcube.smartgears.lifecycle.application.ApplicationLifecycle;
-import org.gcube.smartgears.persistence.Persistence;
+import org.gcube.smartgears.persistence.PersistenceWriter;
/**
* Embedded in an application, makes available its context as a gCube resource.
@@ -56,12 +57,7 @@ public class ContextProvider {
public ApplicationConfiguration configuration() {
return delegate.configuration();
}
-
- @Override
- public T profile(Class type) {
- return delegate.profile(type);
- }
-
+
@Override
public ApplicationLifecycle lifecycle() {
return delegate.lifecycle();
@@ -71,12 +67,7 @@ public class ContextProvider {
public Hub events() {
return delegate.events();
}
-
- @Override
- public Persistence persistence() {
- return delegate.persistence();
- }
-
+
@Override
public ServletContext application() {
return delegate.application();
@@ -96,6 +87,17 @@ public class ContextProvider {
public String id() {
return delegate.id();
}
+
+ @Override
+ public GCoreEndpoint profile() {
+ return delegate.profile();
+ }
+
+ @Override
+ public PersistenceWriter persistence() {
+ // TODO Auto-generated method stub
+ return delegate.persistence();
+ }
}
}
diff --git a/src/main/java/org/gcube/smartgears/application/manager/OnlineObserver.java b/src/main/java/org/gcube/smartgears/application/manager/OnlineObserver.java
index 7463379..999d2a2 100644
--- a/src/main/java/org/gcube/smartgears/application/manager/OnlineObserver.java
+++ b/src/main/java/org/gcube/smartgears/application/manager/OnlineObserver.java
@@ -104,7 +104,7 @@ public class OnlineObserver implements AppManagerObserver{
public synchronized void onStop(ApplicationContext appContext){
- for (String token :appContext.configuration().startTokens()){
+ for (String token :appContext.configuration().authorizedContexts()){
try {
String context = authorizationService().get(token).getContext();
for (Future appManagerEntry: instanciatedManagerPerScope.get(context)){