Package org.pentaho.reporting.engine.classic.core

Examples of org.pentaho.reporting.engine.classic.core.ReportProcessingException


                           final ReportProgressDialog dialog,
                           final SwingGuiContext swingGuiContext) throws ReportProcessingException
  {
    if (report == null)
    {
      throw new ReportProcessingException("HtmlZipExportTask(..): Report-Parameter cannot be null"); //$NON-NLS-1$
    }

    final Configuration config = report.getConfiguration();
    dataDirectory = config.getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.gui.html.zip.DataDirectory"); //$NON-NLS-1$
    final String targetFileName = config.getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.gui.html.zip.TargetFileName"); //$NON-NLS-1$
    exportMethod = config.getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.gui.html.zip.ExportMethod"); //$NON-NLS-1$

    this.progressDialog = dialog;
    this.report = report;
    if (swingGuiContext != null)
    {
      this.statusListener = swingGuiContext.getStatusListener();
      this.messages = new Messages(swingGuiContext.getLocale(), HtmlExportGUIModule.BASE_RESOURCE_CLASS,
            ObjectUtilities.getClassLoader(HtmlExportGUIModule.class));
    }
    else
    {
      this.messages = new Messages(Locale.getDefault(), HtmlExportGUIModule.BASE_RESOURCE_CLASS,
            ObjectUtilities.getClassLoader(HtmlExportGUIModule.class));
    }

    targetFile = new File(targetFileName);

    if (targetFile.exists())
    {
      // lets try to delete it ..
      if (targetFile.delete() == false)
      {
        throw new ReportProcessingException(messages.getErrorString(
            "HtmlZipExportTask.ERROR_0002_TARGET_FILE_EXISTS")); //$NON-NLS-1$
      }
    }
  }
View Full Code Here


    final String filename = report.getConfiguration().getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.gui.csv.FileName"); //$NON-NLS-1$
    if (filename == null)
    {
      throw new ReportProcessingException(
          "CSVDataExportTask(..): Configuration does not contain a valid filename"); //$NON-NLS-1$
    }

    this.fileName = filename;
    this.report = report;
View Full Code Here

                              final ReportProgressDialog dialog,
                              final SwingGuiContext swingGuiContext) throws ReportProcessingException
  {
    if (report == null)
    {
      throw new ReportProcessingException("HtmlStreamExportTask(..): Report-Parameter cannot be null"); //$NON-NLS-1$
    }
    try
    {
      this.progressDialog = dialog;
      this.report = report;
      if (swingGuiContext != null)
      {
        this.statusListener = swingGuiContext.getStatusListener();
        this.messages = new Messages(swingGuiContext.getLocale(), HtmlExportGUIModule.BASE_RESOURCE_CLASS,
            ObjectUtilities.getClassLoader(HtmlExportGUIModule.class));
      }
      else
      {
        this.messages = new Messages(Locale.getDefault(), HtmlExportGUIModule.BASE_RESOURCE_CLASS,
            ObjectUtilities.getClassLoader(HtmlExportGUIModule.class));
      }

      final Configuration config = report.getConfiguration();
      final String targetFileName = config.getConfigProperty
          ("org.pentaho.reporting.engine.classic.core.modules.gui.html.stream.TargetFileName"); //$NON-NLS-1$
      if (targetFileName == null)
      {
        throw new ReportProcessingException(messages.getErrorString(
            "HtmlStreamExportTask.ERROR_0002_TARGET_NOT_SET")); //$NON-NLS-1$
      }

      final File targetFile = new File(targetFileName).getCanonicalFile();
      targetDirectory = targetFile.getParentFile();

      suffix = getSuffix(targetFileName);
      filename = IOUtils.getInstance().stripFileExtension(targetFile.getName());

      if (targetFile.exists())
      {
        // lets try to delete it ..
        if (targetFile.delete() == false)
        {
          throw new ReportProcessingException(messages.getErrorString(
              "HtmlStreamExportTask.ERROR_0003_TARGET_FILE_EXISTS", targetFile.getAbsolutePath())); //$NON-NLS-1$
        }
      }
    }
    catch (IOException ioe)
    {
      throw new ReportProcessingException("Failed to normalize directories.", ioe);
    }
  }
View Full Code Here

      if (dataDirectory.exists() && dataDirectory.isDirectory() == false)
      {
        dataDirectory = dataDirectory.getParentFile();
        if (dataDirectory.isDirectory() == false)
        {
          throw new ReportProcessingException("DataDirectory is invalid: " + dataDirectory);
        }
      }
      else if (dataDirectory.exists() == false)
      {
        if (dataDirectory.mkdirs() == false)
View Full Code Here

    {
      throw re;
    }
    catch (Exception re)
    {
      throw new ReportProcessingException("Failed to process the report", re);
    }
    finally
    {
      try
      {
View Full Code Here

    {
      throw re;
    }
    catch (Exception re)
    {
      throw new ReportProcessingException("Failed to process the report", re);
    }
  }
View Full Code Here

    targetFile = new File(targetFileName);
    if (targetFile.exists())
    {
      if (targetFile.delete() == false)
      {
        throw new ReportProcessingException(messages.getErrorString(
            "PdfExportTask.ERROR_0001_TARGET_EXISTS")); //$NON-NLS-1$
      }
    }
  }
View Full Code Here

   */
  public void run()
  {
    if (isValid() == false)
    {
      setError(new ReportProcessingException("Error: The task is not configured properly."));
      return;
    }

    setError(null);
    try
View Full Code Here

   */
  public void run()
  {
    if (isValid() == false)
    {
      setError(new ReportProcessingException("Error: The task is not configured properly."));
      return;
    }

    setError(null);
    try
View Full Code Here

   */
  public void run()
  {
    if (isValid() == false)
    {
      setError(new ReportProcessingException("Error: The task is not configured properly."));
      return;
    }

    setError(null);
    try
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.ReportProcessingException

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.