Interface Download

All Superinterfaces:
Component, ComponentExporter

public interface Download extends Component
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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of the policy property that defines the text to be displayed on the action.
    static final String
    Name of the resource property that defines whether or not the description value is taken from the configured asset.
    static final String
    Name of the policy property that defines whether the filename will be displayed.
    static final String
    Name of the policy property that defines whether the file's format will be displayed.
    static final String
    Name of the policy property that defines whether the file's size will be displayed.
    static final String
    Name of the policy property that defines whether the title links should be hidden.
    static final String
    Name of the resource property that defines whether or not the download item should be displayed inline vs.
    static final String
    Name of the resource property that defines whether or not the title value is taken from the configured asset.
    static final String
    Name of the policy property that stores the value for this title's HTML element type.

    Fields inherited from interface com.adobe.cq.wcm.core.components.models.Component

    PN_ID
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Checks if the filename should be displayed.
    default boolean
    Checks if the file format should be displayed.
    default boolean
    Checks if the file size should be displayed.
    default String
    Returns the action text from the dialog if it is configured there.
    default String
    Returns either the description configured in the dialog or the description of the DAM asset, depending on the state of the descriptionFromAsset checkbox.
    default String
    Returns the extension of file to be downloaded.
    default String
    Returns the filename of the file to be downloaded.
    default String
    Returns the mime type of the file to be downloaded.
    default String
    Returns the size of the file to be downloaded.
    default String
    Returns either the title configured in the dialog or the title of the DAM asset, depending on the state of the titleFromAsset checkbox.
    default String
    Returns the HTML element to be used for the title as defined in the component policy.
    default String
    Returns the url to the asset.
    default boolean
    Checks 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

      static final String 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

      static final String 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

      static final String 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

      static final String 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

      static final String 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

      static final String 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

      static final String 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

      static final String 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:
  • Method Details

    • getTitle

      default String 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

      default String 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

      default String getUrl()
      Returns the url to the asset.
      Returns:
      the asset url
      Since:
      com.adobe.cq.wcm.core.components.models 12.8.0
    • getActionText

      default String 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

      default String 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

      default String 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

      default String getExtension()
      Returns the extension of file to be downloaded. Extension is mapped with the MimeTypeService . 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:
      true if the size should be displayed, false otherwise
      Since:
      com.adobe.cq.wcm.core.components.models 12.8.0
    • getFormat

      default String 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:
      true if the format should be displayed, false otherwise
      Since:
      com.adobe.cq.wcm.core.components.models 12.8.0
    • getFilename

      default String 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:
      true if the filename should be displayed, false otherwise
      Since:
      com.adobe.cq.wcm.core.components.models 12.8.0
    • hideTitleLink

      default boolean hideTitleLink()
      Checks if the title link should be hidden.
      Returns:
      true if the title link should be hidden, false if it should be rendered
      Since:
      com.adobe.cq.wcm.core.components.models 12.20.0