Interface RetrieverStorage


  • public interface RetrieverStorage
    Storage interface for the retriever module, allows the client of the RetrieverService to store downloaded resources in any suitable way.
    • Method Detail

      • maybeDownloadResource

        String maybeDownloadResource​(String elementName,
                                     String attributeName,
                                     String resourceUri,
                                     Attributes attributes)
                              throws IOException,
                                     RepositoryException
        Download the resource if the storage wants to do that, and if downloaded return the URI of the downloaded resource. The idea in not downloading all resources is that large images, for example, might be better left as absolute URIs in the content when sending large quantities of mail, to keep the mailing bandwidth low.
        Parameters:
        elementName - the html element that contains the URI
        attributeName - the html attribute that contains the URI
        resourceUri - the attribute value (absolute URL)
        attributes - the rest of the element's attributes
        Throws:
        IOException
        RepositoryException