Added Resume UI state
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@100397 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
180e295d2e
commit
b1f8bc624c
|
@ -213,6 +213,14 @@ public interface TDGWTService extends RemoteService {
|
||||||
public ColumnData getConnection(RefColumn refColumn)
|
public ColumnData getConnection(RefColumn refColumn)
|
||||||
throws TDGWTServiceException;
|
throws TDGWTServiceException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close current tabular resource
|
||||||
|
*
|
||||||
|
* @param trId
|
||||||
|
* @throws TDGWTServiceException
|
||||||
|
*/
|
||||||
|
public void closeTabularResource() throws TDGWTServiceException;
|
||||||
|
|
||||||
// Task
|
// Task
|
||||||
/**
|
/**
|
||||||
* Resubmit task
|
* Resubmit task
|
||||||
|
|
|
@ -128,7 +128,9 @@ public interface TDGWTServiceAsync {
|
||||||
AsyncCallback<ColumnData> callback);
|
AsyncCallback<ColumnData> callback);
|
||||||
|
|
||||||
void getConnection(RefColumn refColumn, AsyncCallback<ColumnData> callback);
|
void getConnection(RefColumn refColumn, AsyncCallback<ColumnData> callback);
|
||||||
|
|
||||||
|
void closeTabularResource(AsyncCallback<Void> callback);
|
||||||
|
|
||||||
// Task
|
// Task
|
||||||
void startTaskResubmit(TaskResubmitSession taskResubmitSession,
|
void startTaskResubmit(TaskResubmitSession taskResubmitSession,
|
||||||
AsyncCallback<String> callback);
|
AsyncCallback<String> callback);
|
||||||
|
|
|
@ -321,22 +321,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
SessionUtil.getAslSession(session);
|
SessionUtil.getAslSession(session);
|
||||||
|
|
||||||
TabResource currentTR = SessionUtil.getTabResource(session);
|
TRId trId = SessionUtil.getTRId(session);
|
||||||
logger.debug("getCurrentTRId()");
|
logger.debug("getCurrentTRId()");
|
||||||
if (currentTR == null) {
|
if (trId == null) {
|
||||||
logger.error("Current Tabular Resource is null");
|
logger.error("Current Tabular Resource is null");
|
||||||
throw new TDGWTServiceException(
|
throw new TDGWTServiceException(
|
||||||
"Current Tabular Resource is null");
|
"Current Tabular Resource is null");
|
||||||
}
|
}
|
||||||
logger.debug("getCurrentTRId():" + currentTR.toString());
|
logger.debug("getCurrentTRId():" + trId);
|
||||||
|
|
||||||
if (currentTR.getTrId() == null) {
|
return trId;
|
||||||
logger.error("Current Tabular Resource has TRId null");
|
|
||||||
throw new TDGWTServiceException(
|
|
||||||
"Current Tabular Resource has TRId null");
|
|
||||||
}
|
|
||||||
logger.debug("getCurrentTRId():" + currentTR.getTrId());
|
|
||||||
return currentTR.getTrId();
|
|
||||||
|
|
||||||
} catch (TDGWTServiceException e) {
|
} catch (TDGWTServiceException e) {
|
||||||
throw e;
|
throw e;
|
||||||
|
@ -351,11 +345,41 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void closeTabularResource() throws TDGWTServiceException {
|
||||||
|
try {
|
||||||
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
|
SessionUtil.getAslSession(session);
|
||||||
|
|
||||||
|
SessionUtil.setTabResource(session,null);
|
||||||
|
SessionUtil.setTRId(session, null);
|
||||||
|
return;
|
||||||
|
|
||||||
|
} catch (TDGWTServiceException e) {
|
||||||
|
throw e;
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new TDGWTServiceException(
|
||||||
|
"Security exception, you haven't rights!");
|
||||||
|
} catch (Throwable e) {
|
||||||
|
logger.error("getCurrentTRID(): " + e.getLocalizedMessage(), e);
|
||||||
|
throw new TDGWTServiceException("Error retrieving TR id: "
|
||||||
|
+ e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public TabResource getTabResourceInformation() throws TDGWTServiceException {
|
public TabResource getTabResourceInformation() throws TDGWTServiceException {
|
||||||
try {
|
try {
|
||||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||||
|
@ -6675,4 +6699,6 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue