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

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


      final ResourceData resourceData = resourceManager.load(source);
      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 = new BufferedInputStream(resourceData.getResourceAsStream(resourceManager));
          try
          {
            final OutputStream outputStream = new BufferedOutputStream(item.getOutputStream());
            try
            {
              IOUtils.getInstance().copyStreams(stream, outputStream);
            }
            finally
View Full Code Here

      {
        return null;
      }
      // write the encoded picture ...
      final String filename = IOUtils.getInstance().stripFileExtension(data.getOriginalFileName());
      final ContentItem dataFile = dataLocation.createItem
          (dataNameGenerator.generateName(filename, data.getMimeType()));
      final String contentURL = urlRewriter.rewrite(documentContentItem, dataFile);

      // a png encoder is included in JCommon ...
      final OutputStream out = new BufferedOutputStream(dataFile.getOutputStream());
      try
      {
        out.write(data.getImageData());
        out.flush();
      }
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, "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, "text/xml"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final XmlPageOutputProcessor outputProcessor =
            new XmlPageOutputProcessor(configuration, outputStream);
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/vnd.openxmlformats-officedocument.spreadsheetml.sheet"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final PageableExcelOutputProcessor outputProcessor =
            new PageableExcelOutputProcessor(configuration, outputStream, masterReport.getResourceManager());
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/rtf"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final FlowRTFOutputProcessor outputProcessor =
            new FlowRTFOutputProcessor(configuration, outputStream, masterReport.getResourceManager());
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, "text/csv"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final StreamCSVOutputProcessor outputProcessor =
            new StreamCSVOutputProcessor(configuration, outputStream);
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/vnd.ms-excel"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final StreamExcelOutputProcessor outputProcessor =
            new StreamExcelOutputProcessor(configuration, outputStream, masterReport.getResourceManager());
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/rtf"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final StreamRTFOutputProcessor outputProcessor =
            new StreamRTFOutputProcessor(configuration, outputStream, masterReport.getResourceManager());
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.