Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@93107 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-03-13 18:11:01 +00:00
parent 965df33060
commit f691461f55
1 changed files with 28 additions and 7 deletions

View File

@ -3942,13 +3942,34 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
@Override
public void setTabResourceInformation(TabResource tabResource)
throws TDGWTServiceException {
/*
TabularResourceId tabularResourceId=new TabularResourceId(new Long(labelColumnSession.getColumnData().getTrId().getId()));
try {
HttpSession session = this.getThreadLocalRequest().getSession();
ASLSession aslSession = SessionUtil.getAslSession(session);
logger.debug("SetTabResourceInformation: " + tabResource);
AuthorizationProvider.instance.set(new AuthorizationToken(
aslSession.getUsername()));
TabularDataService service = TabularDataServiceFactory.getService();
TabularResource tr=service.getTabularResource(tabularResourceId);
org.gcube.data.analysis.tabulardata.service.tabular.metadata.NameMetadata name=tr.getMetadata(org.gcube.data.analysis.tabulardata.service.tabular.metadata.NameMetadata.class);
name.*/
// TODO Auto-generated method stub
TabularResourceId tabularResourceId = new TabularResourceId(
new Long(tabResource.getTrId().getId()));
TabularResource tr=service.getTabularResource(tabularResourceId);
org.gcube.data.analysis.tabulardata.service.tabular.metadata.NameMetadata name=tr.getMetadata(org.gcube.data.analysis.tabulardata.service.tabular.metadata.NameMetadata.class);
name.setValue(tabResource.getName());
org.gcube.data.analysis.tabulardata.service.tabular.metadata.DescriptionMetadata description=tr.getMetadata(org.gcube.data.analysis.tabulardata.service.tabular.metadata.DescriptionMetadata.class);
description.setValue(tabResource.getDescription());
org.gcube.data.analysis.tabulardata.service.tabular.metadata.AgencyMetadata agency=tr.getMetadata(org.gcube.data.analysis.tabulardata.service.tabular.metadata.AgencyMetadata.class);
agency.setValue(tabResource.getAgency());
org.gcube.data.analysis.tabulardata.service.tabular.metadata.RightsMetadata rights=tr.getMetadata(org.gcube.data.analysis.tabulardata.service.tabular.metadata.RightsMetadata.class);
rights.setValue(tabResource.getRight());
} catch (Exception e) {
logger.debug("Error in setTabResourceInformation: "
+ e.getLocalizedMessage());
e.printStackTrace();
throw new TDGWTServiceException("Error in setTabResourceInformation: "
+ e.getLocalizedMessage());
}
}