Interface UriConversionService

All Known Implementing Classes:
UriConversionServiceImpl

public interface UriConversionService
A service for converting NiceUris into other types of NiceUris.
  • Method Details

    • convert

      String convert(Class<? extends NiceUri> sourceClass, Class<? extends NiceUri> targetClass, String html)
      Convert all URIs of type sourceClass into URIs of type targetClass in given html string html and return the new html string.
      Parameters:
      sourceClass - The class of the URIs to convert.
      targetClass - The class to convert the found URIs into.
      html - The html string that contains the URIs to convert.
      Returns:
      The new html string containing the converted URIs.
      Throws:
      UriConverterException - in case of an error.
      See Also:
    • convert

      String convert(Set<Class<? extends NiceUri>> sourceClasses, Class<? extends NiceUri> targetClass, String html)
      Convert all URIs of type sourceClass into URIs of type targetClass in given html string html and return the new html string.
      Parameters:
      sourceClasses - The classes of the URIs to convert.
      targetClass - The class to convert the found URIs into.
      html - The html string that contains the URIs to convert.
      Returns:
      The new html string containing the converted URIs.
      Throws:
      UriConverterException - in case of an error.
      See Also:
    • convertIgnoreUriConverterException

      String convertIgnoreUriConverterException(Class<? extends NiceUri> sourceClass, Class<? extends NiceUri> targetClass, String html)
      Convert all URIs of type sourceClass into URIs of type targetClass in given html string html and return the new html string. If an URI conversion fails throwing an UriConverterException it is skipped and the exception is logged.
      Parameters:
      sourceClass - The class of the URIs to convert.
      targetClass - The class to convert the found URIs into.
      html - The html string that contains the URIs to convert.
      Returns:
      The new html string containing the converted URIs.
      See Also:
    • convertIgnoreUriConverterException

      String convertIgnoreUriConverterException(Set<Class<? extends NiceUri>> sourceClasses, Class<? extends NiceUri> targetClass, String html)
      Convert all URIs of type sourceClass into URIs of type targetClass in given html string html and return the new html string. If an URI conversion fails throwing an UriConverterException it is skipped and the exception is logged.
      Parameters:
      sourceClasses - The classes of the URIs to convert.
      targetClass - The class to convert the found URIs into.
      html - The html string that contains the URIs to convert.
      Returns:
      The new html string containing the converted URIs.
      See Also: