Package com.atlassian.adf.model.node
Class Media.LinkMedia
- java.lang.Object
-
- com.atlassian.adf.model.node.AbstractNode<N>
-
- com.atlassian.adf.model.node.Media.AbstractMedia<T>
-
- com.atlassian.adf.model.node.Media.FileOrLinkMedia<Media.LinkMedia>
-
- com.atlassian.adf.model.node.Media.LinkMedia
-
- All Implemented Interfaces:
Element,Media,Node,InternalMediaNode,Marked<Media,MediaMark>,Fold3<Media.FileMedia,Media.LinkMedia,Media.ExternalMedia>
- Enclosing interface:
- Media
public static class Media.LinkMedia extends Media.FileOrLinkMedia<Media.LinkMedia>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.atlassian.adf.model.node.AbstractNode
AbstractNode.ToStringHelper
-
Nested classes/interfaces inherited from interface com.atlassian.adf.model.node.Media
Media.AbstractMedia<N extends Media.AbstractMedia<N>>, Media.ExternalMedia, Media.FileMedia, Media.FileOrLinkMedia<T extends Media.FileOrLinkMedia<T>>, Media.LinkMedia, Media.MediaType, Media.Partial
-
-
Field Summary
-
Fields inherited from class com.atlassian.adf.model.node.Media.FileOrLinkMedia
collection, id, occurrenceKey
-
Fields inherited from class com.atlassian.adf.model.node.Media.AbstractMedia
alt, height, width
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Media.LinkMediacopy()Returns a deep copy of this element, including copies of any nodes or marks that it contains.Optional<Media.FileMedia>file()<R> Rfold(Function<? super Media.FileMedia,? extends R> ifFile, Function<? super Media.LinkMedia,? extends R> ifLink, Function<? super Media.ExternalMedia,? extends R> ifExternal)booleanisFile()booleanisLink()Deprecated.Most of the support forlinkmedia no longer functions in the editor code base, so clients are unlikely to encounter it in the wild and should not use it in new ADF.Optional<Media.LinkMedia>link()Media.MediaTypetype()Returns the media node's type.-
Methods inherited from class com.atlassian.adf.model.node.Media.FileOrLinkMedia
appendMediaFields, collection, collection, external, id, id, isExternal, mediaEquals, mediaHashCode, occurrenceKey, occurrenceKey, toMap
-
Methods inherited from class com.atlassian.adf.model.node.Media.AbstractMedia
accept, addCommonAttrs, alt, alt, appendNodeFields, border, border, border, border, elementType, height, height, ifExternal, ifFile, ifLink, link, link, linkMark, linkMark, linkMark, linkMark, mark, mark, markClass, marks, marks, markTypes, nodeEquals, nodeHashCode, parseCommonAttrs, size, validate, width, width
-
Methods inherited from class com.atlassian.adf.model.node.AbstractNode
appendPlainText, doubleEq, doubleHash, equals, hashCode, isSupported, mapWithType, numberEq, numberHash, self, toPlainText, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.atlassian.adf.model.Element
elementType, isSupported, validate
-
Methods inherited from interface com.atlassian.adf.model.node.Node
appendPlainText, toPlainText
-
-
-
-
Method Detail
-
copy
public Media.LinkMedia copy()
Description copied from interface:ElementReturns a deep copy of this element, including copies of any nodes or marks that it contains. The copy will not necessarily be in exactly the same state as the original in some cases. For example, atextnode that is used inside acodeBlockwill have the ability to use marks on it disabled, but a copy made of the text node using this method will not similarly disallow marks unless it is also added to a content node with those same restrictions.Implementations notes:
- Implementations should narrow the return type.
- Implementations should
return thisif the element is immutable. The@Immutableannotation should be used on the class to offer additional confirmation of this intent. - Implementations should
return parse(toMap())if they have state. - While there may be cases where it is worthwhile to do something more efficient than
the conversion to a map and back, this is discouraged because it would add yet another
fragile piece of code that breaks when new data is added to the node. The
parseandtoMapmethods already have to be updated in these circumstances, so it makes sense to take advantage of that.
- Returns:
- a copy of this element, or
thisif the element is immutable anyway
-
type
public Media.MediaType type()
Description copied from interface:MediaReturns the media node's type.- Returns:
- the media node's type.
-
file
public Optional<Media.FileMedia> file()
-
link
public Optional<Media.LinkMedia> link()
-
isFile
public boolean isFile()
-
isLink
@Deprecated public boolean isLink()
Deprecated.Most of the support forlinkmedia no longer functions in the editor code base, so clients are unlikely to encounter it in the wild and should not use it in new ADF.
-
fold
public <R> R fold(Function<? super Media.FileMedia,? extends R> ifFile, Function<? super Media.LinkMedia,? extends R> ifLink, Function<? super Media.ExternalMedia,? extends R> ifExternal)
-
-