refs 6548: TDM - Migrate TabMan to new PortalContext

Task-Url: https://support.d4science.org/issues/6548

Updated to new PortalContext

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@141738 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2017-01-24 14:42:41 +00:00
parent 3b56c696ab
commit 21739bac2c
2 changed files with 43 additions and 33 deletions

View File

@ -88,8 +88,6 @@ public class CodelistMappingUploadServlet extends HttpServlet {
throw new ServletException(e.getLocalizedMessage());
}
CodelistMappingFileUploadSession codelistMappingFileUploadSession = new CodelistMappingFileUploadSession();
// CodelistMappingMonitor codelistMappingMonitor=new
// CodelistMappingMonitor();
@ -101,11 +99,12 @@ public class CodelistMappingUploadServlet extends HttpServlet {
codelistMappingFileUploadSession
.setFileUploadState(FileUploadState.STARTED);
// codelistMappingFileUploadSession.setCodelistMappingMonitor(codelistMappingMonitor);
SessionUtil.setFileUploadMonitor(request, serviceCredentials, fileUploadMonitor);
SessionUtil.setFileUploadMonitor(request, serviceCredentials,
fileUploadMonitor);
try {
SessionUtil.setCodelistMappingFileUploadSession(request, serviceCredentials,
codelistMappingFileUploadSession);
SessionUtil.setCodelistMappingFileUploadSession(request,
serviceCredentials, codelistMappingFileUploadSession);
} catch (Exception e) {
logger.error(e.getLocalizedMessage(), e);
throw new ServletException(e.getLocalizedMessage());
@ -133,7 +132,8 @@ public class CodelistMappingUploadServlet extends HttpServlet {
} catch (FileUploadException e) {
FileUploadMonitor fum = null;
try {
fum = SessionUtil.getFileUploadMonitor(request, serviceCredentials);
fum = SessionUtil.getFileUploadMonitor(request,
serviceCredentials);
} catch (TDGWTServiceException e1) {
logger.error(e1.getLocalizedMessage(), e1);
throw new ServletException(e1.getLocalizedMessage());
@ -144,8 +144,8 @@ public class CodelistMappingUploadServlet extends HttpServlet {
codelistMappingFileUploadSession
.setFileUploadState(FileUploadState.FAILED);
try {
SessionUtil.setCodelistMappingFileUploadSession(request, serviceCredentials,
codelistMappingFileUploadSession);
SessionUtil.setCodelistMappingFileUploadSession(request,
serviceCredentials, codelistMappingFileUploadSession);
} catch (Exception e1) {
logger.error(e1.getLocalizedMessage(), e1);
throw new ServletException(e1.getLocalizedMessage());
@ -159,7 +159,8 @@ public class CodelistMappingUploadServlet extends HttpServlet {
if (uploadItem == null) {
FileUploadMonitor fum = null;
try {
fum = SessionUtil.getFileUploadMonitor(request, serviceCredentials);
fum = SessionUtil.getFileUploadMonitor(request,
serviceCredentials);
} catch (TDGWTServiceException e1) {
logger.error(e1.getLocalizedMessage(), e1);
throw new ServletException(e1.getLocalizedMessage());
@ -172,8 +173,8 @@ public class CodelistMappingUploadServlet extends HttpServlet {
codelistMappingFileUploadSession
.setFileUploadState(FileUploadState.FAILED);
try {
SessionUtil.setCodelistMappingFileUploadSession(request, serviceCredentials,
codelistMappingFileUploadSession);
SessionUtil.setCodelistMappingFileUploadSession(request,
serviceCredentials, codelistMappingFileUploadSession);
} catch (Exception e) {
logger.error(e.getLocalizedMessage(), e);
throw new ServletException(e.getLocalizedMessage());
@ -196,7 +197,8 @@ public class CodelistMappingUploadServlet extends HttpServlet {
} catch (Exception e) {
FileUploadMonitor fum = null;
try {
fum = SessionUtil.getFileUploadMonitor(request, serviceCredentials);
fum = SessionUtil.getFileUploadMonitor(request,
serviceCredentials);
} catch (TDGWTServiceException e1) {
logger.error(e1.getLocalizedMessage(), e1);
throw new ServletException(e1.getLocalizedMessage());
@ -208,8 +210,8 @@ public class CodelistMappingUploadServlet extends HttpServlet {
codelistMappingFileUploadSession
.setFileUploadState(FileUploadState.FAILED);
try {
SessionUtil.setCodelistMappingFileUploadSession(request, serviceCredentials,
codelistMappingFileUploadSession);
SessionUtil.setCodelistMappingFileUploadSession(request,
serviceCredentials, codelistMappingFileUploadSession);
} catch (Exception e1) {
logger.error(e1.getLocalizedMessage(), e1);
throw new ServletException(e1.getLocalizedMessage());
@ -234,8 +236,8 @@ public class CodelistMappingUploadServlet extends HttpServlet {
SessionUtil.setFileUploadMonitor(request, serviceCredentials, fum);
try {
SessionUtil.setCodelistMappingFileUploadSession(request, serviceCredentials,
codelistMappingFileUploadSession);
SessionUtil.setCodelistMappingFileUploadSession(request,
serviceCredentials, codelistMappingFileUploadSession);
} catch (Exception e) {
logger.error(e.getLocalizedMessage(), e);
throw new ServletException(e.getLocalizedMessage());

View File

@ -143,4 +143,12 @@ public class Constants {
public static final String CODELIST_MAPPING_UPLOAD_SERVLET = "CodelistMappingUploadServlet";
public static final String LOCAL_UPLOAD_SERVLET = "LocalUploadServlet";
public static final String CSV_IMPORT_FILE_SERVLET = "CSVImportFileServlet";
public static final String RETRIEVE_CHART_FILE_SERVLET = "RetrieveChartFileServlet";
public static final String RETRIEVE_FILE_AND_DISCOVER_MIME_TYPE_SERVLET = "RetrieveFileAndDiscoverMimeTypeServlet";
public static final String TD_RSTUDIO_SERVLET = "TDRStudioServlet";
public static final String TD_LOGS_SERVLET = "TDLogsServlet";
}