Class PluginResource
- java.lang.Object
-
- org.pentaho.platform.web.http.api.resources.PluginResource
-
public class PluginResource extends Object
Represents the public files available in a plugin.- Author:
- aaron
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.servlet.http.HttpServletResponse
httpServletResponse
protected org.pentaho.platform.api.engine.IPluginManager
pluginManager
protected org.pentaho.platform.api.engine.IPluginManager
pluginMgr
protected File
systemFolder
-
Constructor Summary
Constructors Constructor Description PluginResource()
PluginResource(javax.servlet.http.HttpServletResponse httpServletResponse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputStream
getCacheBackedStream(String pluginId, String path, boolean useCache)
javax.ws.rs.core.Response
readFile(String pluginId, String path)
Retrieve the file from the selected plugin.
-
-
-
Field Detail
-
systemFolder
protected File systemFolder
-
pluginManager
protected org.pentaho.platform.api.engine.IPluginManager pluginManager
-
pluginMgr
protected org.pentaho.platform.api.engine.IPluginManager pluginMgr
-
httpServletResponse
@Context protected javax.servlet.http.HttpServletResponse httpServletResponse
-
-
Method Detail
-
getCacheBackedStream
protected InputStream getCacheBackedStream(String pluginId, String path, boolean useCache) throws IOException
- Throws:
IOException
-
readFile
public javax.ws.rs.core.Response readFile(String pluginId, String path) throws IOException
Retrieve the file from the selected plugin. This file is a static file (i.e javascript, html, css etc)- Parameters:
pluginId
- (Plugin ID of the selected Plugin)path
- (Path of the file being retrieved. This is a colon separated path to the plugin file. This is usually a static file like a javascript, image or html- Returns:
- Throws:
IOException
-
-