Interface Download
- All Superinterfaces:
Component,ComponentExporter
Defines the
Download Sling Model used for the /apps/core/wcm/components/download component.- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of the policy property that defines the text to be displayed on the action.static final StringName of the resource property that defines whether or not the description value is taken from the configured asset.static final StringName of the policy property that defines whether the filename will be displayed.static final StringName of the policy property that defines whether the file's format will be displayed.static final StringName of the policy property that defines whether the file's size will be displayed.static final StringName of the policy property that defines whether the title links should be hidden.static final StringName of the resource property that defines whether or not the download item should be displayed inline vs.static final StringName of the resource property that defines whether or not the title value is taken from the configured asset.static final StringName of the policy property that stores the value for this title's HTML element type. -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanChecks if the filename should be displayed.default booleanChecks if the file format should be displayed.default booleanChecks if the file size should be displayed.default StringReturns the action text from the dialog if it is configured there.default StringReturns either the description configured in the dialog or the description of the DAM asset, depending on the state of the descriptionFromAsset checkbox.default StringReturns the extension of file to be downloaded.default StringReturns the filename of the file to be downloaded.default StringReturns the mime type of the file to be downloaded.default StringgetSize()Returns the size of the file to be downloaded.default StringgetTitle()Returns either the title configured in the dialog or the title of the DAM asset, depending on the state of the titleFromAsset checkbox.default StringReturns the HTML element to be used for the title as defined in the component policy.default StringgetUrl()Returns the url to the asset.default booleanChecks if the title link should be hidden.Methods inherited from interface com.adobe.cq.wcm.core.components.models.Component
getAppliedCssClasses, getData, getExportedType, getId
-
Field Details
-
PN_TITLE_FROM_ASSET
Name of the resource property that defines whether or not the title value is taken from the configured asset.- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
- See Also:
-
PN_DESCRIPTION_FROM_ASSET
Name of the resource property that defines whether or not the description value is taken from the configured asset.- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
- See Also:
-
PN_INLINE
Name of the resource property that defines whether or not the download item should be displayed inline vs. attachment.- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
- See Also:
-
PN_ACTION_TEXT
Name of the policy property that defines the text to be displayed on the action.- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
- See Also:
-
PN_TITLE_TYPE
Name of the policy property that stores the value for this title's HTML element type.- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
- See Also:
-
PN_DISPLAY_SIZE
Name of the policy property that defines whether the file's size will be displayed.- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
- See Also:
-
PN_DISPLAY_FORMAT
Name of the policy property that defines whether the file's format will be displayed.- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
- See Also:
-
PN_DISPLAY_FILENAME
Name of the policy property that defines whether the filename will be displayed.- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
- See Also:
-
PN_HIDE_TITLE_LINK
Name of the policy property that defines whether the title links should be hidden.- Since:
- com.adobe.cq.wcm.core.components.models 12.20.0
- See Also:
-
-
Method Details
-
getTitle
Returns either the title configured in the dialog or the title of the DAM asset, depending on the state of the titleFromAsset checkbox.- Returns:
- the download title
- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
getDescription
Returns either the description configured in the dialog or the description of the DAM asset, depending on the state of the descriptionFromAsset checkbox.- Returns:
- the download description
- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
getUrl
Returns the url to the asset.- Returns:
- the asset url
- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
getActionText
Returns the action text from the dialog if it is configured there. Otherwise, it returns the value set in the component policy.- Returns:
- the action text
- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
getTitleType
Returns the HTML element to be used for the title as defined in the component policy.- Returns:
- the title header element type
- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
getSize
Returns the size of the file to be downloaded.- Returns:
- the size of download file
- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
getExtension
Returns the extension of file to be downloaded. Extension is mapped with theMimeTypeService. If no mapping can be found the extension is extracted from the filename.- Returns:
- the extension of the download file
- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
displaySize
default boolean displaySize()Checks if the file size should be displayed.- Returns:
trueif the size should be displayed,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
getFormat
Returns the mime type of the file to be downloaded.- Returns:
- the mime type of the download file
- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
displayFormat
default boolean displayFormat()Checks if the file format should be displayed.- Returns:
trueif the format should be displayed,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
getFilename
Returns the filename of the file to be downloaded.- Returns:
- the filename of the download file
- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
displayFilename
default boolean displayFilename()Checks if the filename should be displayed.- Returns:
trueif the filename should be displayed,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.models 12.8.0
-
hideTitleLink
default boolean hideTitleLink()Checks if the title link should be hidden.- Returns:
trueif the title link should be hidden,falseif it should be rendered- Since:
- com.adobe.cq.wcm.core.components.models 12.20.0
-