Package com.adobe.cq.dam.download.api
Interface DownloadApiFactory
Factory interface for creating various objects whose implementations depend on the type of service being implemented.
Implementers of custom DownloadService implementations should implement
this interface to return dependencies whose types are applicable to the
custom service.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance for use with aDownloadTargetProcessor.Creates a new manifest instance for use with theDownloadService.createDownloadTarget(String targetType, Map<String, Object> parameters) Creates a new instance for use with aDownloadManifest.createFailedDownloadFile(String failureReason, Map<String, Object> parameters) Creates a representation of a failed download file.
-
Method Details
-
createDownloadManifest
DownloadManifest createDownloadManifest()Creates a new manifest instance for use with theDownloadService.- Returns:
- An empty manifest.
-
createDownloadFile
Creates a new instance for use with aDownloadTargetProcessor.- Parameters:
size- The size, in bytes, of the file.binaryURI- URI to the file's binary data.parameters- Additional data to include with the file.- Returns:
- An initialized instance that uses the provided values.
-
createFailedDownloadFile
Creates a representation of a failed download file.- Parameters:
failureReason- The reason this download file should be considered failed.parameters- Additional data to include with the file.- Returns:
- An initialized instance that uses the provided values.
-
createDownloadTarget
Creates a new instance for use with aDownloadManifest.- Parameters:
targetType- The target'sDownloadTarget.getType()value.parameters- Parameters to be retrieved using the target's getParameter() methods.- Returns:
- An initialized target instance that uses the provided values.
-