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

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


   * @return the object.
   * @throws SAXException if an parser error occured.
   */
  public Object getObject() throws SAXException
  {
    return new KettleTransFromFileProducer
        (getRepositoryName(), fileName, getStepName(), getUsername(), getPassword(),
            getDefinedArgumentNames(), getDefinedVariableNames());
  }
View Full Code Here


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

    final AttributeList coreAttrs = new AttributeList();
    coreAttrs.setAttribute(KettleDataFactoryModule.NAMESPACE, "name", queryName);
    coreAttrs.setAttribute(KettleDataFactoryModule.NAMESPACE, "repository", fileProducer.getRepositoryName());
    coreAttrs.setAttribute(KettleDataFactoryModule.NAMESPACE, "filename", fileProducer.getTransformationFile());
    coreAttrs.setAttribute(KettleDataFactoryModule.NAMESPACE, "step", fileProducer.getStepName());
    coreAttrs.setAttribute(KettleDataFactoryModule.NAMESPACE, "username", fileProducer.getUsername());
    coreAttrs.setAttribute(KettleDataFactoryModule.NAMESPACE, "password",
        PasswordEncryptionService.getInstance().encrypt(fileProducer.getPassword()));
    coreAttrs.setAttribute(KettleDataFactoryModule.NAMESPACE, "stop-on-error",
        String.valueOf(fileProducer.isStopOnError()));

    final String[] definedArgumentNames = fileProducer.getDefinedArgumentNames();
    final ParameterMapping[] parameterMappings = fileProducer.getDefinedVariableNames();
    if (definedArgumentNames.length == 0 && parameterMappings.length == 0)
    {
      xmlWriter.writeTag(KettleDataFactoryModule.NAMESPACE, "query-file", coreAttrs, XmlWriter.CLOSE);
      return;
    }
View Full Code Here

   *
   * @return the object.
   */
  public KettleTransformationProducer getObject()
  {
    KettleTransFromFileProducer kettleTransFromFileProducer = new KettleTransFromFileProducer
        (getRepositoryName(), fileName, getStepName(), getUsername(), getPassword(),
            getDefinedArgumentNames(), getDefinedVariableNames());
    kettleTransFromFileProducer.setStopOnError(isStopOnError());
    return kettleTransFromFileProducer;
  }
View Full Code Here

  {
    final FormulaArgument[] argumentFields = getArguments();
    final FormulaParameter[] varNames = getParameters();
    final String file = getFile();
    final String selectedStep = getSelectedStep();
    KettleTransFromFileProducer kettleTransFromFileProducer = new KettleTransFromFileProducer(file, selectedStep, argumentFields, varNames);
    kettleTransFromFileProducer.setStopOnError(isStopOnErrors());
    return kettleTransFromFileProducer;
  }
View Full Code Here

    final KettleDataFactory kettleDataFactory = new KettleDataFactory();
    for (int i = 0; i < queryListModel.getSize(); i++)
    {
      final KettleQueryEntry queryEntry = (KettleQueryEntry) queryListModel.getElementAt(i);
      final KettleTransFromFileProducer producer = queryEntry.createProducer();
      kettleDataFactory.setQuery(queryEntry.getName(), producer);
    }

    return kettleDataFactory;
  }
View Full Code Here

    final String[] queryNames = dataFactory.getQueryNames();
    for (int i = 0; i < queryNames.length; i++)
    {
      final String queryName = queryNames[i];
      final KettleTransFromFileProducer producer = (KettleTransFromFileProducer) dataFactory.getQuery(queryName);

      final KettleQueryEntry dataSet = new KettleQueryEntry(queryName);
      dataSet.setFile(producer.getTransformationFile());
      dataSet.setSelectedStep(producer.getStepName());
      dataSet.setArguments(producer.getDefinedArgumentNames());
      dataSet.setParameters(producer.getDefinedVariableNames());
      queryListModel.addElement(dataSet);
      if (ObjectUtilities.equal(selectedQueryName, queryName))
      {
        selectedDataSet = dataSet;
      }
View Full Code Here

    }

    public void actionPerformed(final ActionEvent e)
    {
      final KettleQueryEntry kettleQueryEntry = (KettleQueryEntry) queryNameList.getSelectedValue();
      final KettleTransFromFileProducer fileProducer = kettleQueryEntry.createProducer();
      final KettleDataFactory dataFactory = new KettleDataFactory();
      dataFactory.setQuery(kettleQueryEntry.getName(), fileProducer);

      try
      {
View Full Code Here

  {
    final String[] argumentFields = getArguments();
    final ParameterMapping[] varNames = getParameters();
    final String file = getFile();
    final String selectedStep = getSelectedStep();
    return new KettleTransFromFileProducer("", file, selectedStep, null, null, argumentFields, varNames);
  }
View Full Code Here

TOP

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

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.