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
-
public class Download extends DownloadResource
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_TITLE
-
Fields inherited from interface org.apache.sling.api.resource.Resource
RESOURCE_TYPE_NON_EXISTING
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getIconPath()
Deprecated.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, setTitle
-
Methods 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 Detail
-
Download
public Download(Resource resource)
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:
java.lang.IllegalArgumentException
- if the given resource is not adaptable to node.
-
-
Method Detail
-
getIconPath
@Deprecated public java.lang.String 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:
getIconPath
in classDownloadResource
- Returns:
- a path to an icon or
null
.
-
-