Interface URITranslator

    • Method Detail

      • translate

        URI translate​(URI original)
        Translates one URI into another.
        Parameters:
        original - the URI to translate
        Returns:
        the translated URI or the original URI if it did not match the conditions triggering translation
      • map

        static URITranslator map​(String source,
                                 String target)
        Creates a simple mapping from one URI to another.
        Parameters:
        source - the URI to match
        target - the URI to return when matched
        Returns:
        a new URITranslator
      • map

        static URITranslator map​(URI source,
                                 URI target)
        Creates a simple mapping from one URI to another.
        Parameters:
        source - the URI to match
        target - the URI to return when matched
        Returns:
        a new URITranslator
      • map

        static URITranslator map​(Map<String,​String> uriMappings)
        Creates a map-based mapping from one URI to another.
        Parameters:
        uriMappings - the mappings to build
        Returns:
        a new URITranslator
      • prefix

        static URITranslator prefix​(String source,
                                    String target)
        Creates a mapping from one URI to another by replacing the beginning of the URI.

        For example, replace http with https.

        Parameters:
        source - the search string
        target - the replacement string
        Returns:
        a new URITranslator