Interface MediaCollectionElement

    • Method Detail

      • getMediaItems

        @ReferField(stored=false,
                    indexed=true,
                    adapter=ContentReferenceFieldAdapter.class)
        MediaItem[] getMediaItems()
        Returns an array of media items associated with the media collection element (either by manual assignment or by executing a query based on the provided information). If a media item has been removed in the meantime or cannot be retrieved for any other reason, the media item may be returned as null in this array.
        Returns:
        array of MediaItem.
      • getMediaItemVersions

        MediaItemVersion[] getMediaItemVersions()
        Returns an array of the current mediaItemVersion from each mediaitem in this MediaCollectionElement
        Returns:
        array of MediaItemVersion.
      • appendMediaItem

        void appendMediaItem​(MediaItem mediaItem)
        Appends a mediaItem at the end of the list.
        Parameters:
        mediaItem - The mediaItem to be added
      • insertMediaItem

        void insertMediaItem​(int position,
                             MediaItem mediaItem)
        Inserts a mediaItem at the specified position in the list, or at the first position if this is the first item.
        Parameters:
        position - The zero bound position at which the MediaItem needs to be added
        mediaItem - The mediaItem to be added
      • setMediaItems

        void setMediaItems​(MediaItem[] mediaItems)
        Set or replace the mediaitems within this element with the ones provided.
        Parameters:
        mediaItems - The MediaItems Array that need to be set
      • removeMediaItem

        void removeMediaItem​(int position)
        Remove a mediaItem at the specified position in the list.
        Parameters:
        position - The zero bound position at which the MediaItem needs to be removed
      • getNumberOfMediaItems

        int getNumberOfMediaItems()
        Returns the number of mediaitemss in this list.
        Returns:
        Mediaitem array
      • isShownOnCurrentPage

        @Deprecated
        boolean isShownOnCurrentPage()
        Deprecated.
        Indicates whether target page of media item is ignored.
        Returns:
        indication whether target page of media item is ignored
      • getTargetType

        MediaCollectionElement.TargetType getTargetType()
        Indicates how the target page needs to determined.
        Returns:
        indication of the target type to be used
      • setTargetType

        void setTargetType​(MediaCollectionElement.TargetType targetType)
        Sets how the target page needs to determined. For example: element.setTargetType(MediaCollectionElement.TargetType.ALTERNATIVE_PAGE);
        Parameters:
        indication - of the target type to be used
      • getAlternativeTargetPage

        Page getAlternativeTargetPage()
        Target page to be used in case ALTERNATIVE_PAGE
        Returns:
        target page to be used in case of ALTERNATIVE_PAGE
      • setAlternativeTargetPage

        void setAlternativeTargetPage​(Page page)
        Set the Target page to be used in case ALTERNATIVE_PAGE.
        Parameters:
        target - page to be used in case of ALTERNATIVE_PAGE
      • getTitle

        String getTitle()
        Returns the title of the element.
        Specified by:
        getTitle in interface Element
        Returns:
        the title of the element
      • setTitle

        void setTitle​(String title)
        Sets the title of the element.
        Specified by:
        setTitle in interface Element
        Parameters:
        the - title of the element
      • getLinkCode

        String getLinkCode()
        Returns the internal link code needed to place an internal link tag in the element.
        Returns:
        the internal link code needed to place an internal link tag in the element.
        Since:
        10.37.0
      • setLinkCode

        void setLinkCode​(String linkCode)
        Sets the internal link code needed to place an internal link tag in the element.
        Parameters:
        code - the internal link code needed to place an internal link tag in the element.
        Since:
        10.37.0
      • getLinkText

        String getLinkText()
        Returns the text to be used for the link corresponding to the internal link code in the element.
        Returns:
        the text to be used for the link corresponding to the internal link code in the element.
        Since:
        10.37.0
      • setLinkText

        void setLinkText​(String linkText)
        Sets the text to be used for the link corresponding to the internal link code in the element.
        Parameters:
        linkText - the text to be used for the link corresponding to the internal link code in the element.
        Since:
        10.37.0