refs 2521: Explore the possibility to port the StatMan interface onto Dataminer
https://support.d4science.org/issues/2521 Added Folder Download git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@128772 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
109423f1c0
commit
6193c8c1c8
|
@ -16,6 +16,7 @@ import org.gcube.portlets.user.dataminermanager.client.events.UIStateEvent;
|
|||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaElementType;
|
||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ExpiredSessionServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.WorskpaceUploadNotificationListener;
|
||||
|
@ -27,6 +28,7 @@ import org.gcube.portlets.widgets.wsexplorer.shared.FilterCriteria;
|
|||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonScale;
|
||||
|
@ -144,7 +146,8 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
|
||||
private void manageDataMinerWorkAreaEvents(DataMinerWorkAreaEvent event) {
|
||||
|
||||
Log.debug("ComputationsExecutedPanel recieved DataMinerWorkAreaEvent: " + event);
|
||||
Log.debug("ComputationsExecutedPanel recieved DataMinerWorkAreaEvent: "
|
||||
+ event);
|
||||
if (event == null) {
|
||||
Log.error("DataMinerWorkAreaEvent null");
|
||||
return;
|
||||
|
@ -227,7 +230,8 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
|
||||
wsResourcesExplorerPanel = new WorkspaceResourcesExplorerPanel(
|
||||
event.getDataMinerWorkArea().getComputations().getFolder()
|
||||
.getId(), false, showProperties, filterCriteria, true);
|
||||
.getId(), false, showProperties, filterCriteria,
|
||||
true);
|
||||
WorskpaceExplorerSelectNotificationListener wsResourceExplorerListener = new WorskpaceExplorerSelectNotificationListener() {
|
||||
@Override
|
||||
public void onSelectedItem(Item item) {
|
||||
|
@ -462,39 +466,56 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
private void downloadFile() {
|
||||
if (selectedItem != null && !selectedItem.isFolder()) {
|
||||
if (selectedItem != null) {
|
||||
if (selectedItem.isFolder()) {
|
||||
StringBuilder actionUrl = new StringBuilder();
|
||||
actionUrl.append(GWT.getModuleBaseURL());
|
||||
actionUrl
|
||||
.append(Constants.DOWNLOAD_FOLDER_SERVLET
|
||||
+ "?"
|
||||
+ Constants.DOWNLOAD_FOLDER_SERVLET_ITEM_ID_PARAMETER
|
||||
+ "="
|
||||
+ selectedItem.getId()
|
||||
+ "&"
|
||||
+ Constants.DOWNLOAD_FOLDER_SERVLET_FOLDER_NAME_PARAMETER
|
||||
+ "=" + selectedItem.getName());
|
||||
|
||||
final ItemDescription itemDescription = new ItemDescription(
|
||||
selectedItem.getId(), selectedItem.getName(),
|
||||
selectedItem.getOwner(), selectedItem.getPath(),
|
||||
selectedItem.getType().name());
|
||||
Log.debug("Retrieved link: " + actionUrl);
|
||||
Window.open(actionUrl.toString(), selectedItem.getName(), "");
|
||||
|
||||
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(
|
||||
itemDescription, new AsyncCallback<String>() {
|
||||
} else {
|
||||
|
||||
final ItemDescription itemDescription = new ItemDescription(
|
||||
selectedItem.getId(), selectedItem.getName(),
|
||||
selectedItem.getOwner(), selectedItem.getPath(),
|
||||
selectedItem.getType().name());
|
||||
|
||||
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(
|
||||
itemDescription, new AsyncCallback<String>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof ExpiredSessionServiceException) {
|
||||
EventBusProvider.INSTANCE
|
||||
.fireEvent(new SessionExpiredEvent());
|
||||
} else {
|
||||
Log.error("Error open file: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
caught.printStackTrace();
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof ExpiredSessionServiceException) {
|
||||
EventBusProvider.INSTANCE
|
||||
.fireEvent(new SessionExpiredEvent());
|
||||
} else {
|
||||
Log.error("Error open file: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
caught.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String link) {
|
||||
Log.debug("Retrieved link: " + link);
|
||||
Window.open(link, itemDescription.getName(), "");
|
||||
}
|
||||
|
||||
});
|
||||
@Override
|
||||
public void onSuccess(String link) {
|
||||
Log.debug("Retrieved link: " + link);
|
||||
Window.open(link, itemDescription.getName(), "");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
} else {
|
||||
UtilsGXT3.info("Attention", "Select a file!");
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.gcube.portlets.user.dataminermanager.client.events.UIStateEvent;
|
|||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaElementType;
|
||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ExpiredSessionServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.WorskpaceUploadNotificationListener;
|
||||
|
@ -25,6 +26,7 @@ import org.gcube.portlets.widgets.wsexplorer.shared.FilterCriteria;
|
|||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonScale;
|
||||
|
@ -221,7 +223,8 @@ public class InputDataSetsPanel extends FramedPanel {
|
|||
|
||||
wsResourcesExplorerPanel = new WorkspaceResourcesExplorerPanel(
|
||||
event.getDataMinerWorkArea().getInputDataSets().getFolder()
|
||||
.getId(), false, showProperties, filterCriteria, true);
|
||||
.getId(), false, showProperties, filterCriteria,
|
||||
true);
|
||||
WorskpaceExplorerSelectNotificationListener wsResourceExplorerListener = new WorskpaceExplorerSelectNotificationListener() {
|
||||
@Override
|
||||
public void onSelectedItem(Item item) {
|
||||
|
@ -393,39 +396,55 @@ public class InputDataSetsPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
private void downloadFile() {
|
||||
if (selectedItem != null && !selectedItem.isFolder()) {
|
||||
if (selectedItem != null) {
|
||||
if (selectedItem.isFolder()) {
|
||||
StringBuilder actionUrl = new StringBuilder();
|
||||
actionUrl.append(GWT.getModuleBaseURL());
|
||||
actionUrl
|
||||
.append(Constants.DOWNLOAD_FOLDER_SERVLET
|
||||
+ "?"
|
||||
+ Constants.DOWNLOAD_FOLDER_SERVLET_ITEM_ID_PARAMETER
|
||||
+ "="
|
||||
+ selectedItem.getId()
|
||||
+ "&"
|
||||
+ Constants.DOWNLOAD_FOLDER_SERVLET_FOLDER_NAME_PARAMETER
|
||||
+ "=" + selectedItem.getName());
|
||||
|
||||
final ItemDescription itemDescription = new ItemDescription(
|
||||
selectedItem.getId(), selectedItem.getName(),
|
||||
selectedItem.getOwner(), selectedItem.getPath(),
|
||||
selectedItem.getType().name());
|
||||
Log.debug("Retrieved link: " + actionUrl);
|
||||
Window.open(actionUrl.toString(), selectedItem.getName(), "");
|
||||
} else {
|
||||
|
||||
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(
|
||||
itemDescription, new AsyncCallback<String>() {
|
||||
final ItemDescription itemDescription = new ItemDescription(
|
||||
selectedItem.getId(), selectedItem.getName(),
|
||||
selectedItem.getOwner(), selectedItem.getPath(),
|
||||
selectedItem.getType().name());
|
||||
|
||||
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(
|
||||
itemDescription, new AsyncCallback<String>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof ExpiredSessionServiceException) {
|
||||
EventBusProvider.INSTANCE
|
||||
.fireEvent(new SessionExpiredEvent());
|
||||
} else {
|
||||
Log.error("Error open file: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
caught.printStackTrace();
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof ExpiredSessionServiceException) {
|
||||
EventBusProvider.INSTANCE
|
||||
.fireEvent(new SessionExpiredEvent());
|
||||
} else {
|
||||
Log.error("Error open file: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
caught.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String link) {
|
||||
Log.debug("Retrieved link: " + link);
|
||||
Window.open(link, itemDescription.getName(), "");
|
||||
}
|
||||
|
||||
});
|
||||
@Override
|
||||
public void onSuccess(String link) {
|
||||
Log.debug("Retrieved link: " + link);
|
||||
Window.open(link, itemDescription.getName(), "");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
} else {
|
||||
UtilsGXT3.info("Attention", "Select a file!");
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.gcube.portlets.user.dataminermanager.client.events.UIStateEvent;
|
|||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaElementType;
|
||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ExpiredSessionServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.WorskpaceUploadNotificationListener;
|
||||
|
@ -25,6 +26,7 @@ import org.gcube.portlets.widgets.wsexplorer.shared.FilterCriteria;
|
|||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonScale;
|
||||
|
@ -394,38 +396,54 @@ public class OutputDataSetsPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
private void downloadFile() {
|
||||
if (selectedItem != null && !selectedItem.isFolder()) {
|
||||
if (selectedItem != null) {
|
||||
if (selectedItem.isFolder()) {
|
||||
StringBuilder actionUrl = new StringBuilder();
|
||||
actionUrl.append(GWT.getModuleBaseURL());
|
||||
actionUrl
|
||||
.append(Constants.DOWNLOAD_FOLDER_SERVLET
|
||||
+ "?"
|
||||
+ Constants.DOWNLOAD_FOLDER_SERVLET_ITEM_ID_PARAMETER
|
||||
+ "="
|
||||
+ selectedItem.getId()
|
||||
+ "&"
|
||||
+ Constants.DOWNLOAD_FOLDER_SERVLET_FOLDER_NAME_PARAMETER
|
||||
+ "=" + selectedItem.getName());
|
||||
|
||||
final ItemDescription itemDescription = new ItemDescription(
|
||||
selectedItem.getId(), selectedItem.getName(),
|
||||
selectedItem.getOwner(), selectedItem.getPath(),
|
||||
selectedItem.getType().name());
|
||||
Log.debug("Retrieved link: " + actionUrl);
|
||||
Window.open(actionUrl.toString(), selectedItem.getName(), "");
|
||||
} else {
|
||||
final ItemDescription itemDescription = new ItemDescription(
|
||||
selectedItem.getId(), selectedItem.getName(),
|
||||
selectedItem.getOwner(), selectedItem.getPath(),
|
||||
selectedItem.getType().name());
|
||||
|
||||
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(
|
||||
itemDescription, new AsyncCallback<String>() {
|
||||
DataMinerPortletServiceAsync.INSTANCE.getPublicLink(
|
||||
itemDescription, new AsyncCallback<String>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof ExpiredSessionServiceException) {
|
||||
EventBusProvider.INSTANCE
|
||||
.fireEvent(new SessionExpiredEvent());
|
||||
} else {
|
||||
Log.error("Error open file: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
caught.printStackTrace();
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof ExpiredSessionServiceException) {
|
||||
EventBusProvider.INSTANCE
|
||||
.fireEvent(new SessionExpiredEvent());
|
||||
} else {
|
||||
Log.error("Error open file: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
caught.printStackTrace();
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onSuccess(String link) {
|
||||
Log.debug("Retrieved link: " + link);
|
||||
Window.open(link, itemDescription.getName(), "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String link) {
|
||||
Log.debug("Retrieved link: " + link);
|
||||
Window.open(link, itemDescription.getName(), "");
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
UtilsGXT3.info("Attention", "Select a file!");
|
||||
|
|
|
@ -1,67 +1,113 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.gcube.application.framework.core.session.ASLSession;
|
||||
import org.gcube.portlets.user.dataminermanager.server.storage.StorageUtil;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* DownloadFolder Servlet
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
* Download Folder Servlet
|
||||
*
|
||||
*/
|
||||
@WebServlet("/DownloadFolderServlet")
|
||||
public class DownloadFolderServlet extends HttpServlet {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @see HttpServlet#HttpServlet()
|
||||
*/
|
||||
public DownloadFolderServlet() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
private static final long serialVersionUID = -1838255772767180518L;
|
||||
private static Logger logger = LoggerFactory
|
||||
.getLogger(DownloadFolderServlet.class);
|
||||
|
||||
/**
|
||||
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
|
||||
* @see HttpServlet#HttpServlet()
|
||||
*/
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
public DownloadFolderServlet() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
/**
|
||||
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
|
||||
* response)
|
||||
*/
|
||||
protected void doGet(HttpServletRequest request,
|
||||
HttpServletResponse response) throws ServletException, IOException {
|
||||
createResponse(request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
|
||||
* response)
|
||||
*/
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
protected void doPost(HttpServletRequest request,
|
||||
HttpServletResponse response) throws ServletException, IOException {
|
||||
createResponse(request, response);
|
||||
}
|
||||
|
||||
private void createResponse(HttpServletRequest request,
|
||||
HttpServletResponse response) throws ServletException, IOException {
|
||||
try {
|
||||
logger.info("DownloadFolderServlet");
|
||||
|
||||
private void createResponse(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
|
||||
/*try {
|
||||
HttpSession session = request.getSession();
|
||||
|
||||
request.getParameter("c")
|
||||
if (session == null) {
|
||||
logger.error("Error getting the session, no session valid found: "
|
||||
+ session);
|
||||
response.sendError(
|
||||
HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
|
||||
"ERROR-Error getting the user session, no session found "
|
||||
+ session);
|
||||
return;
|
||||
}
|
||||
logger.debug("DownloadFolderServlet session id: " + session.getId());
|
||||
|
||||
File tmpZip = ZipUtil.zipFolder((WorkspaceFolder) item);
|
||||
resp.setHeader( "Content-Disposition", "attachment; filename=\"" + item.getName() + ".zip\"" );
|
||||
resp.setContentType("application/zip");
|
||||
resp = setContentLength(resp, tmpZip.length());
|
||||
OutputStream out = resp.getOutputStream();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
|
||||
String itemId = request.getParameter(Constants.DOWNLOAD_FOLDER_SERVLET_ITEM_ID_PARAMETER);
|
||||
String folderName = request.getParameter(Constants.DOWNLOAD_FOLDER_SERVLET_FOLDER_NAME_PARAMETER);
|
||||
logger.debug("Request: [itemId=" + itemId + ", folderName="
|
||||
+ folderName + "]");
|
||||
|
||||
File tmpZip = StorageUtil.zipFolder(aslSession.getUsername(),
|
||||
itemId);
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\""
|
||||
+ folderName + ".zip\"");
|
||||
response.setContentType("application/zip");
|
||||
response.setHeader("Content-Length",
|
||||
String.valueOf(tmpZip.length()));
|
||||
|
||||
OutputStream out = response.getOutputStream();
|
||||
|
||||
FileInputStream fileTmpZip = new FileInputStream(tmpZip);
|
||||
IOUtils.copy(fileTmpZip, resp.getOutputStream());
|
||||
fileTmpZip.close();
|
||||
|
||||
IOUtils.copy(fileTmpZip, response.getOutputStream());
|
||||
out.flush();
|
||||
out.close();
|
||||
fileTmpZip.close();
|
||||
tmpZip.delete();
|
||||
return;
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("Error during folder compression "+itemId,e);
|
||||
handleError(urlRedirectOnError, req, resp, itemId, HttpServletResponse.SC_INTERNAL_SERVER_ERROR +": Error during folder compression: "+e.getMessage());
|
||||
return;
|
||||
} catch (Throwable e) {
|
||||
logger.error("Error in DownloadFolderServlet: "
|
||||
+ e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw new ServletException("Error:"
|
||||
+ e.getLocalizedMessage(), e);
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -219,10 +219,18 @@ public class StorageUtil {
|
|||
}
|
||||
}
|
||||
|
||||
public File zipFolder(String user, String folderId)
|
||||
/**
|
||||
*
|
||||
* @param user
|
||||
* @param folderId
|
||||
* @return
|
||||
* @throws ServiceException
|
||||
*/
|
||||
public static File zipFolder(String user, String folderId)
|
||||
throws ServiceException {
|
||||
Workspace ws;
|
||||
try {
|
||||
logger.debug("zipFolder: [user="+user+", folderId="+folderId+"]");
|
||||
ws = HomeLibrary.getUserWorkspace(user);
|
||||
|
||||
WorkspaceItem workSpaceItem = ws.getItem(folderId);
|
||||
|
|
|
@ -51,6 +51,11 @@ public class Constants {
|
|||
//public static final String WPSToken = "45943442-74ef-408b-be64-d26b42cf4c08 ";
|
||||
//public static final String WPSUser = "statistical.manager@gmail.com";
|
||||
|
||||
//DownloadFolderServlet
|
||||
public static final String DOWNLOAD_FOLDER_SERVLET= "DownloadFolderServlet";
|
||||
public static final String DOWNLOAD_FOLDER_SERVLET_ITEM_ID_PARAMETER = "itemId";
|
||||
public static final String DOWNLOAD_FOLDER_SERVLET_FOLDER_NAME_PARAMETER = "folderName";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,70 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
|
||||
<servlet>
|
||||
<servlet-name>DataMinerManagerServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.dataminermanager.server.DataMinerManagerServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>jUnitHostImpl</servlet-name>
|
||||
<servlet-class>com.google.gwt.junit.server.JUnitHostImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>DownloadService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.dataminermanager.server.DownloadServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>workspaceExplorer</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.wsexplorer.server.WorkspaceExplorerServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>workspaceUploaderService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.workspaceuploader.server.WorkspaceUploaderServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>workspaceUploadServletStream</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.workspaceuploader.server.WorkspaceUploadServletStream</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>checkServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.sessionchecker.server.SessionCheckerServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>scopeService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.gcubewidgets.server.ScopeServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>DataMinerManagerServlet</servlet-name>
|
||||
<url-pattern>/dataminermanager/dataminerman</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>jUnitHostImpl</servlet-name>
|
||||
<url-pattern>/dataminermanager/junithost/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>DownloadService</servlet-name>
|
||||
<url-pattern>/dataminermanager/DownloadService</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>workspaceExplorer</servlet-name>
|
||||
<url-pattern>/dataminermanager/WorkspaceExplorerService</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>workspaceUploaderService</servlet-name>
|
||||
<url-pattern>/dataminermanager/workspaceUploaderService</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>workspaceUploadServletStream</servlet-name>
|
||||
<url-pattern>/dataminermanager/workspaceUploadServletStream</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>checkServlet</servlet-name>
|
||||
<url-pattern>/dataminermanager/checksession</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>scopeService</servlet-name>
|
||||
<url-pattern>/dataminermanager/scopeService</url-pattern>
|
||||
</servlet-mapping>
|
||||
<welcome-file-list>
|
||||
<welcome-file>DataMinerManager.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
version="3.0">
|
||||
<servlet>
|
||||
<servlet-name>DataMinerManagerServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.dataminermanager.server.DataMinerManagerServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>jUnitHostImpl</servlet-name>
|
||||
<servlet-class>com.google.gwt.junit.server.JUnitHostImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>DownloadService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.dataminermanager.server.DownloadServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>DownloadFolderServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.dataminermanager.server.DownloadFolderServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>workspaceExplorer</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.wsexplorer.server.WorkspaceExplorerServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>workspaceUploaderService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.workspaceuploader.server.WorkspaceUploaderServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>workspaceUploadServletStream</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.workspaceuploader.server.WorkspaceUploadServletStream</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>checkServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.widgets.sessionchecker.server.SessionCheckerServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>scopeService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.gcubewidgets.server.ScopeServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>DataMinerManagerServlet</servlet-name>
|
||||
<url-pattern>/dataminermanager/dataminerman</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>jUnitHostImpl</servlet-name>
|
||||
<url-pattern>/dataminermanager/junithost/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>DownloadService</servlet-name>
|
||||
<url-pattern>/dataminermanager/DownloadService</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>DownloadFolderServlet</servlet-name>
|
||||
<url-pattern>/dataminermanager/DownloadFolderServlet</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>workspaceExplorer</servlet-name>
|
||||
<url-pattern>/dataminermanager/WorkspaceExplorerService</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>workspaceUploaderService</servlet-name>
|
||||
<url-pattern>/dataminermanager/workspaceUploaderService</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>workspaceUploadServletStream</servlet-name>
|
||||
<url-pattern>/dataminermanager/workspaceUploadServletStream</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>checkServlet</servlet-name>
|
||||
<url-pattern>/dataminermanager/checksession</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>scopeService</servlet-name>
|
||||
<url-pattern>/dataminermanager/scopeService</url-pattern>
|
||||
</servlet-mapping>
|
||||
<welcome-file-list>
|
||||
<welcome-file>DataMinerManager.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
</web-app>
|
Loading…
Reference in New Issue