Package org.pentaho.reporting.libraries.repository

Examples of org.pentaho.reporting.libraries.repository.ContentLocation


    try
    {
      final ArrayList entityNames = new ArrayList();
      entityNames.add(dataEntity.getName());

      ContentLocation location = dataEntity.getParent();
      while (location != null)
      {
        entityNames.add(location.getName());
        location = location.getParent();
      }

      final ArrayList contentNames = new ArrayList();
      location = dataEntity.getRepository().getRoot();

      while (location != null)
      {
        contentNames.add(location.getName());
        location = location.getParent();
      }

      // now remove all path elements that are equal ..
      while (contentNames.isEmpty() == false && entityNames.isEmpty() == false)
      {
View Full Code Here


        }

        case HTML:
        {
          final StreamRepository targetRepository = new StreamRepository(outputStream);
          final ContentLocation targetRoot = targetRepository.getRoot();
          final HtmlOutputProcessor outputProcessor = new StreamHtmlOutputProcessor(report.getConfiguration());
          final HtmlPrinter printer = new AllItemsHtmlPrinter(report.getResourceManager());
          printer.setContentWriter(targetRoot, new DefaultNameGenerator(targetRoot, "index", "html"));
          printer.setDataWriter(null, null);
          printer.setUrlRewriter(new FileSystemURLRewriter());
View Full Code Here

        final File tempDir = createTemporaryDirectory("report-designer-html-preview");//$NON-NLS-1$

        try
        {
          final FileRepository targetRepository = new FileRepository(tempDir);
          final ContentLocation targetRoot = targetRepository.getRoot();


          ReportProcessor reportProcessor;
          ReportStructureValidator validator = new ReportStructureValidator();
          if (validator.isValidForFastProcessing(report) == false)
View Full Code Here

    {
      return;
    }
    final MasterReport report = createTestReport();
    final StreamRepository targetRepository = new StreamRepository(new NullOutputStream());
    final ContentLocation targetRoot = targetRepository.getRoot();

    final HtmlOutputProcessor outputProcessor = new StreamHtmlOutputProcessor(report.getConfiguration());
    final HtmlPrinter printer = new ValidatingHtmlPrinter(report.getResourceManager());
    printer.setContentWriter(targetRoot, new DefaultNameGenerator(targetRoot, "index", "html"));
    printer.setDataWriter(null, null);
View Full Code Here

    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);
View Full Code Here

    try
    {
      final MasterReport masterReport = getReport();
      final Configuration configuration = masterReport.getConfiguration();

      final ContentLocation contentLocation = getBodyContentLocation();
      final NameGenerator nameGenerator = getBodyNameGenerator();
      final ContentItem contentItem =
          contentLocation.createItem(nameGenerator.generateName(null, "text/xml"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final XmlTableOutputProcessor outputProcessor =
View Full Code Here

    try
    {
      final MasterReport masterReport = getReport();
      final Configuration configuration = masterReport.getConfiguration();

      final ContentLocation contentLocation = getBodyContentLocation();
      final NameGenerator nameGenerator = getBodyNameGenerator();
      final ContentItem contentItem =
          contentLocation.createItem(nameGenerator.generateName(null, "application/rtf"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final FlowRTFOutputProcessor outputProcessor =
View Full Code Here

    try
    {
      final MasterReport masterReport = getReport();
      final Configuration configuration = masterReport.getConfiguration();

      final ContentLocation contentLocation = getBodyContentLocation();
      final NameGenerator nameGenerator = getBodyNameGenerator();
      final ContentItem contentItem =
          contentLocation.createItem(nameGenerator.generateName(null, "application/rtf"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final StreamRTFOutputProcessor outputProcessor =
View Full Code Here


    try
    {
      final ZipRepository zipRepository = new ZipRepository(new NullOutputStream());
      final ContentLocation root = zipRepository.getRoot();
      final ContentLocation data = RepositoryUtilities.createLocation
          (zipRepository, RepositoryUtilities.splitPath("data", "/"));

      final DebugFlowOutputProcessor outputProcessor = new DebugFlowOutputProcessor();

      final HtmlPrinter printer = new AllItemsHtmlPrinter(report.getResourceManager());
View Full Code Here

    try
    {
      final MasterReport masterReport = getReport();
      final Configuration configuration = masterReport.getConfiguration();

      final ContentLocation contentLocation = getBodyContentLocation();
      final NameGenerator nameGenerator = getBodyNameGenerator();
      final ContentItem contentItem =
          contentLocation.createItem(nameGenerator.generateName(null, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final PageableExcelOutputProcessor outputProcessor =
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.repository.ContentLocation

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.