Rena Tsantouli 2009-03-27 10:45:43 +00:00
parent da21bb2d19
commit 59273a62b8
5 changed files with 14 additions and 14 deletions

View File

@ -5,7 +5,7 @@ import java.io.StringReader;
import java.util.List;
import org.gcube.application.framework.core.cache.CachesManager;
import org.gcube.application.framework.core.session.D4ScienceSession;
import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.application.framework.core.util.CacheEntryConstants;
import org.gcube.application.framework.core.util.QueryString;
import org.gcube.application.framework.core.util.SessionConstants;
@ -29,7 +29,7 @@ public class PortalSecurityManager extends GCUBESecurityManagerImpl {
this.scope = scope;
}
public PortalSecurityManager(D4ScienceSession session) {
public PortalSecurityManager(ASLSession session) {
super();
this.scope = session.getScope();
}

View File

@ -2,7 +2,7 @@ package org.gcube.application.framework.core.security;
import java.rmi.Remote;
import org.gcube.application.framework.core.session.D4ScienceSession;
import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.common.core.contexts.GCUBERemotePortTypeContext;
import org.gcube.common.core.scope.GCUBEScope;
import org.gcube.common.core.scope.GCUBEScope.MalformedScopeExpressionException;
@ -11,7 +11,7 @@ import org.ietf.jgss.GSSCredential;
public class ServiceContextManager<PORTTYPE extends Remote> {
public static <PORTTYPE extends Remote> PORTTYPE applySecurity(PORTTYPE stub, D4ScienceSession session) throws MalformedScopeExpressionException, Exception
public static <PORTTYPE extends Remote> PORTTYPE applySecurity(PORTTYPE stub, ASLSession session) throws MalformedScopeExpressionException, Exception
{
GCUBESecurityManager secManager = new PortalSecurityManager(session);
if(secManager.isSecurityEnabled())

View File

@ -16,7 +16,7 @@ import org.gridforum.jgss.ExtendedGSSCredential;
* @author Valia Tsagkalidou (NKUA)
*
*/
public class D4ScienceSession{
public class ASLSession{
/**
*
@ -35,7 +35,7 @@ public class D4ScienceSession{
* @param externalSessionId the external id
* @param user the username
*/
D4ScienceSession(String externalSessionId, String user)
ASLSession(String externalSessionId, String user)
{
innerSession = new HashMap<String, Object>();
notifiers = new HashMap<String, Notifier>();

View File

@ -10,10 +10,10 @@ public class SessionManager {
protected static Thread thread = new CleanSessionThread();
protected static SessionManager sessionManager = new SessionManager();
protected HashMap<String, D4ScienceSession> sessions;
protected HashMap<String, ASLSession> sessions;
protected SessionManager() {
sessions = new HashMap<String, D4ScienceSession>();
sessions = new HashMap<String, ASLSession>();
thread.setDaemon(true);
thread.start();
}
@ -22,12 +22,12 @@ public class SessionManager {
return sessionManager;
}
public D4ScienceSession getD4ScienceSession(String externalSessionID, String username)
public ASLSession getD4ScienceSession(String externalSessionID, String username)
{
D4ScienceSession session = sessions.get(externalSessionID + "_" + username);
ASLSession session = sessions.get(externalSessionID + "_" + username);
if(session == null || !session.isValid() || !session.getUsername().equals(username))
{
session = new D4ScienceSession(externalSessionID, username);
session = new ASLSession(externalSessionID, username);
sessions.put(externalSessionID + "_" + username, session);
}
return session;

View File

@ -19,7 +19,7 @@ import javax.xml.xpath.XPathFactory;
import org.gcube.application.framework.core.cache.CachesManager;
import org.gcube.application.framework.core.security.PortalSecurityManager;
import org.gcube.application.framework.core.session.D4ScienceSession;
import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.application.framework.core.session.SessionManager;
import org.gcube.application.framework.core.util.CacheEntryConstants;
import org.gcube.application.framework.core.util.QueryString;
@ -55,7 +55,7 @@ public class GenericResource implements GenericResourceInfoI{
/**
* The D4Science session to be used
*/
D4ScienceSession session;
ASLSession session;
/**
* Constructs a GenericReosurce object
@ -88,7 +88,7 @@ public class GenericResource implements GenericResourceInfoI{
* Constructs a GenericReosurce object
* @param session the D4Science session to be used for retrieving information needed
*/
public GenericResource(D4ScienceSession session) {
public GenericResource(ASLSession session) {
super();
this.session = session;
try {