Interface RequestRewriter

  • All Known Subinterfaces:
    OptingRequestRewriter

    public interface RequestRewriter
    The RequestRewriter interface defines an optional service which is used to rewrite attributes.
    Since:
    5.4
    • Method Detail

      • rewrite

        org.xml.sax.Attributes rewrite​(java.lang.String elementName,
                                       org.xml.sax.Attributes attributes,
                                       LinkCheckerSettings settings)
        This method rewrites attributes of an element. If it does not rewrite any attribute of the current element it should just return null. The attributes might be rewritten again by the default link rewriter after they have been rewritten by this service. This method is invoked before the actual link checking takes place; it should therefore not map the links from internal to external representation. That should be done with the rewriteLink(Link, LinkCheckerSettings) method.
        Parameters:
        elementName - the element name
        attributes - the attributes of the element
        settings - The settings
        Returns:
        The rewritten elements or null
      • rewriteLink

        java.lang.String rewriteLink​(Link link,
                                     LinkCheckerSettings settings)
        Rewrite a link and create the external representation. If rewriting is not possible, this method should return null. In this case the default rewriter might rewrite the link.
        Parameters:
        link - The link
        settings - The settings
        Returns:
        The rewritten link or null