Package org.pentaho.reporting.libraries.resourceloader

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager


      throw new ParseException("Mandatory attribute 'href' is missing.", getLocator());
    }

    try
    {
      final ResourceManager resourceManager = getRootHandler().getResourceManager();
      final ResourceKey key = resourceManager.deriveKey(getRootHandler().getSource(), href);
      final Resource resource = resourceManager.create(key, null, MasterReport.class);
      report = (MasterReport) resource.getResource();
    }
    catch (ResourceException re)
    {
      throw new ParseException("Mandatory attribute 'href' is not pointing to a valid report.", re, getLocator());
View Full Code Here


    ClassicEngineBoot.getInstance().start();
  }

  public void testAllReports() throws ResourceException
  {
    final ResourceManager resManager = new ResourceManager();
    resManager.registerDefaults();

    for (int i = 0; i < REPORTS.length; i++)
    {
      final String report = REPORTS[i];
      final URL url = ParseLegacyReportsTest.class.getResource(report);
      if (url == null)
      {
        throw new IllegalStateException("No definition for " + report);
      }

      try
      {
        final Resource res = resManager.createDirectly(url, MasterReport.class);
        final Object resource = res.getResource();
        assertNotNull(resource);
      }
      finally
      {
View Full Code Here

  public void testRunner() throws ResourceException, ReportProcessingException
  {
    final URL url = getClass().getResource("prd-2933.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final EventMonitorFunction eventMonitorFunction = new EventMonitorFunction("Name");
    eventMonitorFunction.setDeepTraversing(true);
    report.addExpression(eventMonitorFunction);
View Full Code Here

  private ResourceManager resourceManager;

  public LookAndFeelStep()
  {
    super();
    this.resourceManager = new ResourceManager();
    this.resourceManager.registerDefaults();
    loadTemplates();
  }
View Full Code Here

  }

  public ImageMap parseFromString (final String imageMapXml)
      throws ResourceKeyCreationException, ResourceCreationException, ResourceLoadingException
  {
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();

    final ImageMapXmlResourceFactory resourceFactory = new ImageMapXmlResourceFactory();
    final InputSource source = new InputSource();
    source.setCharacterStream(new StringReader(imageMapXml));
    return (ImageMap) resourceFactory.parseDirectly
View Full Code Here

    private DocumentMetaData documentMetaData;
    private ReportEnvironment reportEnvironment;

    private InternalParameterContext()
    {
      this.resourceManager = new ResourceManager();
      this.resourceManager.registerDefaults();

      dataFactory = new TableDataFactory();
      resourceBundleFactory = new DefaultResourceBundleFactory();
      configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
View Full Code Here

        close();
      }
      if (report == null)
      {

        this.resourceManager = new ResourceManager();
        this.resourceManager.registerDefaults();

        dataFactory = new TableDataFactory();
        resourceBundleFactory = new DefaultResourceBundleFactory();
        configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
View Full Code Here

  public void testRunner() throws ResourceException, ReportProcessingException
  {
    final URL url = getClass().getResource("prd-2884.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final EventMonitorFunction eventMonitorFunction = new EventMonitorFunction("Name");
    eventMonitorFunction.setDeepTraversing(true);
    report.addExpression(eventMonitorFunction);
View Full Code Here

  public void testRunner2() throws ResourceException, ReportProcessingException
  {
    final URL url = getClass().getResource("prd-2884-2.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();

    final PrintReportProcessor prc = new PrintReportProcessor(report);
    if (prc.isError())
    {
View Full Code Here

  public MailDefinition()
  {
    this.parameterDefinition = new DefaultParameterDefinition();
    this.resourceBundleFactory = new DefaultResourceBundleFactory();
    this.resourceManager = new ResourceManager();
    this.resourceManager.registerDefaults();
    this.parameterValues = new ReportParameterValues();
    this.dataFactory = new CompoundDataFactory();
    this.headers = new ArrayList();
    this.attachmentReports = new ArrayList();
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.resourceloader.ResourceManager

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.