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

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


    throw new ReportProcessingException("Cannot advance beyond finish!");
  }

  public ProcessState commit(final ProcessState state) throws ReportProcessingException
  {
    throw new ReportProcessingException("Cannot advance beyond finish!");
  }
View Full Code Here


    {
      state.layoutProcess = (LayoutProcess) layoutProcess.clone();
    }
    catch (final CloneNotSupportedException e)
    {
      throw new ReportProcessingException("Clone must not fail here", e);
    }
    return state;
  }
View Full Code Here

    final CachingDataFactory dataFactory = state.dataFactoryManager.restore
        (FunctionStorageKey.createKey(parentStateKey, state.getReport()));
    if (dataFactory == null)
    {
      throw new ReportProcessingException("No data factory on restart()? Somewhere we went wrong.");
    }

    final DefaultFlowController fc = state.getFlowController();
    final DefaultFlowController cfc = fc.restart();
    final DefaultFlowController qfc = cfc.performQuery
View Full Code Here

      this.insertationPointId = insertationPointId;
      this.processType = processType;
    }
    catch (CloneNotSupportedException cne)
    {
      throw new ReportProcessingException("Failed to clone subreport?", cne);
    }
  }
View Full Code Here

    {
      return (SubReport) subreport.clone();
    }
    catch (CloneNotSupportedException e)
    {
      throw new ReportProcessingException("Failed to clone subreport?", e);
    }
  }
View Full Code Here

      // derive would regenerate instance-IDs, which is not advisable.
      storage.put(key, subReport.clone());
    }
    catch (CloneNotSupportedException cne)
    {
      throw new ReportProcessingException("Failed to store subreport", cne);
    }
  }
View Full Code Here

      // derive would regenerate instance-IDs, which is not advisable.
      return (SubReport) subReport.clone();
    }
    catch (CloneNotSupportedException e)
    {
      throw new ReportProcessingException("Failed to restore subreport", e);
    }
  }
View Full Code Here

          return new DummyCrosstabSpecification(next.getProcessKey());
        }
        return cs;
      }
    }
    throw new ReportProcessingException("Failed to locate crosstab-spec, cannot continue.");
  }
View Full Code Here

      this.pageBox = reportLayouter.layout();
    }
    catch (final Exception e)
    {
      //noinspection ThrowableInstanceNeverThrown
      UncaughtExceptionsModel.getInstance().addException(new ReportProcessingException
          ("Fatal Layouter Error: This report cannot be processed due to a unrecoverable error in the reporting-engine. " +
              "Please file a bug-report.", e));

      if (warnMigration)
      {
View Full Code Here

        return null;
      }
      else
      {
        logger.info("EMail Task failed:", processTask.getError());
        throw new ReportProcessingException("EMail Task failed", processTask.getError());
      }
    }

    final EmailRepository repository = new EmailRepository(session);
    final MimeBodyPart messageBodyPart = repository.getBodypart();
    final ByteArrayDataSource dataSource = new ByteArrayDataSource(bout.toByteArray(), processTask.getReportMimeType());
    messageBodyPart.setDataHandler(new DataHandler(dataSource));

    final int attachmentsSize = mailDefinition.getAttachmentCount();
    for (int i = 0; i < attachmentsSize; i++)
    {
      final MasterReport report = mailDefinition.getAttachmentReport(i);
      final String type = mailDefinition.getAttachmentType(i);
      final ContentLocation location = repository.getRoot();
      final ContentLocation bulkLocation = location.createLocation("attachment-" + i);

      final ReportProcessTask attachmentProcessTask = registry.createProcessTask(type);
      attachmentProcessTask.setBodyContentLocation(bulkLocation);
      attachmentProcessTask.setBodyNameGenerator(new DefaultNameGenerator(bulkLocation, "report"));
      attachmentProcessTask.setReport(report);
      if (attachmentProcessTask instanceof MultiStreamReportProcessTask)
      {
        final MultiStreamReportProcessTask mtask = (MultiStreamReportProcessTask) attachmentProcessTask;
        mtask.setBulkLocation(bulkLocation);
        mtask.setBulkNameGenerator(new DefaultNameGenerator(bulkLocation, "data"));
        mtask.setUrlRewriter(new MailURLRewriter());
      }
      attachmentProcessTask.run();

      if (attachmentProcessTask.isTaskSuccessful() == false)
      {
        if (attachmentProcessTask.isTaskAborted())
        {
          logger.info("EMail Task received interrupt.");
        }
        else
        {
          logger.info("EMail Task failed:", attachmentProcessTask.getError());
          throw new ReportProcessingException("EMail Task failed", attachmentProcessTask.getError());
        }
      }
    }

    return repository.getEmail();
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.