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

Field Summary
static String PENTAHO_RUNTIME_CONTEXT_KEY
          Deprecated. replaced with the solution repository key (where applicable)
static String PENTAHO_SOLUTION_REPOSITORY_KEY
           
 
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
 

Field Detail

PENTAHO_RUNTIME_CONTEXT_KEY

@Deprecated
public static final String PENTAHO_RUNTIME_CONTEXT_KEY
Deprecated. replaced with the solution repository key (where applicable)
See Also:
Constant Field Values

PENTAHO_SOLUTION_REPOSITORY_KEY

public static final String PENTAHO_SOLUTION_REPOSITORY_KEY
See Also:
Constant Field Values
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