Package org.pentaho.reporting.engine.classic.extensions.datasources.kettle

Examples of org.pentaho.reporting.engine.classic.extensions.datasources.kettle.EmbeddedKettleTransformationProducer


    if (producer instanceof EmbeddedKettleTransformationProducer == false)
    {
      throw new BundleWriterException
          ("Invalid object type registered for handler of " + EmbeddedKettleTransformationProducer.class.getSimpleName());
    }
    EmbeddedKettleTransformationProducer fileProducer = (EmbeddedKettleTransformationProducer) producer;


    String absoluteResourceName = writeFile(bundle, dataSourceFileName, queryName, fileProducer);

    final AttributeList coreAttrs = new AttributeList();
    // the name is static for now
    coreAttrs.setAttribute(KettleDataFactoryModule.NAMESPACE, "name", queryName);
    coreAttrs.setAttribute(KettleDataFactoryModule.NAMESPACE, "plugin-id", fileProducer.getPluginId());
    coreAttrs.setAttribute(KettleDataFactoryModule.NAMESPACE, "stop-on-error",
        String.valueOf(fileProducer.isStopOnError()));

    xmlWriter.writeTag(KettleDataFactoryModule.NAMESPACE, "query-embedded", coreAttrs, XmlWriter.OPEN);

    // Now writes the name of the file that the KTR is stored in.
    xmlWriter.writeTag(KettleDataFactoryModule.NAMESPACE, "resource", XmlWriter.OPEN);
View Full Code Here


    final String resourceName = resourceReadHandler.getResult();

    try
    {
      byte[] bytes = loadDataFromBundle(resourceName);
      EmbeddedKettleTransformationProducer kprod = new EmbeddedKettleTransformationProducer(getDefinedArgumentNames(),
          getDefinedVariableNames(),
          pluginId,
          bytes);
      kprod.setStopOnError(isStopOnError());
      return kprod;
    }
    catch (final Exception e)
    {
      throw new ParseException("Could not load resource " + resourceName, e, getLocator());
View Full Code Here

      return new FileKettleQueryEntry(queryName);
    }

    try
    {
      EmbeddedKettleTransformationProducer prod = (EmbeddedKettleTransformationProducer) producer;
      EmbeddedKettleQueryEntry entry = EmbeddedKettleQueryEntry.createFromExisting(queryName, prod,
              getDesignTimeContext().getDataFactoryContext());
      entry.addPropertyChangeListener("validated", new PreviewChangeListener());
      return entry;
    }
View Full Code Here

  @Override
  public KettleTransformationProducer createProducer()
      throws KettleException
  {
    EmbeddedKettleTransformationProducer p =
        new EmbeddedKettleTransformationProducer(getArguments(), getParameters(), pluginId, dialogHelper.getRawData());
    p.setStopOnError(isStopOnErrors());
    return p;
  }
View Full Code Here

  }

  protected AbstractKettleTransformationProducer loadTransformation(final DataFactoryContext context)
      throws KettleException
  {
    return new EmbeddedKettleTransformationProducer(getArguments(), getParameters(), pluginId, dialogHelper.getRawData());
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.extensions.datasources.kettle.EmbeddedKettleTransformationProducer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.