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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
maybeDownloadResource(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.void
storeContent(String content)
Store the content that was retrieved and processed
-
-
-
Method Detail
-
storeContent
void storeContent(String content) throws IOException, RepositoryException
Store the content that was retrieved and processed- Throws:
IOException
RepositoryException
-
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:
IOException
RepositoryException
-
-