Package org.pentaho.reporting.libraries.docbundle

Examples of org.pentaho.reporting.libraries.docbundle.MemoryDocumentBundle


      final MasterReport resource = (MasterReport) directly.getResource();
      final DocumentBundle bundle = resource.getBundle();
      if (bundle == null)
      {
        // Ok, that should not happen if we work with the engine's parsers, but better safe than sorry.
        final MemoryDocumentBundle documentBundle = new MemoryDocumentBundle(resource.getContentBase());
        documentBundle.getWriteableDocumentMetaData().setBundleType(ClassicEngineBoot.BUNDLE_TYPE);
        resource.setBundle(documentBundle);
        resource.setContentBase(documentBundle.getBundleMainKey());
      }
      else
      {
        final MemoryDocumentBundle mem = new MemoryDocumentBundle(resource.getContentBase());
        BundleUtilities.copyStickyInto(mem, bundle);
        BundleUtilities.copyMetaData(mem, bundle);
        resource.setBundle(mem);
        resource.setContentBase(mem.getBundleMainKey());
      }

      return (AbstractReportDefinition) resource.derive();
    }
    catch (Exception ex)
View Full Code Here


    }

    final DocumentBundle reportBundle = report.getBundle();
    if (reportBundle == null)
    {
      this.writeReport(bundle, report, new MemoryDocumentBundle());
    }
    else
    {
      this.writeReport(bundle, report, reportBundle);
    }
View Full Code Here

    if (file == null)
    {
      throw new NullPointerException();
    }

    final MemoryDocumentBundle outputBundle = new MemoryDocumentBundle();
    final BundleWriter writer = new BundleWriter();
    writer.writeReport(outputBundle, report);
    BundleUtilities.writeAsZip(file, outputBundle);
  }
View Full Code Here

    }
    if (out == null)
    {
      throw new NullPointerException();
    }
    final MemoryDocumentBundle documentBundle = new MemoryDocumentBundle();
    final BundleWriter writer = new BundleWriter();
    writer.writeReport(documentBundle, report);
    BundleUtilities.writeAsZip(out, documentBundle);
  }
View Full Code Here

    }
    if (file == null)
    {
      throw new NullPointerException();
    }
    final MemoryDocumentBundle documentBundle = new MemoryDocumentBundle();
    final BundleWriter writer = new BundleWriter();
    writer.writeReport(documentBundle, report);
    BundleUtilities.writeToDirectory(file, documentBundle);
  }
View Full Code Here

    // Add a listener that will handle keeping the ResourceManager in sync with changes to the Document Bundle
    addReportModelListener(new DocumentBundleChangeHandler());

    this.reportEnvironment = new DefaultReportEnvironment(getConfiguration());
    this.parameterDefinition = new DefaultParameterDefinition();
    final MemoryDocumentBundle documentBundle = new MemoryDocumentBundle();
    documentBundle.getWriteableDocumentMetaData().setBundleType(ClassicEngineBoot.BUNDLE_TYPE);
    documentBundle.getWriteableDocumentMetaData().setBundleAttribute
        (ODFMetaAttributeNames.Meta.NAMESPACE, ODFMetaAttributeNames.Meta.CREATION_DATE, new Date());
    setBundle(documentBundle);

    setContentBase(documentBundle.getBundleMainKey());
  }
View Full Code Here

  {
    stream.defaultReadObject();

    if (getBundle() == null)
    {
      final MemoryDocumentBundle documentBundle = new MemoryDocumentBundle(getContentBase());
      documentBundle.getWriteableDocumentMetaData().setBundleType(ClassicEngineBoot.BUNDLE_TYPE);
      documentBundle.getWriteableDocumentMetaData().setBundleAttribute
          (ODFMetaAttributeNames.Meta.NAMESPACE, ODFMetaAttributeNames.Meta.CREATION_DATE, new Date());
      setBundle(documentBundle);

      setContentBase(documentBundle.getBundleMainKey());
      setResourceManager(documentBundle.getResourceManager());
    }
    addReportModelListener(new DocumentBundleChangeHandler());
  }
View Full Code Here

    if (file == null)
    {
      throw new NullPointerException();
    }

    final MemoryDocumentBundle documentBundle = new MemoryDocumentBundle();
    final MailDefinitionBundleWriter writer = new MailDefinitionBundleWriter();
    writer.writeMailDefinition(documentBundle, report ,null);
    BundleUtilities.writeAsZip(file, documentBundle);
  }
View Full Code Here

    }
    if (out == null)
    {
      throw new NullPointerException();
    }
    final MemoryDocumentBundle documentBundle = new MemoryDocumentBundle();
    final MailDefinitionBundleWriter writer = new MailDefinitionBundleWriter();
    writer.writeMailDefinition(documentBundle, report, null);
    BundleUtilities.writeAsZip(out, documentBundle);
  }
View Full Code Here

    }
    if (file == null)
    {
      throw new NullPointerException();
    }
    final MemoryDocumentBundle documentBundle = new MemoryDocumentBundle();
    final MailDefinitionBundleWriter writer = new MailDefinitionBundleWriter();
    writer.writeMailDefinition(documentBundle, report, null);
    BundleUtilities.writeToDirectory(file, documentBundle);
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.docbundle.MemoryDocumentBundle

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.