Package org.pentaho.reporting.engine.classic.core.modules.parser.bundle.writer

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.bundle.writer.BundleWriterException


        writePreProcessor(xmlWriter, processor);
        xmlWriter.writeCloseTag();
      }
      catch (IntrospectionException e)
      {
        throw new BundleWriterException("Failed to write pre-processor", e);
      }
      catch (BeanException e)
      {
        throw new BundleWriterException("Failed to write pre-processor", e);
      }
    }
    if (ExpressionWriterUtility.isElementLayoutExpressionActive(state))
    {
      xmlWriter.writeTag(BundleNamespaces.LAYOUT, "layout-processors", XmlWriterSupport.OPEN);
View Full Code Here


    // template name as its name.
    final TemplateDescription templateDescription = tc.getDescription(template);

    if (templateDescription == null)
    {
      throw new BundleWriterException("Unknown template type: " + template);
    }

    // create the parent description before the template description is filled.
    final TemplateDescription parentTemplate = (TemplateDescription) templateDescription.getInstance();

    try
    {
      templateDescription.setParameterFromObject(template);

      final TemplateWriter templateWriter = new TemplateWriter(writerContext, xmlWriter, templateDescription,
          parentTemplate);
      templateWriter.write();
    }
    catch (ObjectFactoryException ofe)
    {
      throw new BundleWriterException("Error while preparing the template", ofe);
    }
    catch (ReportWriterException e)
    {
      throw new BundleWriterException("Failed to write legacy template " + template, e);
    }
  }
View Full Code Here

          getSuperClassObjectDescription(datasource.getClass(), null);
    }

    if (od == null)
    {
      throw new BundleWriterException("Unable to resolve DataSource: " + datasource.getClass());
    }

    final DataSourceCollector dataSourceCollector =
        writerContext.getDataSourceCollector();
    final String dsname = dataSourceCollector.getDataSourceName(od);
    if (dsname == null)
    {
      throw new BundleWriterException("No name for DataSource " + datasource);
    }

    xmlWriter.writeTag(ExtParserModule.NAMESPACE, "datasource", "type", dsname, XmlWriterSupport.OPEN);

    try
    {
      final DataSourceWriter dsWriter = new DataSourceWriter(writerContext, datasource, od, xmlWriter);
      dsWriter.write();
    }
    catch (ReportWriterException e)
    {
      throw new BundleWriterException("Failed to write legacy DataSource " + datasource, e);
    }

    xmlWriter.writeCloseTag();
  }
View Full Code Here

        {
          BundleUtilities.copyInto(bundle, relativePath, path, resourceManager);
        }
        catch (Exception e)
        {
          throw new BundleWriterException("Failed to copy content from key " + path, e);
        }
        AbstractElementWriteHandler.logger.debug("Copied " + path + " as " + relativePath);
      }
    }
  }
View Full Code Here

    {
      final DataFactory df = compoundDataFactory.get(i);
      final BundleDataFactoryWriterHandler writerHandler = BundleWriterUtilities.lookupWriteHandler(df);
      if (writerHandler == null)
      {
        throw new BundleWriterException("Unable to find writer-handler for data-factory " + df.getClass());
      }

      final String file = writerHandler.writeDataFactory(bundle, df, state);
      if (file == null)
      {
        throw new BundleWriterException("Data-factory writer did not create a file for " + df.getClass());
      }
      final String refFile = IOUtils.getInstance().createRelativePath(file, fileName);
      xmlWriter.writeTag(CompoundDataFactoryModule.NAMESPACE, "data-factory", "href", refFile,
          XmlWriterSupport.CLOSE);
    }
View Full Code Here

                xmlWriter.writeCloseTag();

              }
              catch (BeanException e)
              {
                throw new BundleWriterException("Unable to convert value at (row:" + row + ";column:" +
                    col + ") into a string." + value.getClass());
              }
            }

          }
          xmlWriter.writeCloseTag(); // row

        }

        xmlWriter.writeCloseTag(); // inline-table
      }

      xmlWriter.writeCloseTag();
      xmlWriter.close();
      return fileName;
    }
    catch (ReportDataFactoryException e)
    {
      throw new BundleWriterException
          ("This should not happen in the way we use the table-factory, but hey, better safe than sorry.");
    }
  }
View Full Code Here

      final boolean visible = rootBandDefinition.isVisible();
      attList.setAttribute(WizardCoreModule.NAMESPACE, "visible", String.valueOf(visible));
    }
    catch (BeanException e)
    {
      throw new BundleWriterException("Failed to write bundle", e);
    }
  }
View Full Code Here

      xmlWriter.writeTag(WizardCoreModule.NAMESPACE, "group-definition", attList, XmlWriter.CLOSE);

    }
    catch (BeanException e)
    {
      throw new BundleWriterException("Failed to write bundle", e);
    }

  }
View Full Code Here

      xmlWriter.close();
      return wizardFileState.getFileName();
    }
    catch (final ReportProcessingException e)
    {
      throw new BundleWriterException("Failed to load wizard-specifiation",e);
    }
  }
View Full Code Here

      xmlWriter.writeTag(WizardCoreModule.NAMESPACE, "detail-field", attList, XmlWriter.CLOSE);

    }
    catch (BeanException e)
    {
      throw new BundleWriterException("Failed to write bundle", e);
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.modules.parser.bundle.writer.BundleWriterException

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.