@ConsumerType public interface DownloadTargetProcessor
Facilitates the conversion of a
DownloadTargetto one or more binary URIs.
This interface should be implemented to create a handler for a given type of
DownloadTarget. Any targets whose type match the processor's type will go through the processor implementation when the time comes to translate the target into the binary URIs to be included in a download provided by the
The concept of the processor provides a place where consumers can customize the types of targets that can be included in the download process. See
DownloadServicedocumentation for examples.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
getTargetType()The target type that the processor handles.
getValidParameters()Retrieves a map indicating which parameters the processor supports, and whether or not each each parameter is required.
processTarget(DownloadTarget target, ResourceResolver resourceResolver)Does the work of converting a target into a files that can be included in a download.
java.util.Collection<DownloadFile> processTarget(DownloadTarget target, ResourceResolver resourceResolver) throws DownloadException
Does the work of converting a target into a files that can be included in a download.
When this method is called, it's assumed that the processors parameters have been validated based on its
target- Item whose parameters can be used by the processor to retrieve binary information.
resourceResolver- Can be used by the processor to look up sling-related information for the target.
- List of files for download.
DownloadException- Thrown if there are issues during the process of processing a target.
java.lang.String getTargetType()The target type that the processor handles.
typematches this value will be passed through the processor's
- The type of targets that will be handled by the processor implementation.
- A map whose keys are the names of parameters, and whose values indicate if the parameter is required.