org.pentaho.reporting.libraries.resourceloader
Interface Resource

All Superinterfaces:
Serializable
All Known Implementing Classes:
BundleCacheResourceWrapper, CompoundResource, SimpleResource

public interface Resource
extends 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.
 Object getResource()
           
 ResourceKey getSource()
           
 Class getTargetType()
           
 long getVersion(ResourceKey key)
           
 boolean isTemporaryResult()
           
 

Method Detail

getResource

Object getResource()
                   throws ResourceException
Throws:
ResourceException

getTargetType

Class getTargetType()

isTemporaryResult

boolean isTemporaryResult()

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()