use of org.pentaho.di.trans.TransPainterExtension in project pdi-dataservice-server-plugin by pentaho.
the class TransPainterStepExtensionPointPlugin method callExtensionPoint.
@Override
public void callExtensionPoint(LogChannelInterface log, Object object) throws KettleException {
if (!(object instanceof TransPainterExtension)) {
return;
}
TransPainterExtension extension = (TransPainterExtension) object;
TransMeta transMeta = extension.transMeta;
StepMeta stepMeta = extension.stepMeta;
DataServiceMeta dataService = metaStoreUtil.getDataServiceByStepName(transMeta, stepMeta.getName());
if (dataService != null && dataService.isUserDefined()) {
// Is this step a data service provider?
//
String image = dataService.isStreaming() ? "images/data-services-streaming.svg" : "images/data-services.svg";
extension.gc.drawImage(image, getClass().getClassLoader(), extension.x1 - 13, extension.y1 - 8 + extension.iconsize);
extension.areaOwners.add(new AreaOwner(AreaType.CUSTOM, extension.x1 - 13, extension.y1 - 8 + extension.iconsize, 16, 16, extension.offset, transMeta, stepMeta));
}
}
Aggregations