use of org.pentaho.platform.engine.services.actionsequence.ActionSequenceResource in project pentaho-platform by pentaho.
the class SolutionURIResolver method resolveEntity.
public InputSource resolveEntity(final String publicId, final String systemId) {
InputStream xslIS = null;
try {
if (systemId.toLowerCase().indexOf(".dtd") >= 0) {
// $NON-NLS-1$
return resolveDTDEntity(publicId, systemId);
}
IActionSequenceResource resource = new // $NON-NLS-1$ //$NON-NLS-2$
ActionSequenceResource(// $NON-NLS-1$ //$NON-NLS-2$
"", // $NON-NLS-1$ //$NON-NLS-2$
IActionSequenceResource.SOLUTION_FILE_RESOURCE, // $NON-NLS-1$ //$NON-NLS-2$
"text/xml", systemId);
xslIS = resource.getInputStream(RepositoryFilePermission.READ, LocaleHelper.getLocale());
return new InputSource(xslIS);
} catch (IOException e) {
Logger.error(this, e.getLocalizedMessage());
}
return null;
}
use of org.pentaho.platform.engine.services.actionsequence.ActionSequenceResource in project pentaho-platform by pentaho.
the class JFreeChartEngine method getImage.
/**
* @param imageName
* String that contains a path to the image
* @return the image
*/
public static Image getImage(final String imageName, final IPentahoSession session) {
Image image = null;
try {
IActionSequenceResource resource = new // $NON-NLS-1$ //$NON-NLS-2$
ActionSequenceResource(// $NON-NLS-1$ //$NON-NLS-2$
"", // $NON-NLS-1$ //$NON-NLS-2$
IActionSequenceResource.SOLUTION_FILE_RESOURCE, // $NON-NLS-1$ //$NON-NLS-2$
"", imageName);
InputStream is = resource.getInputStream(RepositoryFilePermission.READ, LocaleHelper.getLocale());
image = ImageIO.read(is);
} catch (IOException e) {
JFreeChartEngine.log.error(null, e);
}
return image;
}
Aggregations