Package org.pentaho.reporting.libraries.resourceloader

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


    private OfficeParserUtil()
    {
        props = new DefaultConfiguration();

        final ResourceManager resourceManager = new ResourceManager();
        resourceManager.registerDefaults();
        try
        {
            final Resource res = resourceManager.createDirectly("res://com/sun/star/report/pentaho/parser/selectors.properties", Properties.class);
            final Properties resProps = (Properties) res.getResource();
            props.putAll(resProps);
        }
        catch (ResourceException e)
        {
View Full Code Here


                          SACMediaList media,
                          String defaultNamespaceURI)
      throws CSSException
  {
    //  instantiate a new parser and parse the stylesheet.
    final ResourceManager manager = getResourceManager();
    if (manager == null)
    {
      // there is no source set, so we have no resource manager, and thus
      // we do no parsing.
      //
      // This should only be the case if we parse style-values; in that case
      // include-statement are not supported anyway.
      return;
    }
    try
    {
      CSSParserContext.getContext().setDefaultNamespace(defaultNamespaceURI);
      final ResourceKey key;
      if (source == null)
      {
        key = manager.createKey(uri);
      }
      else
      {
        key = manager.deriveKey(source, uri);
      }

      final Resource res = manager.create(key, source, StyleSheet.class);
      if (res == null)
      {
        return;
      }
      final StyleSheet styleSheet = (StyleSheet) res.getResource();
View Full Code Here

            throw new PublishException(PublishException.ERROR_FAILED, result);
          }
        }

        final byte[] responseBody = method.getResponseBody();
        final ResourceManager manager = new ResourceManager();
        final Resource resource = manager.createDirectly(responseBody, ParameterDocument.class);
        final ParameterDocument o = (ParameterDocument) resource.getResource();
        parameters = o.getParameter();
      }
      catch (Exception e)
      {
View Full Code Here

  }

  public void testLayoutEmptyBand() throws Exception
  {
    final URL url = ReportLayouterTest.class.getResource("report-layouter-01.prpt");
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource resource = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) resource.getResource();

    final ReportLayouter l = new ReportLayouter
        (new ReportRenderContext(report, report, null, new GlobalAuthenticationStore()));
    final LogicalPageBox layout = l.layout();
View Full Code Here

  public void testReportHeader () throws Exception
  {
    final URL resource = getClass().getResource("Prd-4634.prpt");
    assertNotNull(resource);

    final ResourceManager mgr = new ResourceManager();
    mgr.registerDefaults();
    final MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();

    final GlobalAuthenticationStore globalAuthenticationStore = new GlobalAuthenticationStore();
    final ReportRenderContext reportContext =
        new ReportRenderContext(report, report, null, globalAuthenticationStore);
    final TestRootBandRenderer r = new TestRootBandRenderer(report.getReportHeader(), reportContext);
View Full Code Here

  public void testReportFooter () throws Exception
  {
    final URL resource = getClass().getResource("Prd-4634.prpt");
    assertNotNull(resource);

    final ResourceManager mgr = new ResourceManager();
    mgr.registerDefaults();
    final MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();

    final GlobalAuthenticationStore globalAuthenticationStore = new GlobalAuthenticationStore();
    final ReportRenderContext reportContext =
        new ReportRenderContext(report, report, null, globalAuthenticationStore);
    final ReportFooter reportFooter = report.getReportFooter();
View Full Code Here

  public void testPageFooter () throws Exception
  {
    final URL resource = getClass().getResource("Prd-4634.prpt");
    assertNotNull(resource);

    final ResourceManager mgr = new ResourceManager();
    mgr.registerDefaults();
    final MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();

    final GlobalAuthenticationStore globalAuthenticationStore = new GlobalAuthenticationStore();
    final ReportRenderContext reportContext =
        new ReportRenderContext(report, report, null, globalAuthenticationStore);
    final TestRootBandRenderer r = new TestRootBandRenderer(report.getPageFooter(), reportContext);
View Full Code Here

  public void testWatermarkOverlap() throws Exception
  {
    final URL resource = getClass().getResource("Prd-4638.prpt");
    assertNotNull(resource);

    final ResourceManager mgr = new ResourceManager();
    mgr.registerDefaults();
    final MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();

    final GlobalAuthenticationStore globalAuthenticationStore = new GlobalAuthenticationStore();
    final ReportRenderContext reportContext =
        new ReportRenderContext(report, report, null, globalAuthenticationStore);
    final TestRootBandRenderer r = new TestRootBandRenderer(report.getPageFooter(), reportContext);
View Full Code Here

  public void testPrd2054() throws
      ResourceException, ReportProcessingException, ContentProcessingException
  {
    final URL url = getClass().getResource("Prd-2054.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();

    ReportRenderContext rcontext = new ReportRenderContext(report, report, null, new GlobalAuthenticationStore());
    final ReportLayouter layouter = new ReportLayouter(rcontext);
    final LogicalPageBox logicalPageBox = layouter.layout();
View Full Code Here

  public void testOutsidePageFooter () throws Exception
  {
    final URL resource = getClass().getResource("Prd-4637.prpt");
    assertNotNull(resource);

    final ResourceManager mgr = new ResourceManager();
    mgr.registerDefaults();
    final MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();

    final GlobalAuthenticationStore globalAuthenticationStore = new GlobalAuthenticationStore();
    final ReportRenderContext reportContext =
        new ReportRenderContext(report, report, null, globalAuthenticationStore);
    final TestRootBandRenderer r = new TestRootBandRenderer(report.getPageFooter(), reportContext);
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.