Package org.pentaho.reporting.libraries.resourceloader

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


    }


    elementFactory.setContent(content);
    final ResourceManager resourceManager = getRootHandler().getResourceManager();
    elementFactory.setBaseURL(resourceManager.toURL(getRootHandler().getContext()));
  }

  protected ElementFactory getElementFactory()
  {
    return elementFactory;
View Full Code Here


    {
      throw new SAXException("Required attribute 'fieldname' is missing.");
    }
    elementFactory.setFieldname(fieldName);
    final ResourceManager resourceManager = getRootHandler().getResourceManager();
    elementFactory.setBaseURL(resourceManager.toURL(getRootHandler().getContext()));
  }

  protected ElementFactory getElementFactory()
  {
    return elementFactory;
View Full Code Here

        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)
      {
        repConf.setConfigProperty
            (AbstractXmlResourceFactory.CONTENTBASE_KEY, value.toExternalForm());
      }
View Full Code Here

  }

  private void handleSource(final PropertyAttributes atts)
  {
    final ResourceManager resourceManager = getRootHandler().getResourceManager();
    elementFactory.setBaseURL(resourceManager.toURL(getRootHandler().getContext()));
    elementFactory.setContent(atts.getValue(getUri(), ImageRefReadHandler.SRC_ATT));
  }


  protected ElementFactory getElementFactory()
View Full Code Here

    {
      if (ContentValues.DOCUMENT_URL.equals(content))
      {
        final ResourceKey baseKey = process.getContextKey();
        final ResourceManager resourceManager = process.getResourceManager();
        final URL url = resourceManager.toURL(baseKey);
        if (url != null)
        {
          return new StaticTextToken(url.toExternalForm());
        }
        return null;
View Full Code Here

    {
      if (ContentValues.DOCUMENT_URL.equals(content))
      {
        final ResourceKey baseKey = process.getContextKey();
        final ResourceManager resourceManager = process.getResourceManager();
        final URL url = resourceManager.toURL(baseKey);
        if (url != null)
        {
          return new StaticTextToken(url.toExternalForm());
        }
        return null;
View Full Code Here

      {
        if (ContentValues.DOCUMENT_URL.equals(content))
        {
          final ResourceKey baseKey = process.getContextKey();
          final ResourceManager resourceManager = process.getResourceManager();
          final URL url = resourceManager.toURL(baseKey);
          if (url != null)
          {
            return new StaticTextToken(url.toExternalForm());
          }
          return null;
View Full Code Here

        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)
      {
        repConf.setConfigProperty
            (AbstractXmlResourceFactory.CONTENTBASE_KEY, value.toExternalForm());
      }
View Full Code Here

          try
          {
            final ResourceData data = resourceManager.load(url);
            final byte[] imageData = data.getResource(resourceManager);
            final String mimeType = queryMimeType(imageData);
            final URL maybeRealURL = resourceManager.toURL(url);
            if (maybeRealURL != null)
            {
              final String originalFileName = IOUtils.getInstance().getFileName(maybeRealURL);
              return new ImageData(imageData, mimeType, originalFileName);
            }
View Full Code Here

        // by its URL
        final byte[] imageData = RenderUtility.encodeImage(awtImage, encoderType, quality, alpha);
        final String originalFileName;
        if (url != null)
        {
          final URL maybeRealURL = resourceManager.toURL(url);
          if (maybeRealURL != null)
          {
            originalFileName = IOUtils.getInstance().getFileName(maybeRealURL);
          }
          else
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.