class WsUtil deleted
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet@99990 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c23955c7b1
commit
1278e1d456
|
@ -1,128 +0,0 @@
|
|||
//package org.gcube.portlets.user.databasesmanager.server.util;
|
||||
//
|
||||
//import javax.servlet.http.HttpSession;
|
||||
//
|
||||
//import org.apache.log4j.Logger;
|
||||
//import org.gcube.application.framework.core.session.ASLSession;
|
||||
//import org.gcube.application.framework.core.session.SessionManager;
|
||||
////import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager;
|
||||
////import org.gcube.applicationsupportlayer.social.NotificationsManager;
|
||||
////import org.gcube.common.homelibrary.home.HomeLibrary;
|
||||
////import org.gcube.common.homelibrary.home.exceptions.HomeNotFoundException;
|
||||
////import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
|
||||
////import org.gcube.common.homelibrary.home.workspace.Workspace;
|
||||
////import org.gcube.common.homelibrary.home.workspace.exceptions.WorkspaceFolderNotFoundException;
|
||||
//import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||
////import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
////import org.gcube.portlets.user.workspace.server.GWTWorkspaceBuilder;
|
||||
////import org.gcube.portlets.user.workspace.server.notifications.NotificationsProducer;
|
||||
////import org.gcube.portlets.user.workspace.server.resolver.UriResolverReaderParameter;
|
||||
////import org.gcube.portlets.user.workspace.server.shortener.UrlShortener;
|
||||
////import org.gcube.portlets.user.workspace.server.util.resource.PropertySpecialFolderReader;
|
||||
////import org.gcube.portlets.user.workspace.server.util.scope.ScopeUtilFilter;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// *
|
||||
// * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
// * @Feb 18, 2014
|
||||
// *
|
||||
// */
|
||||
//public class WsUtil {
|
||||
//
|
||||
// public static final String USERNAME_ATTRIBUTE = ScopeHelper.USERNAME_ATTRIBUTE;
|
||||
//// public static final String FOLDERIMPORTER_ATTRIBUTE = "FOLDER_IMPORTER";
|
||||
//// public static final String METADATACONVERTER_ATTRIBUTE = "METADATA_CONVERTER";
|
||||
//// public static final String WORKSPACE_EVENT_COLLECTOR_ATTRIBUTE = "EVENT_COLLECTOR";
|
||||
//// public static final String WORKSPACEBUILDER_ATTRIBUTE = "WORKSPACEBUILDER";
|
||||
//// public static final String NOTIFICATION_MANAGER = "NOTIFICATION_MANAGER";
|
||||
//// public static final String NOTIFICATION_PRODUCER = "NOTIFICATION_PRODUCER";
|
||||
//// public static final String WS_RUN_IN_TEST_MODE = "WS_RUN_IN_TEST_MODE";
|
||||
//// public static final String WORKSPACE_SCOPE_UTIL = "WORKSPACE_SCOPE_UTIL";
|
||||
//// public static final String URL_SHORTENER_SERVICE = "URL_SHORTENER_SERVICE";
|
||||
//// public static final String URI_RESOLVER_SERVICE = "URI_RESOLVER_SERVICE";
|
||||
//// public static final String PROPERTY_SPECIAL_FOLDER = "PROPERTY_SPECIAL_FOLDER";
|
||||
//// public static final String NOTIFICATION_PORTLET_CLASS_ID = "org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl"; //IN DEV
|
||||
//
|
||||
//// public static final String TEST_SCOPE = "/gcube/devsec";
|
||||
// public static final String TEST_SCOPE = "/gcube/devsec/devVRE";
|
||||
//
|
||||
//
|
||||
//// public static final String TEST_USER = "pasquale.pagano";
|
||||
//// public static final String TEST_USER = "federico.defaveri";
|
||||
//// public static final String TEST_USER = "massimiliano.assante";
|
||||
//// public static final String TEST_USER = "pasquale.pagano";
|
||||
//// public static final String TEST_USER = "aureliano.gentile";
|
||||
//// public static final String TEST_USER = "antonio.gioia";
|
||||
//
|
||||
// //COMMENT THIS FOR RELEASE
|
||||
//// public static final String TEST_USER = "francesco.mangiacrapa";
|
||||
//// public static final String TEST_USER_FULL_NAME = "Francesco Mangiacrapa";
|
||||
//
|
||||
// //UNCOMMENT THIS FOR RELEASE
|
||||
//// public static final String TEST_USER = "test.user";
|
||||
//// public static final String TEST_USER_FULL_NAME = "Test User";
|
||||
//
|
||||
// public static final String TEST_USER = "dbmanager";
|
||||
// public static final String TEST_USER_FULL_NAME = "dbmanager";
|
||||
//
|
||||
//
|
||||
// protected static Logger logger = Logger.getLogger(WsUtil.class);
|
||||
//
|
||||
// public static boolean withoutPortal = false;
|
||||
//
|
||||
// public static ASLSession getAslSession(HttpSession httpSession)
|
||||
// {
|
||||
// String sessionID = httpSession.getId();
|
||||
// String user = (String) httpSession.getAttribute(USERNAME_ATTRIBUTE);
|
||||
// ASLSession session;
|
||||
//
|
||||
// if (user == null) {
|
||||
//
|
||||
// /*USE ANOTHER ACCOUNT (OTHERWHISE BY TEST_USER) FOR RUNNING
|
||||
// * COMMENT THIS IN DEVELOP ENVIROMENT (UNCOMMENT IN PRODUCTION)*/
|
||||
// user=TEST_USER;
|
||||
//
|
||||
// //UNCOMMENT THIS IN DEVELOP ENVIROMENT
|
||||
//// user = "francesco.mangiacrapa";
|
||||
//// user = "valentina.marioli";
|
||||
//
|
||||
// logger.warn("WORKSPACE PORTLET STARTING IN TEST MODE - NO USER FOUND - PORTLETS STARTING WITH FOLLOWING SETTINGS:");
|
||||
// logger.warn("session id: "+sessionID);
|
||||
// logger.warn("TEST_USER: "+user);
|
||||
// logger.warn("TEST_SCOPE: "+TEST_SCOPE);
|
||||
// logger.warn("USERNAME_ATTRIBUTE: "+USERNAME_ATTRIBUTE);
|
||||
// session = SessionManager.getInstance().getASLSession(sessionID, user);
|
||||
// session.setScope(TEST_SCOPE);
|
||||
//
|
||||
//
|
||||
// //MANDATORY FOR SOCIAL LIBRARY
|
||||
// session.setUserAvatarId(user + "Avatar");
|
||||
// session.setUserFullName(TEST_USER_FULL_NAME);
|
||||
// session.setUserEmailAddress(user + "@mail.test");
|
||||
//
|
||||
// //SET HTTP SESSION ATTRIBUTE
|
||||
// httpSession.setAttribute(USERNAME_ATTRIBUTE, user);
|
||||
//
|
||||
// withoutPortal = true;
|
||||
//
|
||||
// return session;
|
||||
//
|
||||
// }else if(user.compareToIgnoreCase(TEST_USER)==0){
|
||||
//
|
||||
// withoutPortal = true;
|
||||
//
|
||||
////*** COMMENT THIS IN PRODUCTION ENVIROMENT
|
||||
//// }else if(user.compareToIgnoreCase("francesco.mangiacrapa")==0){
|
||||
////
|
||||
//// withoutPortal = true;
|
||||
////*** END UNCOMMENT
|
||||
// }else{
|
||||
//
|
||||
// withoutPortal = false;
|
||||
// }
|
||||
//
|
||||
// return SessionManager.getInstance().getASLSession(sessionID, user);
|
||||
// }
|
||||
//
|
||||
//}
|
Loading…
Reference in New Issue