Class Media.FileOrLinkMedia<T extends Media.FileOrLinkMedia<T>>

    • Field Detail

      • collection

        protected String collection
      • occurrenceKey

        @Nullable
        protected String occurrenceKey
    • Method Detail

      • id

        public T id​(String id)
        Replaces the id that was set when the node was constructed.

        In most cases, this library does not allow the modification of any of the values

        Specified by:
        id in interface InternalMediaNode
        Parameters:
        id - the new id for this media node
        Returns:
        this
      • collection

        public T collection​(@Nullable
                            String collection)
        Replaces the collection ID that was set when the node was constructed.
        Specified by:
        collection in interface InternalMediaNode
        Parameters:
        collection - the new collection for this media node
        Returns:
        this
      • id

        public String id()
        Returns the media node's ID.
        Specified by:
        id in interface InternalMediaNode
        Returns:
        the media node's ID.
      • collection

        public String collection()
        Returns the media node's collection ID.
        Specified by:
        collection in interface InternalMediaNode
        Returns:
        the media node's collection ID.
      • occurrenceKey

        public Optional<String> occurrenceKey()
        Returns the media node's occurrence key, if set.
        Specified by:
        occurrenceKey in interface InternalMediaNode
        Returns:
        the media node's occurrence key, or empty() if not set.
      • occurrenceKey

        public T occurrenceKey​(@Nullable
                               String occurrenceKey)
        Sets the occurrence key for this media item. Although this attribute is optional, it must be set to enable deletion of files from a collection.
        Specified by:
        occurrenceKey in interface InternalMediaNode
        Parameters:
        occurrenceKey - the occurrence key value
        Returns:
        this
      • isExternal

        public boolean isExternal()
        Specified by:
        isExternal in interface Media
      • toMap

        public Map<String,​?> toMap()
        Description copied from interface: Element
        Transforms this element to a map of String values to various basic object types suitable for direct rendering as JSON content.
        Specified by:
        toMap in interface Element
        Returns:
        the map representation of this ADF element