org.pentaho.platform.plugin.action.jfreereport.helper
Class PentahoResourceData

java.lang.Object
  extended by AbstractResourceData
      extended by org.pentaho.platform.plugin.action.jfreereport.helper.PentahoResourceData

public class PentahoResourceData
extends AbstractResourceData

This class is implemented to support loading solution files from the pentaho repository into JFreeReport

Author:
Will Gorman

Constructor Summary
PentahoResourceData(ResourceKey key)
          constructor which takes a resource key for data loading specifics
 
Method Summary
 Object getAttribute(String lookupKey)
          returns a requested attribute, currently only supporting filename.
 ResourceKey getKey()
          get the resource key
 InputStream getResourceAsStream(ResourceManager caller)
          gets a resource stream from the runtime context.
 long getVersion(ResourceManager caller)
          return the version number.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PentahoResourceData

public PentahoResourceData(ResourceKey key)
                    throws ResourceLoadingException
constructor which takes a resource key for data loading specifics

Parameters:
key - resource key
Throws:
ResourceLoadingException
Method Detail

getResourceAsStream

public InputStream getResourceAsStream(ResourceManager caller)
                                throws ResourceLoadingException
gets a resource stream from the runtime context.

Parameters:
caller - resource manager
Returns:
input stream
Throws:
ResourceLoadingException

getAttribute

public Object getAttribute(String lookupKey)
returns a requested attribute, currently only supporting filename.

Parameters:
key - attribute requested
Returns:
attribute value

getVersion

public long getVersion(ResourceManager caller)
                throws ResourceLoadingException
return the version number. We don't have access to file dates or versions so return 0

Parameters:
caller - resource manager
Returns:
version
Throws:
ResourceLoadingException

getKey

public ResourceKey getKey()
get the resource key

Returns:
resource key