Class DefaultHtmlContentGenerator

    • Constructor Detail

      • DefaultHtmlContentGenerator

        public DefaultHtmlContentGenerator​(org.pentaho.reporting.libraries.resourceloader.ResourceManager resourceManager)
    • Method Detail

      • setDataWriter

        public void setDataWriter​(org.pentaho.reporting.libraries.repository.ContentLocation dataLocation,
                                  org.pentaho.reporting.libraries.repository.NameGenerator dataNameGenerator,
                                  ContentUrlReWriteService rewriterService)
      • isCopyExternalImages

        public boolean isCopyExternalImages()
      • registerFailure

        public void registerFailure​(org.pentaho.reporting.libraries.resourceloader.ResourceKey source)
        Specified by:
        registerFailure in interface HtmlContentGenerator
      • isRegistered

        public boolean isRegistered​(org.pentaho.reporting.libraries.resourceloader.ResourceKey source)
        Specified by:
        isRegistered in interface HtmlContentGenerator
      • isSupportedImageFormat

        protected boolean isSupportedImageFormat​(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
        Tests, whether the given URL points to a supported file format for common browsers. Returns true if the URL references a JPEG, PNG or GIF image, false otherwise.

        The checked filetypes are the ones recommended by the W3C.

        Parameters:
        key - the url that should be tested.
        Returns:
        true, if the content type is supported by the browsers, false otherwise.
      • createItem

        public org.pentaho.reporting.libraries.repository.ContentItem createItem​(String name,
                                                                                 String mimeType)
                                                                          throws org.pentaho.reporting.libraries.repository.ContentIOException
        Throws:
        org.pentaho.reporting.libraries.repository.ContentIOException
      • isExternalContentAvailable

        public boolean isExternalContentAvailable()