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 java.lang.String PN_ACTION_TEXT
      Name of the policy property that defines the text to be displayed on the action.
      static java.lang.String PN_DESCRIPTION_FROM_ASSET
      Name of the resource property that defines whether or not the description value is taken from the configured asset.
      static java.lang.String PN_DISPLAY_FILENAME
      Name of the policy property that defines whether the filename will be displayed.
      static java.lang.String PN_DISPLAY_FORMAT
      Name of the policy property that defines whether the file's format will be displayed.
      static java.lang.String PN_DISPLAY_SIZE
      Name of the policy property that defines whether the file's size will be displayed.
      static java.lang.String PN_HIDE_TITLE_LINK
      Name of the policy property that defines whether the title links should be hidden.
      static java.lang.String PN_INLINE
      Name of the resource property that defines whether or not the download item should be displayed inline vs.
      static java.lang.String PN_TITLE_FROM_ASSET
      Name of the resource property that defines whether or not the title value is taken from the configured asset.
      static java.lang.String PN_TITLE_TYPE
      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

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default boolean displayFilename()
      Checks if the filename should be displayed.
      default boolean displayFormat()
      Checks if the file format should be displayed.
      default boolean displaySize()
      Checks if the file size should be displayed.
      default java.lang.String getActionText()
      Returns the action text from the dialog if it is configured there.
      default java.lang.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.
      default java.lang.String getExtension()
      Returns the extension of file to be downloaded.
      default java.lang.String getFilename()
      Returns the filename of the file to be downloaded.
      default java.lang.String getFormat()
      Returns the mime type of the file to be downloaded.
      default java.lang.String getSize()
      Returns the size of the file to be downloaded.
      default java.lang.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.
      default java.lang.String getTitleType()
      Returns the HTML element to be used for the title as defined in the component policy.
      default java.lang.String getUrl()
      Returns the url to the asset.
      default boolean hideTitleLink()
      Checks if the title link should be hidden.
    • Field Detail

      • PN_TITLE_FROM_ASSET

        static final java.lang.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:
        Constant Field Values
      • PN_DESCRIPTION_FROM_ASSET

        static final java.lang.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:
        Constant Field Values
      • PN_INLINE

        static final java.lang.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:
        Constant Field Values
      • PN_ACTION_TEXT

        static final java.lang.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:
        Constant Field Values
      • PN_TITLE_TYPE

        static final java.lang.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:
        getTitleType(), Constant Field Values
      • PN_DISPLAY_SIZE

        static final java.lang.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:
        Constant Field Values
      • PN_DISPLAY_FORMAT

        static final java.lang.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:
        Constant Field Values
      • PN_DISPLAY_FILENAME

        static final java.lang.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:
        Constant Field Values
      • PN_HIDE_TITLE_LINK

        static final java.lang.String 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:
        Constant Field Values
    • Method Detail

      • getTitle

        default java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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