915: TDM - Support the Spanish language

Task-Url: https://support.d4science.org/issues/915

Updated Spanish Support

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@119624 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-10-12 15:40:54 +00:00
parent 0081de4882
commit b675aae70c
6 changed files with 140 additions and 117 deletions

View File

@ -307,10 +307,6 @@ import com.google.gwt.user.server.rpc.RemoteServiceServlet;
*/
public class TDGWTServiceImpl extends RemoteServiceServlet implements
TDGWTService {
private static final String TEMPLATE_NOT_COMPATIBLE_EXCEPTION = "Template not compatible with this tabular resource!";
private static final String NO_VALID_TABULAR_RESOURCE_ID_PRESENT = "No valid tabular resource id present!";
private static final String TABULAR_RESOURCE_IS_LOCKED = "Tabular Resource Is Locked!";
private static final long serialVersionUID = -5707400086333186368L;
private static Logger logger = LoggerFactory
.getLogger(TDGWTServiceImpl.class);
@ -739,7 +735,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
TabularResource tabularResource = service
.getTabularResource(tabularResourceId);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
TabResource tabResource = retrieveTRMetadataFromServiceAndLastTable(
service, tabularResource, 1);
@ -3699,13 +3695,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
AuthorizationProvider.instance.set(new AuthorizationToken(
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(trId);
checkTRId(trId, session);
TabularResourceId tabResourceId = new TabularResourceId(
Long.valueOf(trId.getId()));
TabularResource tabularResource = service
.getTabularResource(tabResourceId);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
String owner = tabularResource.getOwner();
if (owner != null && owner.compareTo(aslSession.getUsername()) == 0) {
@ -4900,33 +4896,37 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
/**
*
* @param trId
* @param session TODO
* @throws TDGWTServiceException
*/
protected void checkTRId(TRId trId) throws TDGWTServiceException {
protected void checkTRId(TRId trId, HttpSession session) throws TDGWTServiceException {
if (trId == null) {
ResourceBundle messages = getResourceBundle(session);
logger.error("TRId is null");
new TDGWTServiceException(NO_VALID_TABULAR_RESOURCE_ID_PRESENT);
throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.noValidTabularResourceIdPresent));
}
if (trId.getId() == null || trId.getId().isEmpty()) {
ResourceBundle messages = getResourceBundle(session);
logger.error("TRId not valid: " + trId);
new TDGWTServiceException(NO_VALID_TABULAR_RESOURCE_ID_PRESENT);
throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.noValidTabularResourceIdPresent));
}
}
/**
*
* @param service
* @param trId
* @param tabularResource
* @param session
* @throws TDGWTServiceException
*/
protected void checkTabularResourceLocked(TabularResource tabularResource)
protected void checkTabularResourceLocked(TabularResource tabularResource, HttpSession session)
throws TDGWTServiceException {
try {
if (tabularResource.isLocked()) {
logger.error(TABULAR_RESOURCE_IS_LOCKED);
throw new TDGWTIsLockedException(TABULAR_RESOURCE_IS_LOCKED);
ResourceBundle messages = getResourceBundle(session);
logger.error("Tabular Resource Is Locked!");
throw new TDGWTIsLockedException(messages.getString(TDGWTServiceMessagesConstants.tabularResourceIsLocked));
}
} catch (TDGWTServiceException e) {
throw e;
@ -5035,7 +5035,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(trId);
checkTRId(trId, session);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(trId.getId()));
@ -5043,7 +5043,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
// /
OpExecution4SDMXCodelistExport opEx = new OpExecution4SDMXCodelistExport(
@ -5115,7 +5115,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(trId);
checkTRId(trId, session);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(trId.getId()));
@ -5123,7 +5123,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
OpExecution4CSVExport opEx = new OpExecution4CSVExport(session,
service, exportSession);
@ -5190,7 +5190,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
AuthorizationProvider.instance.set(new AuthorizationToken(
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(trId);
checkTRId(trId, session);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(trId.getId()));
@ -5198,7 +5198,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
OpExecution4JSONExport opEx = new OpExecution4JSONExport(session,
service, exportSession);
@ -5256,7 +5256,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(changeColumnTypeSession.getColumnData().getTrId());
checkTRId(changeColumnTypeSession.getColumnData().getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(changeColumnTypeSession.getColumnData()
@ -5265,7 +5265,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4ChangeColumnType opEx = new OpExecution4ChangeColumnType(
@ -5315,7 +5315,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
AuthorizationProvider.instance.set(new AuthorizationToken(
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(addColumnSession.getTrId());
checkTRId(addColumnSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(addColumnSession.getTrId().getId()));
@ -5323,7 +5323,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4AddColumn opEx = new OpExecution4AddColumn(service,
@ -5388,7 +5388,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(deleteColumnSession.getTrId());
checkTRId(deleteColumnSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(deleteColumnSession.getTrId().getId()));
@ -5396,7 +5396,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4DeleteColumn opEx = new OpExecution4DeleteColumn(
@ -5465,7 +5465,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(filterColumnSession.getTrId());
checkTRId(filterColumnSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(filterColumnSession.getTrId().getId()));
@ -5473,7 +5473,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4FilterColumn opEx = new OpExecution4FilterColumn(
@ -5542,7 +5542,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(replaceColumnByExpressionSession.getColumn().getTrId());
checkTRId(replaceColumnByExpressionSession.getColumn().getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(replaceColumnByExpressionSession.getColumn()
@ -5551,7 +5551,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4ReplaceColumnByExpression opEx = new OpExecution4ReplaceColumnByExpression(
@ -5617,7 +5617,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(labelColumnSession.getTrId());
checkTRId(labelColumnSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(labelColumnSession.getTrId().getId()));
@ -5625,7 +5625,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4LabelColumn opEx = new OpExecution4LabelColumn(service,
@ -5698,7 +5698,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(changeTableTypeSession.getTrId());
checkTRId(changeTableTypeSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(changeTableTypeSession.getTrId().getId()));
@ -5706,7 +5706,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4ChangeTableType opEx = new OpExecution4ChangeTableType(
@ -5872,7 +5872,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(deleteRowsSession.getTrId());
checkTRId(deleteRowsSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(deleteRowsSession.getTrId().getId()));
@ -5880,7 +5880,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4DeleteRows opEx = new OpExecution4DeleteRows(service,
@ -5941,14 +5941,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(cloneTabularResourceSession.getTrId());
checkTRId(cloneTabularResourceSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(cloneTabularResourceSession.getTrId().getId()));
TabularResource tabularResource = service
.getTabularResource(tabularResourceId);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
OpExecution4Clone opEx = new OpExecution4Clone(service,
cloneTabularResourceSession);
@ -6027,7 +6027,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(duplicatesSession.getTrId());
checkTRId(duplicatesSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(duplicatesSession.getTrId().getId()));
@ -6035,7 +6035,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4Duplicates opEx = new OpExecution4Duplicates(service,
@ -6092,7 +6092,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(trId);
checkTRId(trId, session);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(trId.getId()));
@ -6100,7 +6100,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
Task trTask = service.removeValidations(tabularResourceId);
@ -6367,13 +6367,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(tabResource.getTrId());
checkTRId(tabResource.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(tabResource.getTrId().getId()));
TabularResource tr = service.getTabularResource(tabularResourceId);
checkTabularResourceLocked(tr);
checkTabularResourceLocked(tr, null);
checkTabularResourceIsFinal(tr, null);
logger.debug("setTabResourceInformation - old information:" + tr);
@ -6491,13 +6491,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(trId);
checkTRId(trId, session);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(trId.getId()));
TabularResource tr = service.getTabularResource(tabularResourceId);
checkTabularResourceLocked(tr);
checkTabularResourceLocked(tr, null);
checkTabularResourceIsFinal(tr, null);
logger.debug("setTabResourceToFinal: " + tr);
@ -6702,7 +6702,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(templateApplySession.getTrId());
checkTRId(templateApplySession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(templateApplySession.getTrId().getId()));
@ -6710,7 +6710,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
TemplateId templateId = new TemplateId(templateApplySession
@ -6727,9 +6727,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
return trTask.getId().getValue();
} catch (TemplateNotCompatibleException e) {
logger.debug(TEMPLATE_NOT_COMPATIBLE_EXCEPTION);
ResourceBundle messages = getResourceBundle(session);
logger.error("Template not compatible with this tabular resource!");
e.printStackTrace();
throw new TDGWTServiceException(TEMPLATE_NOT_COMPATIBLE_EXCEPTION);
throw new TDGWTIsFlowException(
messages.getString(TDGWTServiceMessagesConstants.templateNotCompatibleException));
} catch (TDGWTServiceException e) {
throw e;
} catch (SecurityException e) {
@ -6808,7 +6810,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(replaceColumnSession.getTrId());
checkTRId(replaceColumnSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(replaceColumnSession.getTrId().getId()));
@ -6816,7 +6818,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4ReplaceColumn opEx = new OpExecution4ReplaceColumn(
@ -6877,7 +6879,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(replaceBatchColumnSession.getTrId());
checkTRId(replaceBatchColumnSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(replaceBatchColumnSession.getTrId().getId()));
@ -6885,7 +6887,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4ReplaceBatch opEx = new OpExecution4ReplaceBatch(
@ -7230,7 +7232,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(trId);
checkTRId(trId, session);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(trId.getId()));
@ -7238,7 +7240,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
List<HistoryStep> history = tabularResource.getHistory();
@ -7340,7 +7342,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(rollBackSession.getTrId());
checkTRId(rollBackSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(rollBackSession.getTrId().getId()));
@ -7348,7 +7350,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
HistoryStepId historyStepId = new HistoryStepId(
@ -7539,7 +7541,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(editRowSession.getTrId());
checkTRId(editRowSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(editRowSession.getTrId().getId()));
@ -7547,7 +7549,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4EditRow opEx = new OpExecution4EditRow(service,
@ -7665,7 +7667,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(taskResubmitSession.getTrId());
checkTRId(taskResubmitSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(taskResubmitSession.getTrId().getId()));
@ -7673,7 +7675,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
if (taskResubmitSession.getTaskId() == null
@ -7727,7 +7729,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(taskResumeSession.getTrId());
checkTRId(taskResumeSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(taskResumeSession.getTrId().getId()));
@ -7735,7 +7737,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
if (taskResumeSession.getTaskId() == null
@ -7879,7 +7881,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
AuthorizationProvider.instance.set(new AuthorizationToken(
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(extractCodelistSession.getTrId());
checkTRId(extractCodelistSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(extractCodelistSession.getTrId().getId()));
@ -7887,7 +7889,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
OpExecution4ExtractCodelist opEx = new OpExecution4ExtractCodelist(
service, extractCodelistSession);
@ -7944,7 +7946,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(splitColumnSession.getColumnData().getTrId());
checkTRId(splitColumnSession.getColumnData().getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(splitColumnSession.getColumnData().getTrId()
@ -7953,7 +7955,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4SplitColumn opEx = new OpExecution4SplitColumn(service,
@ -8012,7 +8014,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(mergeColumnSession.getColumnDataSource1().getTrId());
checkTRId(mergeColumnSession.getColumnDataSource1().getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(mergeColumnSession.getColumnDataSource1()
@ -8021,7 +8023,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4MergeColumn opEx = new OpExecution4MergeColumn(service,
@ -8265,7 +8267,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(codelistMappingSession.getTrId());
checkTRId(codelistMappingSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(codelistMappingSession.getTrId().getId()));
@ -8273,7 +8275,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4CodelistMapping opEx = new OpExecution4CodelistMapping(
@ -8313,7 +8315,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(groupBySession.getTrId());
checkTRId(groupBySession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(groupBySession.getTrId().getId()));
@ -8321,7 +8323,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4GroupBy opEx = new OpExecution4GroupBy(service,
@ -8373,7 +8375,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(timeAggregationSession.getTrId());
checkTRId(timeAggregationSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(timeAggregationSession.getTrId().getId()));
@ -8381,7 +8383,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4TimeAggregation opEx = new OpExecution4TimeAggregation(
@ -8438,7 +8440,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(normalizationSession.getTrId());
checkTRId(normalizationSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(normalizationSession.getTrId().getId()));
@ -8446,7 +8448,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4Normalization opEx = new OpExecution4Normalization(
@ -8507,7 +8509,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(denormalizationSession.getTrId());
checkTRId(denormalizationSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(denormalizationSession.getTrId().getId()));
@ -8515,7 +8517,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4Denormalization opEx = new OpExecution4Denormalization(
@ -8572,7 +8574,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(unionSession.getTrId());
checkTRId(unionSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(unionSession.getTrId().getId()));
@ -8580,7 +8582,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4Union opEx = new OpExecution4Union(service,
@ -8637,7 +8639,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(changeColumnsPositionSession.getTrId());
checkTRId(changeColumnsPositionSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(changeColumnsPositionSession.getTrId().getId()));
@ -8645,7 +8647,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4ChangeColumnsPosition opEx = new OpExecution4ChangeColumnsPosition(
@ -8699,7 +8701,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(replaceByExternalSession.getTrId());
checkTRId(replaceByExternalSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(replaceByExternalSession.getTrId().getId()));
@ -8707,7 +8709,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4ReplaceByExternal opEx = new OpExecution4ReplaceByExternal(
@ -8765,7 +8767,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(statisticalOperationSession.getTrId());
checkTRId(statisticalOperationSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(statisticalOperationSession.getTrId().getId()));
@ -8773,7 +8775,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
OpExecution4StatisticalOperation opEx = new OpExecution4StatisticalOperation(
service, aslSession, statisticalOperationSession);
@ -9059,14 +9061,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(trId);
checkTRId(trId, session);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(trId.getId()));
TabularResource tabularResource = service
.getTabularResource(tabularResourceId);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
List<ResourceDescriptor> resources = service
.getResources(tabularResourceId);
@ -9109,14 +9111,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(trId);
checkTRId(trId, session);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(trId.getId()));
TabularResource tabularResource = service
.getTabularResource(tabularResourceId);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
ResourceType resourceType = ResourceTypeMap
.getResourceType(resourceTDType);
@ -9173,13 +9175,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
AuthorizationProvider.instance.set(new AuthorizationToken(
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(trId);
checkTRId(trId, session);
TabularResourceId tabResourceId = new TabularResourceId(
Long.valueOf(trId.getId()));
TabularResource tabularResource = service
.getTabularResource(tabResourceId);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
String owner = tabularResource.getOwner();
if (owner != null && owner.compareTo(aslSession.getUsername()) == 0) {
@ -9232,7 +9234,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(mapCreationSession.getTrId());
checkTRId(mapCreationSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(mapCreationSession.getTrId().getId()));
@ -9240,7 +9242,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
OpExecution4MapCreation opEx = new OpExecution4MapCreation(service,
mapCreationSession);
@ -9331,7 +9333,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(chartTopRatingSession.getColumn().getTrId());
checkTRId(chartTopRatingSession.getColumn().getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(chartTopRatingSession.getColumn().getTrId()
@ -9340,7 +9342,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
OpExecution4ChartTopRating opEx = new OpExecution4ChartTopRating(
service, chartTopRatingSession);
@ -9594,7 +9596,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(geospatialCreateCoordinatesSession.getTrId());
checkTRId(geospatialCreateCoordinatesSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(geospatialCreateCoordinatesSession.getTrId()
@ -9603,7 +9605,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4GeospatialCreateCoordinates opEx = new OpExecution4GeospatialCreateCoordinates(
@ -9671,7 +9673,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(geospatialDownscaleCSquareSession.getTrId());
checkTRId(geospatialDownscaleCSquareSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(geospatialDownscaleCSquareSession.getTrId()
@ -9680,7 +9682,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4GeospatialDownscaleCSquare opEx = new OpExecution4GeospatialDownscaleCSquare(
@ -9747,7 +9749,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(geometryCreatePointSession.getTrId());
checkTRId(geometryCreatePointSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(geometryCreatePointSession.getTrId().getId()));
@ -9755,7 +9757,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
OpExecution4GeometryCreatePoint opEx = new OpExecution4GeometryCreatePoint(
@ -9825,7 +9827,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(applyAndDetachColumnRulesSession.getTrId());
checkTRId(applyAndDetachColumnRulesSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(applyAndDetachColumnRulesSession.getTrId()
@ -9834,7 +9836,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
ColumnData column = applyAndDetachColumnRulesSession.getColumn();
@ -9938,7 +9940,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(applyTableRuleSession.getTrId());
checkTRId(applyTableRuleSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(applyTableRuleSession.getTrId().getId()));
@ -9946,7 +9948,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
RuleId ruleId = new RuleId(applyTableRuleSession
@ -10004,7 +10006,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(detachColumnRulesSession.getTrId());
checkTRId(detachColumnRulesSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(detachColumnRulesSession.getTrId().getId()));
@ -10012,7 +10014,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
ColumnData column = detachColumnRulesSession.getColumn();
@ -10080,7 +10082,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
aslSession.getUsername(), aslSession.getScope()));
TabularDataService service = TabularDataServiceFactory.getService();
checkTRId(detachTableRulesSession.getTrId());
checkTRId(detachTableRulesSession.getTrId(), null);
TabularResourceId tabularResourceId = new TabularResourceId(
Long.valueOf(detachTableRulesSession.getTrId().getId()));
@ -10088,7 +10090,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
.getTabularResource(tabularResourceId);
checkTabularResourceIsFlow(tabularResource, session);
checkTabularResourceLocked(tabularResource);
checkTabularResourceLocked(tabularResource, session);
checkTabularResourceIsFinal(tabularResource, session);
ArrayList<RuleDescriptionData> rules = detachTableRulesSession

View File

@ -13,9 +13,18 @@ public class TDGWTServiceMessagesConstants {
public static final String sessionExpired = "sessionExpired";
public static final String securityExceptionRights = "securityExceptionRights";
public static final String tabularResourceIsLocked = "tabularResourceIsLocked";
public static final String tabularResourceIsFinal = "tabularResourceIsFinal";
public static final String noValidTabularResourceIdPresent = "noValidTabularResourceIdPresent";
public static final String operationNotAllowedOnFlow = "operationNotAllowedOnFlow";
public static final String templateNotCompatibleException = "Template not compatible with this tabular resource!";
}

View File

@ -1,4 +1,7 @@
sessionExpired = Session Expired!
securityExceptionRights = Security exception, you don't have the required rights!
tabularResourceIsLocked = Tabular Resource Is Locked!
tabularResourceIsFinal = Tabular Resource Is Final!
noValidTabularResourceIdPresent = No valid tabular resource id present!
operationNotAllowedOnFlow = Operation not allowed on a tabular resource of type flow!
templateNotCompatibleException = Template not compatible with this tabular resource!

View File

@ -1,4 +1,7 @@
sessionExpired = Session Expired!
securityExceptionRights = Security exception, you don't have the required rights!
tabularResourceIsLocked = Tabular Resource Is Locked!
tabularResourceIsFinal = Tabular Resource Is Final!
operationNotAllowedOnFlow = Operation not allowed on a tabular resource of type flow!
noValidTabularResourceIdPresent = No valid tabular resource id present!
operationNotAllowedOnFlow = Operation not allowed on a tabular resource of type flow!
templateNotCompatibleException = Template not compatible with this tabular resource!

View File

@ -1,4 +1,7 @@
sessionExpired = Sesión Ha Finalizado!
securityExceptionRights = Excepción de seguridad, usted no tiene los derechos necesarios!
tabularResourceIsLocked = La Tabular Resource es Locked!
tabularResourceIsFinal = La Tabular Resource es Final!
operationNotAllowedOnFlow = Operación no permitida en una tabular resource de tipo flow!!
noValidTabularResourceIdPresent = Id de la Tabular Resource no válido!
operationNotAllowedOnFlow = Operación no permitida en una tabular resource de tipo flow!
templateNotCompatibleException = Plantilla no es compatible con esta Tabular Resource!

View File

@ -1,4 +1,7 @@
sessionExpired = Sessione Scaduta!
securityExceptionRights = Eccezione di sicurezza, non si dispone dei diritti necessari!
tabularResourceIsLocked = La Tabular Resource è Locked!
tabularResourceIsFinal = La Tabular Resource è Finale!
noValidTabularResourceIdPresent = Id della Tabular Resource non valido!
operationNotAllowedOnFlow = Operazione non permessa su una tabular resource di tipo flow!
templateNotCompatibleException = Template non compatibile con questa Tabular Resource!