Minor Updated

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@92381 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-02-27 08:57:16 +00:00
parent 54434dd09c
commit a2ede48586
3 changed files with 26 additions and 0 deletions

View File

@ -40,6 +40,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Codelist;
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Dataset;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
@ -63,6 +64,14 @@ import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
@RemoteServiceRelativePath("TDGWTService")
public interface TDGWTService extends RemoteService {
/**
* Get informations on the current user
*
* @return
* @throws TDGWTServiceException
*/
public String hello() throws TDGWTServiceException;
/**
* Get informations on the current tabular resource
*

View File

@ -54,6 +54,8 @@ public interface TDGWTServiceAsync {
public static TDGWTServiceAsync INSTANCE = (TDGWTServiceAsync) GWT
.create(TDGWTService.class);
void hello(AsyncCallback<String> callback);
void createTabularResource(TabResource tabResource,AsyncCallback<TabResource> callback);
void getTabResourceInformation(AsyncCallback<TabResource> callback);

View File

@ -149,6 +149,19 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
protected static SimpleDateFormat sdf = new SimpleDateFormat(
"yyyy/MM/dd HH:mm");
/**
*
* {@inheritDoc}
*/
@Override
public String hello() throws TDGWTServiceException {
HttpSession session = this.getThreadLocalRequest().getSession();
ASLSession aslSession = SessionUtil.getAslSession(session);
String user = aslSession.getUsername();
return user;
}
/**
*
* {@inheritDoc}
@ -2999,4 +3012,6 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
}