Examples of ResourceKey


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

  public static ResourceKey getContextKey(final AbstractReportDefinition reportDefinition)
  {
    AbstractReportDefinition e = reportDefinition;
    while (e != null)
    {
      final ResourceKey base = e.getContentBase();
      if (base != null)
      {
        return base;
      }
      final Section parentSection = e.getParentSection();
View Full Code Here

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

            ("URL-image cannot be rendered, as it was declared to be not loadable: " +
                imageContainer.getSourceURLString());
      }
      else
      {
        final ResourceKey resource = imageContainer.getResourceKey();
        if (resource == null)
        {
          PdfLogicalPageDrawable.logger.info("URL-image cannot be rendered, as it did not return a valid URL.");
        }
        else
View Full Code Here

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

   */
  public static Configuration createDefaultConfiguration(final MasterReport report)
  {
    final ModifiableConfiguration repConf =
        new HierarchicalConfiguration(report.getReportConfiguration());
    final ResourceKey contentBase = report.getContentBase();
    if (contentBase != null)
    {
      final ResourceManager resourceManager = report.getResourceManager();
      final URL value = resourceManager.toURL(contentBase);
      if (value != null)
View Full Code Here

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

  private ImageData getImageData(final ImageContainer image,
                                 final String encoderType,
                                 final float quality,
                                 final boolean alpha) throws IOException, UnsupportedEncoderException
  {
    ResourceKey url = null;
    // The image has an assigned URL ...
    if (image instanceof URLImageContainer)
    {
      final URLImageContainer urlImage = (URLImageContainer) image;
View Full Code Here

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

    // of content we deal with.
    // todo: Check whether the raw-object would be understood by the browser
    if (rawObject instanceof URLImageContainer)
    {
      final URLImageContainer urlImageContainer = (URLImageContainer) rawObject;
      final ResourceKey source = urlImageContainer.getResourceKey();
      if (source != null)
      {
        // Cool, we have access to the raw-data. Thats always nice as we
        // dont have to recode the whole thing. We can only recode images, not drawables.
        if (contentGenerator.isRegistered(source) == false)
View Full Code Here

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

        if (attribute instanceof ResourceKey == false)
        {
          continue;
        }

        final ResourceKey resourceKey = (ResourceKey) attribute;
        final ResourceKey replacementKey = processResourceKeyAttribute(documentBundle, report, resourceKey);
        if (replacementKey != null)
        {
          element.setAttribute(attributeDescription.getNameSpace(), attributeDescription.getName(), replacementKey);
        }
      }
View Full Code Here

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

        newFactoryParameters = new HashMap();
        newFactoryParameters.put(ClassicEngineFactoryParameters.ORIGINAL_VALUE, originalValue);
      }

      // Embed the resource
      final ResourceKey newResourceKey = WriteableDocumentBundleUtils.embedResource
          (documentBundle, report.getResourceManager(), resourceKey, pattern, mimeType, newFactoryParameters);
      if (log.isDebugEnabled())
      {
        log.debug("Resouce Embedded: [" + newResourceKey.getIdentifierAsString() + "]");
      }
      return newResourceKey;
    }
    catch (Exception e)
    {
View Full Code Here

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

    }
  }

  public static boolean isEmbeddedKey(final MasterReport report, final ResourceKey resourceKey)
  {
    final ResourceKey contentBase = report.getContentBase();
    if (contentBase == null)
    {
      return false;
    }

    ResourceKey bundleKey = contentBase.getParent();
    while (bundleKey != null)
    {
      if (bundleKey.equals(resourceKey.getParent()))
      {
        return true;
      }
      bundleKey = bundleKey.getParent();
    }
    return false;
  }
View Full Code Here

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

      {
        LogicalPageDrawable.logger.info("URL-image cannot be rendered, as it was declared to be not loadable.");
        return;
      }

      final ResourceKey sourceURL = imageContainer.getResourceKey();
      if (sourceURL == null)
      {
        LogicalPageDrawable.logger.info("URL-image cannot be rendered, as it did not return a valid URL.");
      }
View Full Code Here

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

    Image image = null;
    // The image has an assigned URL ...
    if (reference instanceof URLImageContainer)
    {
      final URLImageContainer urlImage = (URLImageContainer) reference;
      final ResourceKey url = urlImage.getResourceKey();
      // if we have an source to load the image data from ..
      if (url != null && urlImage.isLoadable())
      {
        if (reference instanceof LocalImageContainer)
        {
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.