Package org.pentaho.reporting.libraries.repository

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


      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/plain"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final String cpiText = configuration.getConfigProperty
            ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.CharsPerInch");
View Full Code Here


      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/pdf"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final PdfOutputProcessor outputProcessor = new PdfOutputProcessor(configuration, outputStream);
        final PageableReportProcessor streamReportProcessor =
View Full Code Here

      final String mimeType = queryMimeType(resourceData);
      if (isValidImage(mimeType))
      {

        // lets do some voodo ..
        final ContentItem item = dataLocation.createItem
            (dataNameGenerator.generateName(extractFilename(resourceData), mimeType));
        if (item.isWriteable())
        {
          item.setAttribute(LibRepositoryBoot.REPOSITORY_DOMAIN,
              LibRepositoryBoot.CONTENT_TYPE, mimeType);

          // write it out ..
          final InputStream stream =
              resourceData.getResourceAsStream(resourceManager);
          final OutputStream outputStream = item.getOutputStream();
          IOUtils.getInstance().copyStreams
              (stream, outputStream);
          outputStream.close();
          stream.close();
View Full Code Here

    final PngEncoder encoder = new PngEncoder(image,
        PngEncoder.ENCODE_ALPHA, PngEncoder.FILTER_NONE, 5);
    final byte[] data = encoder.pngEncode();

    // write the encoded picture ...
    final ContentItem dataFile = dataLocation.createItem
        (dataNameGenerator.generateName("picture", "image/png"));

    // a png encoder is included in JCommon ...
    final OutputStream out = new BufferedOutputStream(dataFile.getOutputStream());
    out.write(data);
    out.flush();
    out.close();

    return urlRewriter.rewrite(documentContentItem, dataFile);
View Full Code Here

TOP

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

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.