Changed the place where scope provider is set

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerCore@71669 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
panagiota.koltsida 2013-03-22 16:08:06 +00:00
parent 61cfde7658
commit 96c06cc0c7
7 changed files with 15 additions and 12 deletions

View File

@ -12,6 +12,11 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>

View File

@ -2,7 +2,6 @@
package org.gcube.application.framework.core.cache.factories; package org.gcube.application.framework.core.cache.factories;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -10,7 +9,6 @@ import org.gcube.application.framework.core.genericresources.model.ISGenericReso
import org.gcube.application.framework.core.util.CacheEntryConstants; import org.gcube.application.framework.core.util.CacheEntryConstants;
import org.gcube.application.framework.core.util.QueryString; import org.gcube.application.framework.core.util.QueryString;
import org.gcube.application.framework.core.util.SessionConstants; import org.gcube.application.framework.core.util.SessionConstants;
import org.gcube.common.core.contexts.GCUBEContext;
import org.gcube.common.core.contexts.GHNContext; import org.gcube.common.core.contexts.GHNContext;
import org.gcube.common.core.informationsystem.client.AtomicCondition; import org.gcube.common.core.informationsystem.client.AtomicCondition;
import org.gcube.common.core.informationsystem.client.ISClient; import org.gcube.common.core.informationsystem.client.ISClient;

View File

@ -8,8 +8,6 @@ import javax.security.auth.login.LoginContext;
import javax.security.auth.login.LoginException; import javax.security.auth.login.LoginException;
import org.gcube.application.framework.core.util.UserCredential; import org.gcube.application.framework.core.util.UserCredential;
import org.gcube.vomanagement.vomsapi.ExtendedVOMSAdmin;
import org.gcube.vomanagement.vomsapi.VOMSAdmin;
import org.gridforum.jgss.ExtendedGSSCredential; import org.gridforum.jgss.ExtendedGSSCredential;
import org.slf4j.Logger; import org.slf4j.Logger;

View File

@ -9,7 +9,6 @@ import org.gcube.application.framework.core.genericresources.model.ISGenericReso
import org.gcube.application.framework.core.session.ASLSession; import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.application.framework.core.util.CacheEntryConstants; import org.gcube.application.framework.core.util.CacheEntryConstants;
import org.gcube.application.framework.core.util.QueryString; import org.gcube.application.framework.core.util.QueryString;
import org.gcube.application.framework.core.util.SessionConstants;
import org.gcube.common.core.scope.GCUBEScope; import org.gcube.common.core.scope.GCUBEScope;
import org.gcube.common.core.security.GCUBESecurityManagerImpl; import org.gcube.common.core.security.GCUBESecurityManagerImpl;
import org.gcube.common.core.utils.logging.GCUBELog; import org.gcube.common.core.utils.logging.GCUBELog;

View File

@ -1,13 +1,10 @@
package org.gcube.application.framework.core.security; package org.gcube.application.framework.core.security;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.File; import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.FileReader; import java.io.FileReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -188,7 +188,7 @@ public class ASLSession{
*/ */
public GCUBEScope getScope() { public GCUBEScope getScope() {
logger.debug("The scope is being returned - username: " + username + " scope: " + scope.getName()); logger.debug("The scope is being returned - username: " + username + " scope: " + scope.getName());
ScopeProvider.instance.set(scope.toString()); // ScopeProvider.instance.set(scope.toString());
return scope; return scope;
} }
@ -197,10 +197,11 @@ public class ASLSession{
*/ */
public String getScopeName() public String getScopeName()
{ {
logger.debug("The scope is name: " + scope); if (scope != null) {
logger.debug("the username is: " + username); logger.debug("Scope --> " + scope);
if (scope != null) logger.debug("Username --> " + username);
return scope.toString(); return scope.toString();
}
else else
return null; return null;
} }

View File

@ -4,6 +4,8 @@ import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Set; import java.util.Set;
import org.gcube.common.scope.api.ScopeProvider;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -34,6 +36,9 @@ public class SessionManager {
session = new ASLSession(externalSessionID, username); session = new ASLSession(externalSessionID, username);
sessions.put(externalSessionID + "_" + username, session); sessions.put(externalSessionID + "_" + username, session);
} }
if (session.getScope()!=null) //covers first helper's invocation
ScopeProvider.instance.set(session.getScopeName());
return session; return session;
} }