use of org.pentaho.di.ExecutionConfiguration in project pentaho-kettle by pentaho.
the class RunConfigurationRunExtensionPoint method callExtensionPoint.
@Override
public void callExtensionPoint(LogChannelInterface logChannelInterface, Object o) throws KettleException {
ExecutionConfiguration executionConfiguration = (ExecutionConfiguration) ((Object[]) o)[0];
AbstractMeta meta = (AbstractMeta) ((Object[]) o)[1];
VariableSpace variableSpace = (VariableSpace) ((Object[]) o)[2];
Repository repository = (Repository) ((Object[]) o)[3];
EmbeddedMetaStore embeddedMetaStore = meta.getEmbeddedMetaStore();
RunConfiguration runConfiguration = runConfigurationManager.load(executionConfiguration.getRunConfiguration());
if (runConfiguration == null) {
RunConfigurationManager embeddedRunConfigurationManager = EmbeddedRunConfigurationManager.build(embeddedMetaStore);
runConfiguration = embeddedRunConfigurationManager.load(executionConfiguration.getRunConfiguration());
}
if (runConfiguration != null) {
RunConfigurationExecutor runConfigurationExecutor = runConfigurationManager.getExecutor(runConfiguration.getType());
if (runConfigurationExecutor != null) {
runConfigurationExecutor.execute(runConfiguration, executionConfiguration, meta, variableSpace, repository);
}
} else {
String name = "";
if (variableSpace instanceof TransMeta) {
name = ((TransMeta) variableSpace).getFilename();
}
throw new KettleException(BaseMessages.getString(PKG, "RunConfigurationRunExtensionPoint.ConfigNotFound.Error", name, executionConfiguration.getRunConfiguration(), "{0}"));
}
}
Aggregations