Class 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

      Constructors 
      Constructor Description
      PentahoResourceData​(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
      constructor which takes a resource key for data loading specifics
    • 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