org.pentaho.reporting.libraries.resourceloader
Interface Resource

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
CompoundResource, SimpleResource

public interface Resource
extends java.io.Serializable

A resource is a wrapper around the final product. It shall not hold any references to the ResourceData object used to create the resource (to allow efficient 2-stage caching). Although this interfaces declares to be serializable, this might not be the case for some of the content contained in the resource object. Cache implementors should be aware of that issue and should act accordingly (for instance by not caching that object).

Author:
Thomas Morgner

Method Summary
 ResourceKey[] getDependencies()
          The primary source is also included in this set.
 java.lang.Object getResource()
           
 ResourceKey getSource()
           
 long getVersion(ResourceKey key)
           
 

Method Detail

getResource

java.lang.Object getResource()
                             throws ResourceException
Throws:
ResourceException

getVersion

long getVersion(ResourceKey key)

getDependencies

ResourceKey[] getDependencies()
The primary source is also included in this set. The dependencies are given as ResourceKey objects. The keys itself do not hold any state information. The dependencies do not track deep dependencies. So if Resource A depends on Resource B which depends on Resource C, then A only knows about B, not C.

Returns:

getSource

ResourceKey getSource()