Package org.pentaho.reporting.libraries.resourceloader

# Interface ResourceFactory

All Known Implementing Classes:
  `AbstractResourceFactory`, `DrawableResourceFactory`, `ImageResourceFactory`, `PropertiesResourceFactory`

public interface ResourceFactory
Creation-Date: 05.04.2006, 12:52:32

Author:
  Thomas Morgner

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`CONFIG_PREFIX`

## Method Summary

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.
`Class`
`getFactoryType()`
Returns the expected result type.
`void`
`initializeDefaults()`
Initializes the resource factory.

## Field Details

### CONFIG_PREFIX

static final String CONFIG_PREFIX

See Also:
  - Constant Field Values

## Method Details

### create

Resource create(ResourceManager manager, ResourceData data, ResourceKey context) throws ResourceCreationException, ResourceLoadingException
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.

Parameters:
  `manager` - the resource manager used for all resource loading.
  `data` - the resource-data from where the binary data is read.
  `context` - the resource context used to resolve relative resource paths.
Returns:
  the parsed result, never null.
Throws:
  `ResourceCreationException` - if the resource could not be parsed due to syntaxctial or logical errors in the data.
  `ResourceLoadingException` - if the resource could not be accessed from the physical storage.

### getFactoryType

Class getFactoryType()
Returns the expected result type.

Returns:
  the result type.

### initializeDefaults

void initializeDefaults()
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.