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

java.lang.Object
  extended by org.pentaho.reporting.libraries.resourceloader.loader.AbstractResourceData
      extended by org.pentaho.platform.plugin.action.jfreereport.helper.PentahoResourceData
All Implemented Interfaces:
Serializable, org.pentaho.reporting.libraries.resourceloader.ResourceData

public class PentahoResourceData
extends org.pentaho.reporting.libraries.resourceloader.loader.AbstractResourceData

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

Author:
Will Gorman
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.pentaho.reporting.libraries.resourceloader.ResourceData
CONTENT_LENGTH, CONTENT_TYPE, FILENAME
 
Constructor Summary
PentahoResourceData(org.pentaho.reporting.libraries.resourceloader.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.
 org.pentaho.reporting.libraries.resourceloader.ResourceKey getKey()
          get the resource key
 InputStream getResourceAsStream(org.pentaho.reporting.libraries.resourceloader.ResourceManager caller)
          gets a resource stream from the runtime context.
 long getVersion(org.pentaho.reporting.libraries.resourceloader.ResourceManager caller)
          return the version number.
 
Methods inherited from class org.pentaho.reporting.libraries.resourceloader.loader.AbstractResourceData
getLength, getResource, getResource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PentahoResourceData

public PentahoResourceData(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
                    throws org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException
constructor which takes a resource key for data loading specifics

Parameters:
key - resource key
Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException
Method Detail

getResourceAsStream

public InputStream getResourceAsStream(org.pentaho.reporting.libraries.resourceloader.ResourceManager caller)
                                throws org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException
gets a resource stream from the runtime context.

Parameters:
caller - resource manager
Returns:
input stream
Throws:
org.pentaho.reporting.libraries.resourceloader.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(org.pentaho.reporting.libraries.resourceloader.ResourceManager caller)
                throws org.pentaho.reporting.libraries.resourceloader.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:
org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException

getKey

public org.pentaho.reporting.libraries.resourceloader.ResourceKey getKey()
get the resource key

Returns:
resource key