Package org.pentaho.reporting.libraries.resourceloader.factory

## Class AbstractResourceFactory

- java.lang.Object
- - org.pentaho.reporting.libraries.resourceloader.factory.AbstractResourceFactory

- All Implemented Interfaces:
    `ResourceFactory`
  Direct Known Subclasses:
    `DrawableResourceFactory`, `ImageResourceFactory`

      public abstract class AbstractResourceFactory
      extends java.lang.Object
      implements ResourceFactory

  Creation-Date: 05.04.2006, 16:58:57
  Author:
    Thomas Morgner

- - ### Field Summary

    - ### Fields inherited from interface org.pentaho.reporting.libraries.resourceloader.ResourceFactory

      `CONFIG_PREFIX`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Resource` | `create​(ResourceManager manager, ResourceData data, ResourceKey context)` | Creates a resource by interpreting the data given in the resource-data object.
    `java.lang.Class` | `getFactoryType()` | Returns the expected result type.
    `void` | `initializeDefaults()` | Initializes the resource factory.
    `boolean` | `registerModule​(java.lang.String className)` |
    `void` | `registerModule​(FactoryModule module)` |

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getFactoryType

          public java.lang.Class getFactoryType()

      Description copied from interface: `ResourceFactory`
      Returns the expected result type.
      Specified by:
        `getFactoryType` in interface `ResourceFactory`
      Returns:
        the result type.

    - #### initializeDefaults

          public void initializeDefaults()

      Description copied from interface: `ResourceFactory`
      Initializes the resource factory. This usually loads all system resources from the environment and maybe sets up and initializes any factories needed during the parsing.
      Specified by:
        `initializeDefaults` in interface `ResourceFactory`

    - #### registerModule

          public boolean registerModule​(java.lang.String className)

    - #### registerModule

          public void registerModule​(FactoryModule module)

    - #### create

          public Resource create​(ResourceManager manager,
                                 ResourceData data,
                                 ResourceKey context)
                          throws ResourceCreationException,
                                 ResourceLoadingException

      Description copied from interface: `ResourceFactory`
      Creates a resource by interpreting the data given in the resource-data object. If additional datastreams need to be parsed, the provided resource manager should be used.
      Specified by:
        `create` in interface `ResourceFactory`
      Parameters:
        `data` -
        `context` -
        `manager` - the resource manager used for all resource loading.
      Returns:
      Throws:
        `ResourceCreationException`
        `ResourceLoadingException`