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
    Default-Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.pentaho.reporting.libraries.resourceloader.ResourceKey
    createKey(Object value, Map factoryKeys)
    Creates a new resource key from the given object and the factory keys.
    org.pentaho.reporting.libraries.resourceloader.ResourceKey
    deriveKey(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.ResourceKey
    deserialize(org.pentaho.reporting.libraries.resourceloader.ResourceKey bundleKey, String stringKey)
     
    boolean
     
    int
     
    boolean
     
    boolean
    isSupportedKey(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
    Checks, whether this resource loader implementation was responsible for creating this key.
    org.pentaho.reporting.libraries.resourceloader.ResourceData
    load(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
     
    serialize(org.pentaho.reporting.libraries.resourceloader.ResourceKey bundleKey, org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
     
    toURL(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DirectoryResourceLoader

      public DirectoryResourceLoader()
      Default-Constructor.
  • Method Details

    • 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:
      isSupportedKey in interface org.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:
      createKey in interface org.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.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 org.pentaho.reporting.libraries.resourceloader.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:
      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:
      toURL in interface org.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:
      load in interface org.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:
      deserialize in interface org.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:
      serialize in interface org.pentaho.reporting.libraries.resourceloader.ResourceLoader
      Throws:
      org.pentaho.reporting.libraries.resourceloader.ResourceException
    • isSupportedDeserializer

      public boolean isSupportedDeserializer(String data)
      Specified by:
      isSupportedDeserializer in interface org.pentaho.reporting.libraries.resourceloader.ResourceLoader
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object