Package org.pentaho.reporting.libraries.resourceloader

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.create()


      if (key == null)
      {
        return null;
      }

      final Resource resource = resManager.create(key, contentBase, ContentType.TARGETS);
      final Object resourceContent = resource.getResource();
      if (resourceContent instanceof DrawableWrapper)
      {
        return resourceContent;
      }
View Full Code Here


      else
      {
        target = SubReport.class;
      }

      final Resource resource = resManager.create(key, contentBase, target);
      final Object resourceContent = resource.getResource();
      if (resourceContent instanceof Element)
      {
        return resourceContent;
      }
View Full Code Here

      try
      {
        final ResourceManager mgr = new ResourceManager();
        mgr.registerDefaults();
        final ResourceKey key = mgr.createKey(target);
        final Resource resource = mgr.create(key, null, DatabaseConnectionCollection.class);
        final DatabaseConnectionCollection collection = (DatabaseConnectionCollection) resource.getResource();
        for (final IDatabaseConnection connection : collection.getConnections())
        {
          final String id = connection.getId();
          final String name = connection.getName();
View Full Code Here

      if (key.getParent() != null)
      {
        final ResourceManager resourceManager = getRootHandler().getResourceManager();
        try
        {
          final Resource bundleData = resourceManager.create(key.getParent(), null, DocumentBundle.class);
          final DocumentBundle documentBundle = (DocumentBundle) bundleData.getResource();
          report.setBundle(documentBundle);

          final DocumentMetaData metaData = documentBundle.getMetaData();
          final int versionMajorRaw = getBundleAttribute(metaData, "prpt-spec.version.major");
View Full Code Here

      else
      {
        throw new ParseException("Illegal State: No valid report", getRootHandler().getDocumentLocator());
      }

      final Resource resource = resourceManager.create(target, rootHandler.getContext(), targetType);
      dc.add(resource);

    }
    catch (ResourceKeyCreationException e)
    {
View Full Code Here

      final String name = (String) it.next();
      map.put(new FactoryParameterKey(name), helperObjects.get(name));
    }

    final ResourceKey key = resourceManager.createKey(file, map);
    final Resource resource = resourceManager.create(key, contextKey, MasterReport.class);
    return (MasterReport) resource.getResource();
  }

  /**
   * @noinspection IOResourceOpenedButNotSafelyClosed
View Full Code Here

      final String name = (String) it.next();
      map.put(new FactoryParameterKey(name), helperObjects.get(name));
    }

    final ResourceKey key = resourceManager.createKey(file, map);
    final Resource resource = resourceManager.create(key, contextKey, MasterReport.class);
    return (MasterReport) resource.getResource();
  }

  /**
   * Parses the report from a given SAX-InputSource.
View Full Code Here

      final String name = (String) it.next();
      map.put(new FactoryParameterKey(name), helperObjects.get(name));
    }

    final ResourceKey key = resourceManager.createKey(bytes, map);
    final Resource resource = resourceManager.create(key, contextKey, MasterReport.class);
    return (MasterReport) resource.getResource();
  }

  private MasterReport parseReportDirectly(final InputSource input, final URL contentBase)
      throws ResourceKeyCreationException, ResourceCreationException, ResourceLoadingException
View Full Code Here

      {
        try
        {
          ResourceManager resourceManager = getResourceManager();
          ResourceKey resource = imageContainer.getResourceKey();
          final Resource imageWrapped = resourceManager.create(resource, null, Image.class);
          final Image image = (Image) imageWrapped.getResource();

          if (drawImage(content, image, instance))
          {
            drawImageMap(content);
View Full Code Here

        try
        {
            final ResourceKey key =
                    resourceManager.deriveKey(contextKey, "styles.xml");
            final Resource resource =
                    resourceManager.create(key, contextKey, OfficeStylesCollection.class);
            final OfficeStylesCollection styles =
                    (OfficeStylesCollection) resource.getResource();
            if (styles != null)
            {
                return styles;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.