Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@94592 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d221f6e251
commit
391e1ff5ec
|
@ -411,12 +411,34 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
if (cl == null) {
|
||||
cData.setLabel("nolabel");
|
||||
logger.debug("ColumnLabel no label in en");
|
||||
} else {
|
||||
if (cl.getValue() == null
|
||||
|| cl.getValue().isEmpty()) {
|
||||
cData.setLabel("nolabel");
|
||||
logger.debug("ColumnLabel no label in en");
|
||||
} else {
|
||||
cData.setLabel(cl.getValue());
|
||||
logger.debug("Column Set Label: "
|
||||
+ cl.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DataLocaleMetadata dataLocaleMetadata = null;
|
||||
try {
|
||||
dataLocaleMetadata = c
|
||||
.getMetadata(DataLocaleMetadata.class);
|
||||
} catch (NoSuchMetadataException e) {
|
||||
logger.debug("DataLocaleMetadata: NoSuchMetadataException "
|
||||
+ e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
if (dataLocaleMetadata == null) {
|
||||
logger.debug("No DataLocaleMetadata");
|
||||
} else {
|
||||
cData.setLocale(dataLocaleMetadata.getLocale());
|
||||
}
|
||||
|
||||
cData.setTrId(trId);
|
||||
columns.add(cData);
|
||||
i++;
|
||||
|
@ -494,12 +516,34 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
if (cl == null) {
|
||||
cData.setLabel("nolabel");
|
||||
logger.debug("ColumnLabel no label in en");
|
||||
} else {
|
||||
if (cl.getValue() == null
|
||||
|| cl.getValue().isEmpty()) {
|
||||
cData.setLabel("nolabel");
|
||||
logger.debug("ColumnLabel no label in en");
|
||||
} else {
|
||||
cData.setLabel(cl.getValue());
|
||||
logger.debug("Column Set Label: "
|
||||
+ cl.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DataLocaleMetadata dataLocaleMetadata = null;
|
||||
try {
|
||||
dataLocaleMetadata = c
|
||||
.getMetadata(DataLocaleMetadata.class);
|
||||
} catch (NoSuchMetadataException e) {
|
||||
logger.debug("DataLocaleMetadata: NoSuchMetadataException "
|
||||
+ e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
if (dataLocaleMetadata == null) {
|
||||
logger.debug("No DataLocaleMetadata");
|
||||
} else {
|
||||
cData.setLocale(dataLocaleMetadata.getLocale());
|
||||
}
|
||||
|
||||
cData.setTrId(trId);
|
||||
columns.add(cData);
|
||||
i++;
|
||||
|
@ -518,7 +562,6 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* {@inheritDoc}
|
||||
|
@ -533,7 +576,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
aslSession.getUsername()));
|
||||
TabularDataService service = TabularDataServiceFactory.getService();
|
||||
|
||||
Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId())));
|
||||
Table table = service.getTable(new TableId(Long.valueOf(trId
|
||||
.getTableId())));
|
||||
|
||||
ColumnData cData = new ColumnData();
|
||||
ColumnLocalId columnId = new ColumnLocalId(columnLocalId);
|
||||
|
@ -587,11 +631,34 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
if (cl == null) {
|
||||
cData.setLabel("nolabel");
|
||||
logger.debug("ColumnLabel no label in en");
|
||||
} else {
|
||||
if (cl.getValue() == null
|
||||
|| cl.getValue().isEmpty()) {
|
||||
cData.setLabel("nolabel");
|
||||
logger.debug("ColumnLabel no label in en");
|
||||
} else {
|
||||
cData.setLabel(cl.getValue());
|
||||
logger.debug("Column Set Label: " + cl.getValue());
|
||||
logger.debug("Column Set Label: "
|
||||
+ cl.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DataLocaleMetadata dataLocaleMetadata = null;
|
||||
try {
|
||||
dataLocaleMetadata = c
|
||||
.getMetadata(DataLocaleMetadata.class);
|
||||
} catch (NoSuchMetadataException e) {
|
||||
logger.debug("DataLocaleMetadata: NoSuchMetadataException "
|
||||
+ e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
if (dataLocaleMetadata == null) {
|
||||
logger.debug("No DataLocaleMetadata");
|
||||
} else {
|
||||
cData.setLocale(dataLocaleMetadata.getLocale());
|
||||
}
|
||||
|
||||
cData.setTrId(trId);
|
||||
|
||||
}
|
||||
|
@ -675,11 +742,34 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
if (cl == null) {
|
||||
cData.setLabel("nolabel");
|
||||
logger.debug("ColumnLabel no label in en");
|
||||
} else {
|
||||
if (cl.getValue() == null
|
||||
|| cl.getValue().isEmpty()) {
|
||||
cData.setLabel("nolabel");
|
||||
logger.debug("ColumnLabel no label in en");
|
||||
} else {
|
||||
cData.setLabel(cl.getValue());
|
||||
logger.debug("Column Set Label: " + cl.getValue());
|
||||
logger.debug("Column Set Label: "
|
||||
+ cl.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DataLocaleMetadata dataLocaleMetadata = null;
|
||||
try {
|
||||
dataLocaleMetadata = c
|
||||
.getMetadata(DataLocaleMetadata.class);
|
||||
} catch (NoSuchMetadataException e) {
|
||||
logger.debug("DataLocaleMetadata: NoSuchMetadataException "
|
||||
+ e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
if (dataLocaleMetadata == null) {
|
||||
logger.debug("No DataLocaleMetadata");
|
||||
} else {
|
||||
cData.setLocale(dataLocaleMetadata.getLocale());
|
||||
}
|
||||
|
||||
cData.setTrId(trId);
|
||||
|
||||
}
|
||||
|
@ -3412,7 +3502,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
operationDefinition.getOperationId(), map);
|
||||
break;
|
||||
case CODENAME:
|
||||
DataLocaleMetadata locale=new DataLocaleMetadata(changeColumnTypeSession.getLocale());
|
||||
DataLocaleMetadata locale = new DataLocaleMetadata(
|
||||
changeColumnTypeSession.getLocale());
|
||||
map.put(Constants.PARAMETER_ADDITIONAL_META, locale);
|
||||
operationDefinition = OperationDefinitionMap.map(
|
||||
OperationsId.ChangeToCodeName.toString(), capabilities);
|
||||
|
@ -4437,12 +4528,34 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
if (cl == null) {
|
||||
cData.setLabel("nolabel");
|
||||
logger.debug("ColumnLabel no label in en");
|
||||
} else {
|
||||
if (cl.getValue() == null
|
||||
|| cl.getValue().isEmpty()) {
|
||||
cData.setLabel("nolabel");
|
||||
logger.debug("ColumnLabel no label in en");
|
||||
} else {
|
||||
cData.setLabel(cl.getValue());
|
||||
logger.debug("Column Set Label: "
|
||||
+ cl.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DataLocaleMetadata dataLocaleMetadata = null;
|
||||
try {
|
||||
dataLocaleMetadata = c
|
||||
.getMetadata(DataLocaleMetadata.class);
|
||||
} catch (NoSuchMetadataException e) {
|
||||
logger.debug("DataLocaleMetadata: NoSuchMetadataException "
|
||||
+ e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
if (dataLocaleMetadata == null) {
|
||||
logger.debug("No DataLocaleMetadata");
|
||||
} else {
|
||||
cData.setLocale(dataLocaleMetadata.getLocale());
|
||||
}
|
||||
|
||||
cData.setTrId(trId);
|
||||
columns.add(cData);
|
||||
i++;
|
||||
|
@ -4950,13 +5063,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||
logger.debug("GetOccurencesForBatchReplace: " + occurrencesForReplaceBatchColumnSession.toString());
|
||||
logger.debug("GetOccurencesForBatchReplace: "
|
||||
+ occurrencesForReplaceBatchColumnSession.toString());
|
||||
AuthorizationProvider.instance.set(new AuthorizationToken(
|
||||
aslSession.getUsername()));
|
||||
TabularDataService service = TabularDataServiceFactory.getService();
|
||||
|
||||
ArrayList<Occurrences> occurences = QueryService.queryOccurences(
|
||||
service, occurrencesForReplaceBatchColumnSession, Direction.ASC);
|
||||
service, occurrencesForReplaceBatchColumnSession,
|
||||
Direction.ASC);
|
||||
|
||||
logger.debug("Retrieved Occurences");
|
||||
return occurences;
|
||||
|
@ -5502,14 +5617,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public ArrayList<String> getLocales()
|
||||
throws TDGWTServiceException {
|
||||
public ArrayList<String> getLocales() throws TDGWTServiceException {
|
||||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
@SuppressWarnings("unused")
|
||||
|
@ -5523,16 +5636,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
logger.debug("locales :" + locales);
|
||||
return locales;
|
||||
|
||||
|
||||
} catch (Throwable e) {
|
||||
logger.debug("getLocales(): " + e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw new TDGWTServiceException(
|
||||
"Error retrieving locales: "
|
||||
throw new TDGWTServiceException("Error retrieving locales: "
|
||||
+ e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@ public class ColumnData implements Serializable {
|
|||
protected String typeCode;
|
||||
protected String dataTypeName;
|
||||
protected String label;
|
||||
protected String locale;
|
||||
|
||||
protected TRId trId;
|
||||
protected boolean viewColumn;
|
||||
protected ColumnViewData columnViewData;
|
||||
|
@ -139,16 +141,25 @@ public class ColumnData implements Serializable {
|
|||
this.validationColumnReferences = validationColumnReferences;
|
||||
}
|
||||
|
||||
public String getLocale() {
|
||||
return locale;
|
||||
}
|
||||
|
||||
public void setLocale(String locale) {
|
||||
this.locale = locale;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ColumnData [id=" + id + ", columnId=" + columnId + ", name="
|
||||
+ name + ", typeName=" + typeName + ", typeCode=" + typeCode
|
||||
+ ", dataTypeName=" + dataTypeName + ", label=" + label
|
||||
+ ", trId=" + trId + ", viewColumn=" + viewColumn
|
||||
+ ", columnViewData=" + columnViewData
|
||||
+ ", locale=" + locale + ", trId=" + trId + ", viewColumn="
|
||||
+ viewColumn + ", columnViewData=" + columnViewData
|
||||
+ ", validationColumnReferences=" + validationColumnReferences
|
||||
+ ", validationColumn=" + validationColumn
|
||||
+ ", validatedColumns=" + validatedColumns + "]";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue