Package com.day.cq.wcm.foundation
Class Download
java.lang.Object
org.apache.sling.api.resource.ResourceWrapper
com.day.cq.commons.DownloadResource
com.day.cq.wcm.foundation.Download
Provides convenience methods for rendering download paragraphs.
-
Field Summary
Fields inherited from class com.day.cq.commons.DownloadResource
NN_FILE, PN_DESCRIPTION, PN_FILE_NAME, PN_REFERENCE, PN_TITLEFields inherited from interface org.apache.sling.api.resource.Resource
RESOURCE_TYPE_NON_EXISTING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.since 5.4 please use css classes for the icon, like "icon_xls.gif"Methods inherited from class com.day.cq.commons.DownloadResource
addAttribute, addCssClass, addQueryParam, draw, get, get, getAttributes, getData, getDescription, getDescription, getExtension, getFileName, getFileNodePath, getFileReference, getHref, getIconType, getInnerHtml, getItemName, getLastModified, getMimeType, getQuery, getSelector, getString, getSuffix, getTitle, getTitle, hasContent, init, isTouchAuthoringUIMode, set, setDescription, setExtension, setFileName, setFileNodePath, setFileReference, setHref, setInnerHtml, setIsInUITouchMode, setItemName, setQuery, setSelector, setSuffix, setTitleMethods inherited from class org.apache.sling.api.resource.ResourceWrapper
adaptTo, getChild, getChildren, getName, getParent, getPath, getResource, getResourceMetadata, getResourceResolver, getResourceSuperType, getResourceType, getValueMap, hasChildren, isResourceType, listChildren, toString
-
Constructor Details
-
Download
Creates a new download based on the given resource. the file properties are considered to be 'on' the given resource.- Parameters:
resource- resource of the image- Throws:
IllegalArgumentException- if the given resource is not adaptable to node.
-
-
Method Details
-
getIconPath
Deprecated.since 5.4 please use css classes for the icon, like "icon_xls.gif"Returns a path to an icon representing the file. Checks if the component of the resource provides an icon for the respective type.- Overrides:
getIconPathin classDownloadResource- Returns:
- a path to an icon or
null.
-