use of org.pentaho.di.trans.dataservice.jdbc.api.IThinServiceInformation in project pdi-dataservice-server-plugin by pentaho.
the class DataServiceClient method getServiceInformation.
@Override
public List<IThinServiceInformation> getServiceInformation() throws SQLException {
List<IThinServiceInformation> services = Lists.newArrayList();
for (DataServiceMeta service : resolver.getDataServices(logErrors()::apply)) {
TransMeta transMeta = service.getServiceTrans();
try {
transMeta.activateParameters();
RowMetaInterface serviceFields = transMeta.getStepFields(service.getStepname());
IThinServiceInformation serviceInformation = new ThinServiceInformation(service.getName(), service.isStreaming(), serviceFields);
services.add(serviceInformation);
} catch (Exception e) {
String message = MessageFormat.format("Unable to get fields for service {0}, transformation: {1}", service.getName(), transMeta.getName());
log.logError(message, e);
}
}
return services;
}
Aggregations