Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@93098 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-03-13 17:12:37 +00:00
parent c750316ab2
commit 965df33060
3 changed files with 22 additions and 8 deletions

View File

@ -49,6 +49,7 @@ import org.gcube.data.analysis.tabulardata.model.column.type.CodeNameColumnType;
import org.gcube.data.analysis.tabulardata.model.column.type.IdColumnType;
import org.gcube.data.analysis.tabulardata.model.column.type.ValidationColumnType;
import org.gcube.data.analysis.tabulardata.model.metadata.common.DescriptionsMetadata;
import org.gcube.data.analysis.tabulardata.model.metadata.common.ImmutableLocalizedText;
import org.gcube.data.analysis.tabulardata.model.metadata.common.LocalizedText;
import org.gcube.data.analysis.tabulardata.model.metadata.common.NamesMetadata;
import org.gcube.data.analysis.tabulardata.model.metadata.table.ExportMetadata;
@ -2833,10 +2834,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
logger.debug(labelColumnSession.toString());
OperationDefinition operationDefinition;
Map<String, Object> map = new HashMap<String, Object>();
ImmutableLocalizedText localizedText=new ImmutableLocalizedText(labelColumnSession.getLabel());
map.put(Constants.NAME_PARAMETER_ID, localizedText);
operationDefinition = OperationDefinitionMap.map(
OperationsId.ChangeLabel.toString(), capabilities);
OperationsId.ColumnNameAdd.toString(), capabilities);
invocation = new OperationExecution(labelColumnSession.getColumnData()
.getColumnId(), operationDefinition.getOperationId(), map);
@ -3199,11 +3205,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
HttpSession session = this.getThreadLocalRequest().getSession();
SessionUtil.setLabelColumnSession(session, labelColumnSession);
ASLSession aslSession = SessionUtil.getAslSession(session);
logger.debug(labelColumnSession.toString());
AuthorizationProvider.instance.set(new AuthorizationToken(
aslSession.getUsername()));
TabularDataService service = TabularDataServiceFactory.getService();
OperationExecution invocation = retrieveOperationExecution(service,
labelColumnSession);
if (invocation == null) {
@ -3217,7 +3224,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
logger.debug("OperationInvocation: \n" + invocation.toString());
Task trTask = service.execute(invocation, serviceTR);
logger.debug("Start Task on service: TaskId " + trTask.getId());
SessionUtil.setDeleteColumnTask(session, trTask);
SessionUtil.setLabelColumnTask(session, trTask);
return;
} catch (Exception e) {
e.printStackTrace();
@ -3935,6 +3942,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
@Override
public void setTabResourceInformation(TabResource tabResource)
throws TDGWTServiceException {
/*
TabularResourceId tabularResourceId=new TabularResourceId(new Long(labelColumnSession.getColumnData().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.*/
// TODO Auto-generated method stub
}

View File

@ -58,7 +58,7 @@ public enum OperationsId {
ChangeTableType("1002"),
CreateDatasetView("1003"),
RemoveColumn("1004"),
ChangeLabel("1005"),
ColumnNameAdd("710044479"),
AddLabel("1006"),
RemoveLabel("1007"),
ChangeToAnnotationColumn("2000"),

View File

@ -29,7 +29,8 @@ public class Constants {
public static final String PARAMETER_DATA_TYPE="dataType";
public static final String PARAMETER_TARGET_DATA_TYPE="targetDataType";
public static final String NAME_PARAMETER_ID="NAME_PARAMETER_ID";
public static final String PARAMETER_KEY="key";
public static final String PARAMETER_REFERENCE_COLUMN="refColumn";
public static final String PARAMETER_PERIOD_FORMAT="periodFormat";