org.pentaho.reporting.libraries.resourceloader.loader.raw
Class RawResourceLoader

java.lang.Object
  extended by org.pentaho.reporting.libraries.resourceloader.loader.raw.RawResourceLoader
All Implemented Interfaces:
ResourceLoader

public class RawResourceLoader
extends java.lang.Object
implements ResourceLoader

Creation-Date: 12.04.2006, 15:19:03

Author:
Thomas Morgner

Constructor Summary
RawResourceLoader()
           
 
Method Summary
 ResourceKey createKey(java.lang.Object value, java.util.Map factoryKeys)
          Creates a new resource key from the given object and the factory keys.
 ResourceKey deriveKey(ResourceKey parent, java.lang.String path, java.util.Map factoryKeys)
          Derives a new resource key from the given key.
 boolean isSupportedKey(ResourceKey key)
          Checks, whether this resource loader implementation was responsible for creating this key.
 ResourceData load(ResourceKey key)
          Loads the binary data represented by this key.
 java.net.URL toURL(ResourceKey key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawResourceLoader

public RawResourceLoader()
Method Detail

isSupportedKey

public boolean isSupportedKey(ResourceKey key)
Checks, whether this resource loader implementation was responsible for creating this key.

Specified by:
isSupportedKey in interface ResourceLoader
Parameters:
key -
Returns:

createKey

public ResourceKey createKey(java.lang.Object value,
                             java.util.Map factoryKeys)
                      throws ResourceKeyCreationException
Creates a new resource key from the given object and the factory keys.

Specified by:
createKey in interface ResourceLoader
Parameters:
value -
factoryKeys -
Returns:
the created key.
Throws:
ResourceKeyCreationException - if creating the key failed.

deriveKey

public ResourceKey deriveKey(ResourceKey parent,
                             java.lang.String path,
                             java.util.Map factoryKeys)
                      throws ResourceKeyCreationException
Derives a new resource key from the given key. If neither a path nor new factory-keys are given, the parent key is returned.

Specified by:
deriveKey in interface ResourceLoader
Parameters:
parent - the parent
path - the derived path (can be null).
factoryKeys - the optional factory keys (can be null).
Returns:
the derived key.
Throws:
ResourceKeyCreationException - if the key cannot be derived for any reason.

toURL

public java.net.URL toURL(ResourceKey key)
Specified by:
toURL in interface ResourceLoader

load

public ResourceData load(ResourceKey key)
                  throws ResourceLoadingException
Description copied from interface: ResourceLoader
Loads the binary data represented by this key.

Specified by:
load in interface ResourceLoader
Returns:
Throws:
ResourceLoadingException