Package org.pentaho.reporting.libraries.resourceloader

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


      return resource;
    }
    catch (CloneNotSupportedException e)
    {

      throw new ResourceException("Unable to retrieve the resource.", e);
    }
  }
View Full Code Here


      throw new NullPointerException();
    }
    final Object o = imageResource.getResource();
    if (o instanceof Image == false)
    {
      throw new ResourceException("ImageResource does not contain a java.awt.Image object.");
    }
    final ResourceKey resKey = imageResource.getSource();
    final Object identifier = resKey.getIdentifier();
    if (identifier instanceof URL)
    {
      this.url = (URL) identifier;
    }
    this.resourceKey = resKey;
    this.image = (Image) o;
    final WaitingImageObserver obs = new WaitingImageObserver(image);
    obs.waitImageLoaded();
    if (obs.isError())
    {
      throw new ResourceException("Failed to load the image. ImageObserver signaled an error.");
    }
    this.width = image.getWidth(null);
    this.height = image.getHeight(null);
  }
View Full Code Here

    {
      // failed to load from context
      logger.debug("Failed to load datasource as file: " + re);
    }

    throw new ResourceException("Unable to load the resource");
  }
View Full Code Here

    throw new ResourceKeyCreationException("This resource Loader cannot be used to deserialize ReousrceKeys");
  }

  public String serialize(final ResourceKey bundleKey, final ResourceKey key) throws ResourceException
  {
    throw new ResourceException("This resource Loader cannot be used to serialize ResourceKeys");
  }
View Full Code Here

      return resource;
    }
    catch (CloneNotSupportedException e)
    {

      throw new ResourceException("Unable to retrieve the resource.", e);
    }
  }
View Full Code Here

  public static MasterReport parseGoldenSampleReport(final String name) throws ResourceException
  {
    final File file = GoldTestBase.locateGoldenSampleReport(name);
    if (file == null)
    {
      throw new ResourceException("Unable to locate report '" + name + "' in the golden samples.");
    }

    final ResourceManager mgr = new ResourceManager();
    mgr.registerDefaults();
    return (MasterReport) mgr.createDirectly(file, MasterReport.class).getResource();
View Full Code Here

    {
      // failed to load from context
      logger.debug("Failed to load datasource as file: " + re);
    }

    throw new ResourceException("Unable to load the resource");
  }
View Full Code Here

    // Log information
    logger.debug("Serializing a File Resource Key...");
    if (key.getParent() != null)
    {
      throw new ResourceException
          ("Unable to serialize a File-ResourceKey with a parent. This type is not expected to have a parent.");
    }

    // Create a string version of the identifier
    try
View Full Code Here

    // Log information
    logger.debug("Serializing a Classloader Resource Key...");
    if (key.getParent() != null)
    {
      throw new ResourceException
          ("Cannot serialize this key, it contains a parent, but should not contain one at all.");
    }

    // Serialize the key
    final String result = ResourceKeyUtils.createStringResourceKey(key.getSchema().toString(),
View Full Code Here

    final ZipEntryKey entryKey = (ZipEntryKey) key.getIdentifier();
    final String name = entryKey.getEntryName();
    final ResourceKey zipKey = entryKey.getZipFile().getKey();
   
    // For now, we are just going to have to pass on this one
    throw new ResourceException("Can not serialize a ZipResourceKey");
  }
View Full Code Here

TOP

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

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.