Class HttpImageResolver

    • Constructor Summary

      Constructors 
      Constructor Description
      HttpImageResolver()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canConvert​(java.lang.String text)
      Returns true if the converter can convert the given input.
      java.awt.image.BufferedImage resolve​(MfClientHttpRequestFactory requestFactory, java.lang.String text)
      Convert the value.
      void setUrlExtractor​(java.lang.String pattern)
      Sets the RegExp pattern to use for extracting the url from the text.
      void setUrlGroup​(int urlGroup)
      Select the group in the regular expression that contains the url.
      void validate​(java.util.List<java.lang.Throwable> validationErrors, Configuration configuration)
      validate that the configuration was correct.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpImageResolver

        public HttpImageResolver()
        Constructor.
    • Method Detail

      • setUrlExtractor

        public void setUrlExtractor​(java.lang.String pattern)
        Sets the RegExp pattern to use for extracting the url from the text. By default the whole string is used.

        For example: .*&img src="([^"]+)".*

        Parameters:
        pattern - The url extractor regular expression. Default is "(.*)"
      • setUrlGroup

        public void setUrlGroup​(int urlGroup)
        Select the group in the regular expression that contains the url.
        Parameters:
        urlGroup - the index of the group (starting at 1) that contains the url.
      • resolve

        public java.awt.image.BufferedImage resolve​(MfClientHttpRequestFactory requestFactory,
                                                    java.lang.String text)
        Description copied from interface: TableColumnConverter
        Convert the value.
        Specified by:
        resolve in interface TableColumnConverter<java.awt.image.BufferedImage>
        Parameters:
        requestFactory - for fetching file and http resources.
        text - the cell value.
      • validate

        public void validate​(java.util.List<java.lang.Throwable> validationErrors,
                             Configuration configuration)
        Description copied from interface: ConfigurationObject
        validate that the configuration was correct.
        Specified by:
        validate in interface ConfigurationObject
        Parameters:
        validationErrors - a list to add any detected errors to.
        configuration - the containing configuration
      • canConvert

        public boolean canConvert​(java.lang.String text)
        Description copied from interface: TableColumnConverter
        Returns true if the converter can convert the given input.
        Specified by:
        canConvert in interface TableColumnConverter<java.awt.image.BufferedImage>
        Parameters:
        text - the input to convert.