Package com.day.cq.retriever
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 Summary
Modifier and TypeMethodDescriptionmaybeDownloadResource(String elementName, String attributeName, String resourceUri, Attributes attributes) Download the resource if the storage wants to do that, and if downloaded return the URI of the downloaded resource.voidstoreContent(String content) Store the content that was retrieved and processed
-
Method Details
-
storeContent
Store the content that was retrieved and processed- Throws:
IOExceptionRepositoryException
-
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 URIattributeName- the html attribute that contains the URIresourceUri- the attribute value (absolute URL)attributes- the rest of the element's attributes- Throws:
IOExceptionRepositoryException
-