Class DirectoryResourceLoader
- java.lang.Object
-
- org.pentaho.reporting.libraries.docbundle.bundleloader.DirectoryResourceLoader
-
- All Implemented Interfaces:
org.pentaho.reporting.libraries.resourceloader.ResourceLoader
public class DirectoryResourceLoader extends Object implements org.pentaho.reporting.libraries.resourceloader.ResourceLoader
A resource-loader that marks directories as a valid resource. This is a backend-loader for resource-bundles that are loaded from a directory and cannot be used as standalone resource-loader.- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description DirectoryResourceLoader()Default-Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.pentaho.reporting.libraries.resourceloader.ResourceKeycreateKey(Object value, Map factoryKeys)Creates a new resource key from the given object and the factory keys.org.pentaho.reporting.libraries.resourceloader.ResourceKeyderiveKey(org.pentaho.reporting.libraries.resourceloader.ResourceKey parent, String path, Map factoryKeys)Derives a new resource key from the given key.org.pentaho.reporting.libraries.resourceloader.ResourceKeydeserialize(org.pentaho.reporting.libraries.resourceloader.ResourceKey bundleKey, String stringKey)booleanequals(Object obj)inthashCode()booleanisSupportedDeserializer(String data)booleanisSupportedKey(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)Checks, whether this resource loader implementation was responsible for creating this key.org.pentaho.reporting.libraries.resourceloader.ResourceDataload(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)Stringserialize(org.pentaho.reporting.libraries.resourceloader.ResourceKey bundleKey, org.pentaho.reporting.libraries.resourceloader.ResourceKey key)URLtoURL(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
-
-
-
Method Detail
-
isSupportedKey
public boolean isSupportedKey(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
Checks, whether this resource loader implementation was responsible for creating this key.- Specified by:
isSupportedKeyin interfaceorg.pentaho.reporting.libraries.resourceloader.ResourceLoader- Parameters:
key-- Returns:
-
createKey
public org.pentaho.reporting.libraries.resourceloader.ResourceKey createKey(Object value, Map factoryKeys) throws org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException
Creates a new resource key from the given object and the factory keys.- Specified by:
createKeyin interfaceorg.pentaho.reporting.libraries.resourceloader.ResourceLoader- Parameters:
value-factoryKeys-- Returns:
- the created key or null, if the value object was not supported.
- Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException- if creating the key failed.
-
deriveKey
public org.pentaho.reporting.libraries.resourceloader.ResourceKey deriveKey(org.pentaho.reporting.libraries.resourceloader.ResourceKey parent, String path, Map factoryKeys) throws org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationExceptionDerives 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:
deriveKeyin interfaceorg.pentaho.reporting.libraries.resourceloader.ResourceLoader- Parameters:
parent- the parentpath- the derived path (can be null).factoryKeys- the optional factory keys (can be null).- Returns:
- the derived key.
- Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException- if the key cannot be derived for any reason.
-
toURL
public URL toURL(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
- Specified by:
toURLin interfaceorg.pentaho.reporting.libraries.resourceloader.ResourceLoader
-
load
public org.pentaho.reporting.libraries.resourceloader.ResourceData load(org.pentaho.reporting.libraries.resourceloader.ResourceKey key) throws org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException- Specified by:
loadin interfaceorg.pentaho.reporting.libraries.resourceloader.ResourceLoader- Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException
-
deserialize
public org.pentaho.reporting.libraries.resourceloader.ResourceKey deserialize(org.pentaho.reporting.libraries.resourceloader.ResourceKey bundleKey, String stringKey) throws org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException- Specified by:
deserializein interfaceorg.pentaho.reporting.libraries.resourceloader.ResourceLoader- Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException
-
serialize
public String serialize(org.pentaho.reporting.libraries.resourceloader.ResourceKey bundleKey, org.pentaho.reporting.libraries.resourceloader.ResourceKey key) throws org.pentaho.reporting.libraries.resourceloader.ResourceException
- Specified by:
serializein interfaceorg.pentaho.reporting.libraries.resourceloader.ResourceLoader- Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceException
-
isSupportedDeserializer
public boolean isSupportedDeserializer(String data)
- Specified by:
isSupportedDeserializerin interfaceorg.pentaho.reporting.libraries.resourceloader.ResourceLoader
-
-