Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@97609 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
53ffaf35da
commit
cf26fb2986
|
@ -37,7 +37,7 @@ import org.gcube.common.resources.gcore.ServiceEndpoint.Profile;
|
||||||
import org.gcube.common.resources.gcore.utils.Group;
|
import org.gcube.common.resources.gcore.utils.Group;
|
||||||
import org.gcube.data.analysis.tabulardata.commons.utils.AuthorizationProvider;
|
import org.gcube.data.analysis.tabulardata.commons.utils.AuthorizationProvider;
|
||||||
import org.gcube.data.analysis.tabulardata.commons.utils.AuthorizationToken;
|
import org.gcube.data.analysis.tabulardata.commons.utils.AuthorizationToken;
|
||||||
|
|
||||||
import org.gcube.data.analysis.tabulardata.commons.webservice.types.TaskStatus;
|
import org.gcube.data.analysis.tabulardata.commons.webservice.types.TaskStatus;
|
||||||
import org.gcube.data.analysis.tabulardata.commons.webservice.types.TemplateDescription;
|
import org.gcube.data.analysis.tabulardata.commons.webservice.types.TemplateDescription;
|
||||||
import org.gcube.data.analysis.tabulardata.commons.webservice.types.operations.OperationDefinition;
|
import org.gcube.data.analysis.tabulardata.commons.webservice.types.operations.OperationDefinition;
|
||||||
|
@ -272,7 +272,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
} catch (TDGWTSessionExpiredException e) {
|
} catch (TDGWTSessionExpiredException e) {
|
||||||
throw e;
|
throw e;
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error setting TabResource parameter: "
|
"Error setting TabResource parameter: "
|
||||||
|
@ -314,7 +314,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("getCurrentTRID(): " + e.getLocalizedMessage(), e);
|
logger.error("getCurrentTRID(): " + e.getLocalizedMessage(), e);
|
||||||
throw new TDGWTServiceException("Error retrieving TR id: "
|
throw new TDGWTServiceException("Error retrieving TR id: "
|
||||||
|
@ -359,12 +359,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
TabularResource tr = service
|
TabularResource tr = service
|
||||||
.getTabularResource(new TabularResourceId(Long
|
.getTabularResource(new TabularResourceId(Long
|
||||||
.valueOf(currentTR.getTrId().getId())));
|
.valueOf(currentTR.getTrId().getId())));
|
||||||
|
|
||||||
|
|
||||||
currentTR.setDate(sdf.format(tr.getCreationDate().getTime()));
|
currentTR.setDate(sdf.format(tr.getCreationDate().getTime()));
|
||||||
currentTR.setValid(tr.isValid());
|
currentTR.setValid(tr.isValid());
|
||||||
currentTR.setFinalized(tr.isFinalized());
|
currentTR.setFinalized(tr.isFinalized());
|
||||||
Contacts owner=new Contacts("", tr.getOwner(), false);
|
Contacts owner = new Contacts("", tr.getOwner(), false);
|
||||||
currentTR.setOwner(owner);
|
currentTR.setOwner(owner);
|
||||||
SessionUtil.setTabResource(session, currentTR);
|
SessionUtil.setTabResource(session, currentTR);
|
||||||
logger.debug("GetTabResourceInformation() updated information:"
|
logger.debug("GetTabResourceInformation() updated information:"
|
||||||
|
@ -375,7 +374,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error setting TabResource parameter: "
|
"Error setting TabResource parameter: "
|
||||||
|
@ -422,7 +421,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
currentTR.setDate(sdf.format(tr.getCreationDate().getTime()));
|
currentTR.setDate(sdf.format(tr.getCreationDate().getTime()));
|
||||||
currentTR.setValid(tr.isValid());
|
currentTR.setValid(tr.isValid());
|
||||||
currentTR.setFinalized(tr.isFinalized());
|
currentTR.setFinalized(tr.isFinalized());
|
||||||
Contacts owner=new Contacts("", tr.getOwner(), false);
|
Contacts owner = new Contacts("", tr.getOwner(), false);
|
||||||
currentTR.setOwner(owner);
|
currentTR.setOwner(owner);
|
||||||
|
|
||||||
logger.debug("GetTabResourceInformation() updated information:"
|
logger.debug("GetTabResourceInformation() updated information:"
|
||||||
|
@ -433,7 +432,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error setting TabResource parameter: "
|
"Error setting TabResource parameter: "
|
||||||
|
@ -587,7 +586,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error retrieving Columns: " + e.getLocalizedMessage(), e);
|
"Error retrieving Columns: " + e.getLocalizedMessage(), e);
|
||||||
|
@ -704,7 +703,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error retrieving Columns: " + e.getLocalizedMessage(), e);
|
"Error retrieving Columns: " + e.getLocalizedMessage(), e);
|
||||||
|
@ -825,7 +824,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error retrieving Column: " + e.getLocalizedMessage(),
|
logger.error("Error retrieving Column: " + e.getLocalizedMessage(),
|
||||||
e);
|
e);
|
||||||
|
@ -946,7 +945,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error retrieving Column: " + e.getLocalizedMessage(),
|
logger.error("Error retrieving Column: " + e.getLocalizedMessage(),
|
||||||
e);
|
e);
|
||||||
|
@ -1057,7 +1056,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error retrieving Validation Columns: "
|
"Error retrieving Validation Columns: "
|
||||||
|
@ -1230,7 +1229,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error in getLastTable(): " + e.getLocalizedMessage(),
|
logger.error("Error in getLastTable(): " + e.getLocalizedMessage(),
|
||||||
e);
|
e);
|
||||||
|
@ -1402,7 +1401,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error in getTable(): " + e.getLocalizedMessage(), e);
|
logger.error("Error in getTable(): " + e.getLocalizedMessage(), e);
|
||||||
throw new TDGWTServiceException("Error in getTable(): "
|
throw new TDGWTServiceException("Error in getTable(): "
|
||||||
|
@ -1492,9 +1491,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
t.setTrId(trId);
|
t.setTrId(trId);
|
||||||
t.setValid(tr.isValid());
|
t.setValid(tr.isValid());
|
||||||
t.setFinalized(tr.isFinalized());
|
t.setFinalized(tr.isFinalized());
|
||||||
Contacts owner=new Contacts("", tr.getOwner(), false);
|
Contacts owner = new Contacts("", tr.getOwner(), false);
|
||||||
t.setOwner(owner);
|
t.setOwner(owner);
|
||||||
|
|
||||||
if (tr.contains(NameMetadata.class)) {
|
if (tr.contains(NameMetadata.class)) {
|
||||||
NameMetadata nameMeta = tr.getMetadata(NameMetadata.class);
|
NameMetadata nameMeta = tr.getMetadata(NameMetadata.class);
|
||||||
if (nameMeta != null && nameMeta.getValue() != null) {
|
if (nameMeta != null && nameMeta.getValue() != null) {
|
||||||
|
@ -1650,7 +1649,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("Error retrieving Codelist in setCodelistsPagingLoader(): "
|
logger.error("Error retrieving Codelist in setCodelistsPagingLoader(): "
|
||||||
|
@ -1733,7 +1732,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("Error retrieving Codelist in getCodelistsPagingLoader(): "
|
logger.error("Error retrieving Codelist in getCodelistsPagingLoader(): "
|
||||||
|
@ -2023,7 +2022,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("Error retrieving TabularResources: "
|
logger.error("Error retrieving TabularResources: "
|
||||||
|
@ -2080,7 +2079,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("Error retrieving TabularResources: "
|
logger.error("Error retrieving TabularResources: "
|
||||||
|
@ -2128,7 +2127,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error deleting the tabular resource: "
|
"Error deleting the tabular resource: "
|
||||||
|
@ -2175,7 +2174,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error creating new TabularResource: "
|
"Error creating new TabularResource: "
|
||||||
|
@ -2316,7 +2315,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in Client Library Request: "
|
throw new TDGWTServiceException("Error in Client Library Request: "
|
||||||
|
@ -2381,7 +2380,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in Client Library Request: "
|
throw new TDGWTServiceException("Error in Client Library Request: "
|
||||||
|
@ -2491,7 +2490,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
} catch (TDGWTSessionExpiredException e) {
|
} catch (TDGWTSessionExpiredException e) {
|
||||||
throw e;
|
throw e;
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
|
@ -2514,7 +2513,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
} catch (TDGWTSessionExpiredException e) {
|
} catch (TDGWTSessionExpiredException e) {
|
||||||
throw e;
|
throw e;
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error setting SDMXRegistrySource parameter: "
|
"Error setting SDMXRegistrySource parameter: "
|
||||||
|
@ -2560,18 +2559,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
"Error retrieving the session: null");
|
"Error retrieving the session: null");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileUploadMonitor fileUploadMonitor = SessionUtil
|
||||||
|
|
||||||
FileUploadMonitor fileUploadMonitor= SessionUtil
|
|
||||||
.getFileUploadMonitor(session);
|
.getFileUploadMonitor(session);
|
||||||
if (fileUploadMonitor == null) {
|
if (fileUploadMonitor == null) {
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
"Error retrieving the fileUploadMonitor: null");
|
"Error retrieving the fileUploadMonitor: null");
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug("FileUploadMonitor: "+fileUploadMonitor);
|
logger.debug("FileUploadMonitor: " + fileUploadMonitor);
|
||||||
|
|
||||||
return fileUploadMonitor;
|
return fileUploadMonitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2970,9 +2967,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
CSVFileUploadSession fileUploadSession = new CSVFileUploadSession();
|
CSVFileUploadSession fileUploadSession = new CSVFileUploadSession();
|
||||||
CSVImportMonitor csvImportMonitor = new CSVImportMonitor();
|
CSVImportMonitor csvImportMonitor = new CSVImportMonitor();
|
||||||
FileUploadMonitor fileUploadMonitor = new FileUploadMonitor();
|
FileUploadMonitor fileUploadMonitor = new FileUploadMonitor();
|
||||||
|
|
||||||
SessionUtil.setFileUploadMonitor(session, fileUploadMonitor);
|
SessionUtil.setFileUploadMonitor(session, fileUploadMonitor);
|
||||||
|
|
||||||
fileUploadSession.setId(session.getId());
|
fileUploadSession.setId(session.getId());
|
||||||
fileUploadSession.setFileUploadState(FileUploadState.STARTED);
|
fileUploadSession.setFileUploadState(FileUploadState.STARTED);
|
||||||
fileUploadSession.setCsvImportMonitor(csvImportMonitor);
|
fileUploadSession.setCsvImportMonitor(csvImportMonitor);
|
||||||
|
@ -2987,9 +2984,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
FileUtil.setImportFileCSV(fileUploadSession, is, wi.getName(),
|
FileUtil.setImportFileCSV(fileUploadSession, is, wi.getName(),
|
||||||
Constants.FILE_CSV_MIMETYPE);
|
Constants.FILE_CSV_MIMETYPE);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
FileUploadMonitor fum=SessionUtil.getFileUploadMonitor(session);
|
FileUploadMonitor fum = SessionUtil.getFileUploadMonitor(session);
|
||||||
fum.setFailed(
|
fum.setFailed("An error occured elaborating the file",
|
||||||
"An error occured elaborating the file",
|
|
||||||
FileUtil.exceptionDetailMessage(e));
|
FileUtil.exceptionDetailMessage(e));
|
||||||
SessionUtil.setFileUploadMonitor(session, fum);
|
SessionUtil.setFileUploadMonitor(session, fum);
|
||||||
fileUploadSession.setFileUploadState(FileUploadState.FAILED);
|
fileUploadSession.setFileUploadState(FileUploadState.FAILED);
|
||||||
|
@ -3001,9 +2997,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("changing state");
|
logger.trace("changing state");
|
||||||
FileUploadMonitor fum=SessionUtil.getFileUploadMonitor(session);
|
FileUploadMonitor fum = SessionUtil.getFileUploadMonitor(session);
|
||||||
fum.setState(
|
fum.setState(FileUploadState.COMPLETED);
|
||||||
FileUploadState.COMPLETED);
|
|
||||||
SessionUtil.setFileUploadMonitor(session, fum);
|
SessionUtil.setFileUploadMonitor(session, fum);
|
||||||
SessionUtil.setCSVFileUploadSession(session, fileUploadSession);
|
SessionUtil.setCSVFileUploadSession(session, fileUploadSession);
|
||||||
}
|
}
|
||||||
|
@ -3063,12 +3058,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
.getId())));
|
.getId())));
|
||||||
logger.debug("IsTabularResourceValid: " + tr.isValid());
|
logger.debug("IsTabularResourceValid: " + tr.isValid());
|
||||||
return tr.isValid();
|
return tr.isValid();
|
||||||
|
|
||||||
} catch (TDGWTSessionExpiredException e) {
|
} catch (TDGWTSessionExpiredException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Error checking if it is a valid tabular resource: "
|
logger.error("Error checking if it is a valid tabular resource: "
|
||||||
+ e.getLocalizedMessage(), e);
|
+ e.getLocalizedMessage(), e);
|
||||||
|
@ -3106,7 +3101,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error checking if it is a finalized tabular resource: "
|
"Error checking if it is a finalized tabular resource: "
|
||||||
|
@ -3186,7 +3181,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error in getTRMetadata(): " + e.getLocalizedMessage(), e);
|
"Error in getTRMetadata(): " + e.getLocalizedMessage(), e);
|
||||||
|
@ -3243,7 +3238,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error in getTableValidationMetadata(): "
|
"Error in getTableValidationMetadata(): "
|
||||||
|
@ -4235,7 +4230,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||||
ColumnTypeCodeMap.getColumnType(defNewColumn
|
ColumnTypeCodeMap.getColumnType(defNewColumn
|
||||||
.getColumnType()));
|
.getColumnType()));
|
||||||
map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||||
ColumnDataTypeMap.map(defNewColumn.getColumnDataType()));
|
ColumnDataTypeMap.map(defNewColumn.getColumnDataType()));
|
||||||
map.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
map.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||||
new ImmutableLocalizedText(defNewColumn.getLabel()));
|
new ImmutableLocalizedText(defNewColumn.getLabel()));
|
||||||
|
@ -4502,45 +4497,43 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
protected ArrayList<OperationExecution> retrieveOperationExecution(
|
protected ArrayList<OperationExecution> retrieveOperationExecution(
|
||||||
TabularDataService service, SplitColumnSession splitColumnSession)
|
TabularDataService service, SplitColumnSession splitColumnSession)
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
|
||||||
ArrayList<OperationExecution> invocations=new ArrayList<OperationExecution>();
|
ArrayList<OperationExecution> invocations = new ArrayList<OperationExecution>();
|
||||||
|
|
||||||
logger.debug(splitColumnSession.toString());
|
logger.debug(splitColumnSession.toString());
|
||||||
|
|
||||||
OperationDefinition operationDefinition = OperationDefinitionMap.map(
|
OperationDefinition operationDefinition = OperationDefinitionMap.map(
|
||||||
OperationsId.AddColumn.toString(), service);
|
OperationsId.AddColumn.toString(), service);
|
||||||
|
|
||||||
Map<String, Object> map1 = new HashMap<String, Object>();
|
Map<String, Object> map1 = new HashMap<String, Object>();
|
||||||
Map<String, Object> map2 = new HashMap<String, Object>();
|
Map<String, Object> map2 = new HashMap<String, Object>();
|
||||||
|
|
||||||
ArrayList<Expression> expressions=splitColumnSession.getExpressions();
|
ArrayList<Expression> expressions = splitColumnSession.getExpressions();
|
||||||
|
|
||||||
if(expressions==null || expressions.size()<=1){
|
if (expressions == null || expressions.size() <= 1) {
|
||||||
throw new TDGWTServiceException("No valid expressions in splitColumnSession");
|
throw new TDGWTServiceException(
|
||||||
|
"No valid expressions in splitColumnSession");
|
||||||
}
|
}
|
||||||
|
|
||||||
map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, ColumnTypeCodeMap
|
||||||
ColumnTypeCodeMap.getColumnType(splitColumnSession.getFirstSplitColumnType()));
|
.getColumnType(splitColumnSession.getFirstSplitColumnType()));
|
||||||
map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, ColumnDataTypeMap
|
||||||
ColumnDataTypeMap.map(splitColumnSession.getFirstSplitColumnDataType()));
|
.map(splitColumnSession.getFirstSplitColumnDataType()));
|
||||||
map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||||
new ImmutableLocalizedText(splitColumnSession.getLabel1()));
|
new ImmutableLocalizedText(splitColumnSession.getLabel1()));
|
||||||
map1.put(Constants.PARAMETER_ADD_COLUMN_VALUE,
|
map1.put(Constants.PARAMETER_ADD_COLUMN_VALUE, expressions.get(0));
|
||||||
expressions.get(0));
|
invocations.add(new OperationExecution(operationDefinition
|
||||||
invocations.add(new OperationExecution(
|
.getOperationId(), map1));
|
||||||
operationDefinition.getOperationId(), map1));
|
map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, ColumnTypeCodeMap
|
||||||
map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
.getColumnType(splitColumnSession.getSecondSplitColumnType()));
|
||||||
ColumnTypeCodeMap.getColumnType(splitColumnSession.getSecondSplitColumnType()));
|
map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, ColumnDataTypeMap
|
||||||
map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
.map(splitColumnSession.getSecondSplitColumnDataType()));
|
||||||
ColumnDataTypeMap.map(splitColumnSession.getSecondSplitColumnDataType()));
|
|
||||||
map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||||
new ImmutableLocalizedText(splitColumnSession.getLabel2()));
|
new ImmutableLocalizedText(splitColumnSession.getLabel2()));
|
||||||
map2.put(Constants.PARAMETER_ADD_COLUMN_VALUE,
|
map2.put(Constants.PARAMETER_ADD_COLUMN_VALUE, expressions.get(1));
|
||||||
expressions.get(1));
|
invocations.add(new OperationExecution(operationDefinition
|
||||||
invocations.add(new OperationExecution(
|
.getOperationId(), map2));
|
||||||
operationDefinition.getOperationId(), map2));
|
|
||||||
|
|
||||||
|
|
||||||
return invocations;
|
return invocations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4558,30 +4551,28 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
OperationExecution invocation = null;
|
OperationExecution invocation = null;
|
||||||
|
|
||||||
logger.debug(mergeColumnSession.toString());
|
logger.debug(mergeColumnSession.toString());
|
||||||
|
|
||||||
OperationDefinition operationDefinition = OperationDefinitionMap.map(
|
OperationDefinition operationDefinition = OperationDefinitionMap.map(
|
||||||
OperationsId.AddColumn.toString(), service);
|
OperationsId.AddColumn.toString(), service);
|
||||||
|
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
Expression expression = mergeColumnSession.getExpression();
|
||||||
Expression expression =mergeColumnSession.getExpression();
|
if (expression == null) {
|
||||||
if(expression==null){
|
throw new TDGWTServiceException(
|
||||||
throw new TDGWTServiceException("No valid expression in splitColumnSession");
|
"No valid expression in splitColumnSession");
|
||||||
}
|
}
|
||||||
|
|
||||||
map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, ColumnTypeCodeMap
|
||||||
ColumnTypeCodeMap.getColumnType(mergeColumnSession.getMergeColumnType()));
|
.getColumnType(mergeColumnSession.getMergeColumnType()));
|
||||||
map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, ColumnDataTypeMap
|
||||||
ColumnDataTypeMap.map(mergeColumnSession.getMergeColumnDataType()));
|
.map(mergeColumnSession.getMergeColumnDataType()));
|
||||||
map.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
map.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||||
new ImmutableLocalizedText(mergeColumnSession.getLabel()));
|
new ImmutableLocalizedText(mergeColumnSession.getLabel()));
|
||||||
map.put(Constants.PARAMETER_ADD_COLUMN_VALUE,
|
map.put(Constants.PARAMETER_ADD_COLUMN_VALUE, expression);
|
||||||
expression);
|
|
||||||
invocation = new OperationExecution(
|
invocation = new OperationExecution(
|
||||||
operationDefinition.getOperationId(), map);
|
operationDefinition.getOperationId(), map);
|
||||||
|
|
||||||
|
|
||||||
return invocation;
|
return invocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4659,7 +4650,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in ChangeColumnType: "
|
throw new TDGWTServiceException("Error in ChangeColumnType: "
|
||||||
|
@ -4814,7 +4805,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in AddColumn: "
|
throw new TDGWTServiceException("Error in AddColumn: "
|
||||||
|
@ -4966,7 +4957,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in DeleteColumn: "
|
throw new TDGWTServiceException("Error in DeleteColumn: "
|
||||||
|
@ -5120,7 +5111,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error Changing The Column Label: "
|
throw new TDGWTServiceException("Error Changing The Column Label: "
|
||||||
|
@ -5272,7 +5263,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error Changing Table Type: "
|
throw new TDGWTServiceException("Error Changing Table Type: "
|
||||||
|
@ -5498,7 +5489,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error in getColumnsForDimension() retrieving Columns: "
|
"Error in getColumnsForDimension() retrieving Columns: "
|
||||||
|
@ -5542,7 +5533,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error Deleting Rows: "
|
throw new TDGWTServiceException("Error Deleting Rows: "
|
||||||
|
@ -5724,7 +5715,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error Cloning: "
|
throw new TDGWTServiceException("Error Cloning: "
|
||||||
|
@ -5767,7 +5758,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
|
@ -5922,7 +5913,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in getShareInfo: "
|
throw new TDGWTServiceException("Error in getShareInfo: "
|
||||||
|
@ -5954,7 +5945,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
String[] usersArray = users.toArray(new String[0]);
|
String[] usersArray = users.toArray(new String[0]);
|
||||||
logger.debug("Share with Users: " + users);
|
logger.debug("Share with Users: " + users);
|
||||||
service.share(serviceTR, usersArray);
|
service.share(serviceTR, usersArray);
|
||||||
|
|
||||||
} catch (TDGWTSessionExpiredException e) {
|
} catch (TDGWTSessionExpiredException e) {
|
||||||
throw e;
|
throw e;
|
||||||
|
@ -5967,6 +5958,38 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean checkTabularResourceNotFinal(TRId trId)
|
||||||
|
throws TDGWTServiceException {
|
||||||
|
try {
|
||||||
|
|
||||||
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
|
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||||
|
logger.debug("checkTabularResourceNotFinal: " + trId);
|
||||||
|
AuthorizationProvider.instance.set(new AuthorizationToken(
|
||||||
|
aslSession.getUsername()));
|
||||||
|
TabularDataService service = TabularDataServiceFactory.getService();
|
||||||
|
|
||||||
|
TabularResourceId tabularResourceId = new TabularResourceId(
|
||||||
|
new Long(trId.getId()));
|
||||||
|
TabularResource tr = service.getTabularResource(tabularResourceId);
|
||||||
|
|
||||||
|
return tr.isFinalized();
|
||||||
|
|
||||||
|
} catch (TDGWTSessionExpiredException e) {
|
||||||
|
throw e;
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
|
} catch (Throwable e) {
|
||||||
|
logger.debug("Error in checkTabularResourceNotFinal: "
|
||||||
|
+ e.getLocalizedMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
"Error in checkTabularResourceNotFinal: "
|
||||||
|
+ e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
|
@ -6020,7 +6043,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.debug("Error in setTabResourceInformation: "
|
logger.debug("Error in setTabResourceInformation: "
|
||||||
+ e.getLocalizedMessage());
|
+ e.getLocalizedMessage());
|
||||||
|
@ -6060,7 +6083,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.debug("Error in GetOccurencesForBatchReplace: "
|
logger.debug("Error in GetOccurencesForBatchReplace: "
|
||||||
+ e.getLocalizedMessage());
|
+ e.getLocalizedMessage());
|
||||||
|
@ -6122,7 +6145,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.debug("Error in GetTemplates: " + e.getLocalizedMessage());
|
logger.debug("Error in GetTemplates: " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -6162,7 +6185,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.debug("Error StartTemplateApply: " + e.getLocalizedMessage());
|
logger.debug("Error StartTemplateApply: " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -6275,7 +6298,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
|
@ -6361,7 +6384,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
|
@ -6523,7 +6546,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
|
@ -6733,7 +6756,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.debug("getLastOperationInfo(): " + e.getLocalizedMessage());
|
logger.debug("getLastOperationInfo(): " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -6790,7 +6813,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.debug("getLastOperationInfo(): " + e.getLocalizedMessage());
|
logger.debug("getLastOperationInfo(): " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -6853,7 +6876,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.debug("getHistory(): " + e.getLocalizedMessage());
|
logger.debug("getHistory(): " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -6910,7 +6933,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.debug("getHistory(): " + e.getLocalizedMessage());
|
logger.debug("getHistory(): " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -6975,7 +6998,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.debug("discard(): " + e.getLocalizedMessage());
|
logger.debug("discard(): " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -7015,12 +7038,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
logger.debug("Start Task on service: " + trTask.getId());
|
logger.debug("Start Task on service: " + trTask.getId());
|
||||||
SessionUtil.setRollBackSessionTask(session, trTask);
|
SessionUtil.setRollBackSessionTask(session, trTask);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} catch (TDGWTSessionExpiredException e) {
|
} catch (TDGWTSessionExpiredException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.debug("rollBack(): " + e.getLocalizedMessage());
|
logger.debug("rollBack(): " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -7127,7 +7150,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.debug("Error in RollBackSessionMonitor: "
|
logger.debug("Error in RollBackSessionMonitor: "
|
||||||
+ e.getLocalizedMessage());
|
+ e.getLocalizedMessage());
|
||||||
|
@ -7216,7 +7239,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error in getValidationsTasksMetadata(): "
|
"Error in getValidationsTasksMetadata(): "
|
||||||
|
@ -7264,7 +7287,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in operation: "
|
throw new TDGWTServiceException("Error in operation: "
|
||||||
|
@ -7363,7 +7386,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
logger.debug("EditMonitor(): " + editRowMonitor);
|
logger.debug("EditMonitor(): " + editRowMonitor);
|
||||||
return editRowMonitor;
|
return editRowMonitor;
|
||||||
} catch (TDGWTSessionExpiredException e) {
|
} catch (TDGWTSessionExpiredException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.debug("Error in EditRowMonitor: " + e.getLocalizedMessage());
|
logger.debug("Error in EditRowMonitor: " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -7450,13 +7473,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
logger.debug("Resubmit Task on service: TaskId " + trTask.getId());
|
logger.debug("Resubmit Task on service: TaskId " + trTask.getId());
|
||||||
SessionUtil.setTaskResubmitTask(session, trTask);
|
SessionUtil.setTaskResubmitTask(session, trTask);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
} catch (TDGWTSessionExpiredException e) {
|
} catch (TDGWTSessionExpiredException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in resubmit task: "
|
throw new TDGWTServiceException("Error in resubmit task: "
|
||||||
|
@ -7555,9 +7577,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
logger.debug("TaskResubmitMonitor(): " + taskResubmitMonitor);
|
logger.debug("TaskResubmitMonitor(): " + taskResubmitMonitor);
|
||||||
return taskResubmitMonitor;
|
return taskResubmitMonitor;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (TDGWTSessionExpiredException e) {
|
} catch (TDGWTSessionExpiredException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
@ -7606,7 +7626,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in resume task: "
|
throw new TDGWTServiceException("Error in resume task: "
|
||||||
|
@ -7757,7 +7777,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in extract codelist: "
|
throw new TDGWTServiceException("Error in extract codelist: "
|
||||||
|
@ -7868,10 +7888,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
public void startSplitColumn(SplitColumnSession splitColumnSession, HttpSession session)
|
public void startSplitColumn(SplitColumnSession splitColumnSession,
|
||||||
throws TDGWTServiceException {
|
HttpSession session) throws TDGWTServiceException {
|
||||||
try {
|
try {
|
||||||
//HttpSession session = this.getThreadLocalRequest().getSession();
|
// HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
SessionUtil.setSplitColumnSession(session, splitColumnSession);
|
SessionUtil.setSplitColumnSession(session, splitColumnSession);
|
||||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||||
if (splitColumnSession == null) {
|
if (splitColumnSession == null) {
|
||||||
|
@ -7885,8 +7905,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
aslSession.getUsername()));
|
aslSession.getUsername()));
|
||||||
TabularDataService service = TabularDataServiceFactory.getService();
|
TabularDataService service = TabularDataServiceFactory.getService();
|
||||||
|
|
||||||
ArrayList<OperationExecution> invocations = retrieveOperationExecution(service,
|
ArrayList<OperationExecution> invocations = retrieveOperationExecution(
|
||||||
splitColumnSession);
|
service, splitColumnSession);
|
||||||
if (invocations == null) {
|
if (invocations == null) {
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
"Error in invocation: Operation not supported");
|
"Error in invocation: Operation not supported");
|
||||||
|
@ -7905,7 +7925,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in split column: "
|
throw new TDGWTServiceException("Error in split column: "
|
||||||
|
@ -7913,7 +7933,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SplitColumnMonitor getSplitColumnMonitor()
|
public SplitColumnMonitor getSplitColumnMonitor()
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
@ -7962,7 +7982,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
logger.debug("Task Result:" + task.getResult());
|
logger.debug("Task Result:" + task.getResult());
|
||||||
splitColumnMonitor.setProgress(task.getProgress());
|
splitColumnMonitor.setProgress(task.getProgress());
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(splitColumnSession.getColumnData().getTrId().getId());
|
trId.setId(splitColumnSession.getColumnData().getTrId()
|
||||||
|
.getId());
|
||||||
trId = retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
splitColumnMonitor.setTrId(trId);
|
splitColumnMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -7985,7 +8006,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
splitColumnMonitor.setProgress(task.getProgress());
|
splitColumnMonitor.setProgress(task.getProgress());
|
||||||
|
|
||||||
trId = retrieveTabularResourceBasicData(splitColumnSession
|
trId = retrieveTabularResourceBasicData(splitColumnSession
|
||||||
.getColumnData().getTrId());
|
.getColumnData().getTrId());
|
||||||
|
|
||||||
splitColumnMonitor.setTrId(trId);
|
splitColumnMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -8016,10 +8037,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
public void startMergeColumn(MergeColumnSession mergeColumnSession, HttpSession session)
|
public void startMergeColumn(MergeColumnSession mergeColumnSession,
|
||||||
throws TDGWTServiceException {
|
HttpSession session) throws TDGWTServiceException {
|
||||||
try {
|
try {
|
||||||
//HttpSession session = this.getThreadLocalRequest().getSession();
|
// HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
SessionUtil.setMergeColumnSession(session, mergeColumnSession);
|
SessionUtil.setMergeColumnSession(session, mergeColumnSession);
|
||||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||||
if (mergeColumnSession == null) {
|
if (mergeColumnSession == null) {
|
||||||
|
@ -8053,7 +8074,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException(e.getLocalizedMessage());
|
throw new TDGWTServiceException(e.getLocalizedMessage());
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in split column: "
|
throw new TDGWTServiceException("Error in split column: "
|
||||||
|
@ -8061,7 +8082,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MergeColumnMonitor getMergeColumnMonitor()
|
public MergeColumnMonitor getMergeColumnMonitor()
|
||||||
throws TDGWTServiceException {
|
throws TDGWTServiceException {
|
||||||
|
@ -8110,7 +8131,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
logger.debug("Task Result:" + task.getResult());
|
logger.debug("Task Result:" + task.getResult());
|
||||||
mergeColumnMonitor.setProgress(task.getProgress());
|
mergeColumnMonitor.setProgress(task.getProgress());
|
||||||
trId = new TRId();
|
trId = new TRId();
|
||||||
trId.setId(mergeColumnSession.getColumnData().getTrId().getId());
|
trId.setId(mergeColumnSession.getColumnData().getTrId()
|
||||||
|
.getId());
|
||||||
trId = retrieveTabularResourceBasicData(trId);
|
trId = retrieveTabularResourceBasicData(trId);
|
||||||
mergeColumnMonitor.setTrId(trId);
|
mergeColumnMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -8131,8 +8153,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
case STOPPED:
|
case STOPPED:
|
||||||
logger.debug("Task Result:" + task.getResult());
|
logger.debug("Task Result:" + task.getResult());
|
||||||
mergeColumnMonitor.setProgress(task.getProgress());
|
mergeColumnMonitor.setProgress(task.getProgress());
|
||||||
trId = retrieveTabularResourceBasicData(mergeColumnSession.getColumnData()
|
trId = retrieveTabularResourceBasicData(mergeColumnSession
|
||||||
.getTrId());
|
.getColumnData().getTrId());
|
||||||
|
|
||||||
mergeColumnMonitor.setTrId(trId);
|
mergeColumnMonitor.setTrId(trId);
|
||||||
tabResource = SessionUtil.getTabResource(session);
|
tabResource = SessionUtil.getTabResource(session);
|
||||||
|
@ -8234,7 +8256,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
fileUploadSession.setId(session.getId());
|
fileUploadSession.setId(session.getId());
|
||||||
fileUploadSession.setFileUploadState(FileUploadState.STARTED);
|
fileUploadSession.setFileUploadState(FileUploadState.STARTED);
|
||||||
fileUploadSession.setCodelistMappingMonitor(codelistMappingMonitor);
|
fileUploadSession.setCodelistMappingMonitor(codelistMappingMonitor);
|
||||||
|
|
||||||
SessionUtil.setFileUploadMonitor(session, fileUploadMonitor);
|
SessionUtil.setFileUploadMonitor(session, fileUploadMonitor);
|
||||||
SessionUtil.setCodelistMappingFileUploadSession(session,
|
SessionUtil.setCodelistMappingFileUploadSession(session,
|
||||||
fileUploadSession);
|
fileUploadSession);
|
||||||
|
@ -8247,9 +8269,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
FileUtil.setImportFileCodelistMapping(fileUploadSession, is,
|
FileUtil.setImportFileCodelistMapping(fileUploadSession, is,
|
||||||
wi.getName(), Constants.FILE_XML_MIMETYPE);
|
wi.getName(), Constants.FILE_XML_MIMETYPE);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
FileUploadMonitor fum=SessionUtil.getFileUploadMonitor(session);
|
FileUploadMonitor fum = SessionUtil.getFileUploadMonitor(session);
|
||||||
fum.setFailed(
|
fum.setFailed("An error occured elaborating the file",
|
||||||
"An error occured elaborating the file",
|
|
||||||
FileUtil.exceptionDetailMessage(e));
|
FileUtil.exceptionDetailMessage(e));
|
||||||
SessionUtil.setFileUploadMonitor(session, fum);
|
SessionUtil.setFileUploadMonitor(session, fum);
|
||||||
fileUploadSession.setFileUploadState(FileUploadState.FAILED);
|
fileUploadSession.setFileUploadState(FileUploadState.FAILED);
|
||||||
|
@ -8262,11 +8283,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("changing state");
|
logger.trace("changing state");
|
||||||
FileUploadMonitor fum=SessionUtil.getFileUploadMonitor(session);
|
FileUploadMonitor fum = SessionUtil.getFileUploadMonitor(session);
|
||||||
fum.setState(
|
fum.setState(FileUploadState.COMPLETED);
|
||||||
FileUploadState.COMPLETED);
|
|
||||||
SessionUtil.setFileUploadMonitor(session, fum);
|
SessionUtil.setFileUploadMonitor(session, fum);
|
||||||
|
|
||||||
SessionUtil.setCodelistMappingFileUploadSession(session,
|
SessionUtil.setCodelistMappingFileUploadSession(session,
|
||||||
fileUploadSession);
|
fileUploadSession);
|
||||||
|
|
||||||
|
@ -8296,15 +8316,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
logger.debug("StartCodelistMappingImport: "
|
logger.debug("StartCodelistMappingImport: "
|
||||||
+ codelistMappingSession.toString());
|
+ codelistMappingSession.toString());
|
||||||
|
|
||||||
|
importCodelistMappingFileOnService(session, aslSession, user,
|
||||||
|
codelistMappingSession);
|
||||||
importCodelistMappingFileOnService(session, aslSession, user, codelistMappingSession);
|
|
||||||
} catch (TDGWTSessionExpiredException e) {
|
} catch (TDGWTSessionExpiredException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new TDGWTServiceException("Error in Codelist Mapping import: "
|
throw new TDGWTServiceException(
|
||||||
+ e.getLocalizedMessage());
|
"Error in Codelist Mapping import: "
|
||||||
|
+ e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8446,7 +8466,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
importUrl = fileUrlOnStorage;
|
importUrl = fileUrlOnStorage;
|
||||||
}
|
}
|
||||||
|
|
||||||
AuthorizationProvider.instance.set(new AuthorizationToken(aslSession
|
AuthorizationProvider.instance.set(new AuthorizationToken(aslSession
|
||||||
.getUsername()));
|
.getUsername()));
|
||||||
TabularDataService service = TabularDataServiceFactory.getService();
|
TabularDataService service = TabularDataServiceFactory.getService();
|
||||||
|
|
Loading…
Reference in New Issue