Package org.pentaho.reporting.libraries.docbundle

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


      try
      {
        final String defaultMessage = ActionMessages.getString("Translations.DefaultContent");

        final MemoryDocumentBundle bundle = (MemoryDocumentBundle) report.getBundle();
        final OutputStream outputStream = bundle.createEntry("translations.properties", "text/plain");// NON-NLS
        outputStream.write(defaultMessage.getBytes("ISO-8859-1"));// NON-NLS
        outputStream.close();
        bundle.getWriteableDocumentMetaData().setEntryAttribute("translations.properties", "sticky", "true");// NON-NLS
      }
      catch (Exception ex)
      {
        // ignore, its not that important ..
        DebugLog.log("Failed to created default translation entry", ex); // NON-NLS
View Full Code Here


    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());
    }

    final Object visible =
        resource.getBundle().getMetaData().getBundleAttribute(ClassicEngineBoot.METADATA_NAMESPACE, "visible");//NON-NLS
    if ("true".equals(visible))//NON-NLS
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.