|
|
|
@ -5,10 +5,10 @@ import java.util.Collections;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
|
|
import org.apache.log4j.Logger;
|
|
|
|
|
import org.gcube.application.framework.core.session.ASLSession;
|
|
|
|
|
import org.gcube.common.core.scope.GCUBEScope;
|
|
|
|
|
import org.gcube.common.core.utils.logging.GCUBEClientLog;
|
|
|
|
|
import org.gcube.common.core.utils.logging.GCUBELog;
|
|
|
|
|
import org.gcube.portlets.user.homelibrary.home.exceptions.HomeNotFoundException;
|
|
|
|
|
import org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException;
|
|
|
|
|
import org.gcube.portlets.user.homelibrary.home.workspace.Workspace;
|
|
|
|
@ -61,7 +61,9 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|
|
|
|
public static final String LAST_OPEN_FOLDER_ATTRIBUTE = "WORKSPACE.LAST_OPEN_FOLDER";
|
|
|
|
|
public static final String SELECTION_STATE_ATTRIBUTE = "WORKSPACE.SELECTION_STATE";
|
|
|
|
|
|
|
|
|
|
protected GCUBELog workspaceLogger = new GCUBELog(GWTWorkspaceServiceImpl.class);
|
|
|
|
|
// protected GCUBELog workspaceLogger = new GCUBELog(GWTWorkspaceServiceImpl.class);
|
|
|
|
|
|
|
|
|
|
protected Logger workspaceLogger = Logger.getLogger(GWTWorkspaceServiceImpl.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected GWTWorkspaceBuilder getGWTWorkspaceBuilder()
|
|
|
|
@ -985,8 +987,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|
|
|
|
|
|
|
|
|
Workspace workspace = getWorkspace();
|
|
|
|
|
|
|
|
|
|
GCUBEClientLog logger = new GCUBEClientLog(GWTWorkspaceServiceImpl.class);
|
|
|
|
|
logger.trace("get all contacts");
|
|
|
|
|
workspaceLogger.trace("get all contacts");
|
|
|
|
|
|
|
|
|
|
// WorkspaceItem parent = workspace.getItem(parentFileModel.getIdentifier()); //get item from workspace
|
|
|
|
|
// workspace.getAllScope();
|
|
|
|
@ -995,14 +996,14 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|
|
|
|
|
|
|
|
|
if(isTestMode()){
|
|
|
|
|
|
|
|
|
|
logger.warn("WORKSPACE PORTLET IS IN TEST MODE - RETURN TEST USERS");
|
|
|
|
|
workspaceLogger.warn("WORKSPACE PORTLET IS IN TEST MODE - RETURN TEST USERS");
|
|
|
|
|
List<InfoContactModel> listContactsModel = new ArrayList<InfoContactModel>();
|
|
|
|
|
// //TEST USERS
|
|
|
|
|
listContactsModel.add(new InfoContactModel("federico.defaveri", "federico.defaveri", "Federico de Faveri"));
|
|
|
|
|
listContactsModel.add(new InfoContactModel("antonio.gioia", "antonio.gioia", "Antonio Gioia"));
|
|
|
|
|
listContactsModel.add(new InfoContactModel("fabio.sinibaldi", "fabio.sinibaldi", "Fabio Sinibaldi"));
|
|
|
|
|
listContactsModel.add(new InfoContactModel("pasquale.pagano", "pasquale.pagano", "Pasquale Pagano"));
|
|
|
|
|
listContactsModel.add(new InfoContactModel(Util.TEST_USER, Util.TEST_USER, Util.TEST_USER));
|
|
|
|
|
listContactsModel.add(new InfoContactModel(Util.TEST_USER, Util.TEST_USER, Util.TEST_USER_FULL_NAME));
|
|
|
|
|
listContactsModel.add(new InfoContactModel("francesco.mangiacrapa", "francesco.mangiacrapa", "Francesco Mangiacrapa"));
|
|
|
|
|
listContactsModel.add(new InfoContactModel("massimiliano.assante", "massimiliano.assante", "Massimiliano Assante"));
|
|
|
|
|
return listContactsModel;
|
|
|
|
@ -1573,6 +1574,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|
|
|
|
public List<InfoContactModel> getListUserSharedByFolderSharedId(String folderSharedId) throws Exception{
|
|
|
|
|
|
|
|
|
|
workspaceLogger.trace("getListUserSharedByFolderSharedId "+ folderSharedId);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
Workspace workspace = getWorkspace();
|
|
|
|
|
|
|
|
|
@ -1585,8 +1587,11 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|
|
|
|
GWTWorkspaceBuilder builder = getGWTWorkspaceBuilder();
|
|
|
|
|
|
|
|
|
|
List<String> listPortalLogin = wsFolder.getUsers();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
workspaceLogger.trace("getListUserSharedByFolderSharedId return "+ listPortalLogin.size() + " user");
|
|
|
|
|
|
|
|
|
|
if(isTestMode())
|
|
|
|
|
return builder.buildGxtInfoContactFromPortalLoginTestMode(listPortalLogin);
|
|
|
|
|
|
|
|
|
|
return builder.buildGxtInfoContactFromPortalLogin(listPortalLogin);
|
|
|
|
|
|
|
|
|
|