Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@90598 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-01-27 17:43:16 +00:00
parent 9f3f7fbd7d
commit 4f843a681f
3 changed files with 21 additions and 2 deletions

View File

@ -72,6 +72,13 @@ public interface TDGWTService extends RemoteService {
public TabResource getTabResourceInformation(TRId trId) throws TDGWTServiceException;
/**
* Get creation date on tabular resource
*
* @return
* @throws TDGWTServiceException
*/
public String getTRCreationDate(TRId trId) throws TDGWTServiceException;
/**
* Set current tabular resource

View File

@ -50,6 +50,8 @@ public interface TDGWTServiceAsync {
void getTabResourceInformation(TRId trId,AsyncCallback<TabResource> callback);
void getTRCreationDate(TRId trId,AsyncCallback<String> callback);
void setTabResource(TabResource tabResource, AsyncCallback<Void> callback);
void getTabularResources(AsyncCallback<ArrayList<TabResource>> callback);

View File

@ -1415,7 +1415,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
FileUtil.setImportFile(fileUploadSession, is, wi.getName(),
"text/csv");
} catch (Exception e) {
fileUploadSession.getFileUploadMonitor().setFailed(
fileUploadSession/**
* Get informations on tabular resource
*
* @return
* @throws TDGWTServiceException
*/.getFileUploadMonitor().setFailed(
"An error occured elaborating the file",
FileUtil.exceptionDetailMessage(e));
fileUploadSession.setFileUploadState(FileUploadState.FAILED);
@ -1432,6 +1437,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
SessionUtil.setFileUploadSession(session, fileUploadSession);
}
/**
*
* {@inheritDoc}
*/
public String getTRCreationDate(TRId trId) throws TDGWTServiceException {
try {
HttpSession session = this.getThreadLocalRequest().getSession();