public class DefaultHtmlContentGenerator extends Object implements HtmlContentGenerator
Constructor and Description |
---|
DefaultHtmlContentGenerator(ResourceManager resourceManager) |
Modifier and Type | Method and Description |
---|---|
ContentItem |
createItem(String name,
String mimeType) |
String |
getRegisteredName(ResourceKey source) |
ResourceManager |
getResourceManager() |
boolean |
isCopyExternalImages() |
boolean |
isExternalContentAvailable() |
boolean |
isRegistered(ResourceKey source) |
protected boolean |
isSupportedImageFormat(ResourceKey key)
Tests, whether the given URL points to a supported file format for common browsers.
|
void |
registerContent(ResourceKey source,
String name) |
void |
registerFailure(ResourceKey source) |
void |
setCopyExternalImages(boolean copyExternalImages) |
void |
setDataWriter(ContentLocation dataLocation,
NameGenerator dataNameGenerator,
ContentUrlReWriteService rewriterService) |
String |
writeImage(ImageContainer image,
String encoderType,
float quality,
boolean alpha) |
String |
writeRaw(ResourceKey source) |
public DefaultHtmlContentGenerator(ResourceManager resourceManager)
public void setDataWriter(ContentLocation dataLocation, NameGenerator dataNameGenerator, ContentUrlReWriteService rewriterService)
public void setCopyExternalImages(boolean copyExternalImages)
setCopyExternalImages
in interface HtmlContentGenerator
public boolean isCopyExternalImages()
public ResourceManager getResourceManager()
getResourceManager
in interface HtmlContentGenerator
public void registerFailure(ResourceKey source)
registerFailure
in interface HtmlContentGenerator
public void registerContent(ResourceKey source, String name)
registerContent
in interface HtmlContentGenerator
public boolean isRegistered(ResourceKey source)
isRegistered
in interface HtmlContentGenerator
public String getRegisteredName(ResourceKey source)
getRegisteredName
in interface HtmlContentGenerator
public String writeRaw(ResourceKey source) throws IOException
writeRaw
in interface HtmlContentGenerator
IOException
public String writeImage(ImageContainer image, String encoderType, float quality, boolean alpha) throws ContentIOException, IOException
writeImage
in interface HtmlContentGenerator
ContentIOException
IOException
protected boolean isSupportedImageFormat(ResourceKey key)
key
- the url that should be tested.public ContentItem createItem(String name, String mimeType) throws ContentIOException
ContentIOException
public boolean isExternalContentAvailable()
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.