Class EmbedCard
- java.lang.Object
-
- com.atlassian.adf.model.node.AbstractNode<EmbedCard>
-
- com.atlassian.adf.model.node.EmbedCard
-
- All Implemented Interfaces:
Element,Node,DocContent,LayoutColumnContent,NonNestableBlockContent,TableCellContent
@Documentation(state=UNDOCUMENTED, date="2023-07-26") public class EmbedCard extends AbstractNode<EmbedCard> implements DocContent, LayoutColumnContent, NonNestableBlockContent, TableCellContent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceEmbedCard.PartialTypes that represent a partially constructedembedCard.-
Nested classes/interfaces inherited from class com.atlassian.adf.model.node.AbstractNode
AbstractNode.ToStringHelper
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EmbedCardalignEnd()EmbedCardalignStart()protected voidappendNodeFields(AbstractNode.ToStringHelper buf)Allows nodes that have their own fields to augment thetoString()implementation with their own field values.EmbedCardcenter()EmbedCardcopy()Returns a deep copy of this element, including copies of any nodes or marks that it contains.StringelementType()Thetypevalue that identifies this element, such as"paragraph"or"strong".static EmbedCard.Partial.NeedsLayoutembedCard()static EmbedCard.Partial.NeedsUrlembedCard(RichMedia.Layout layout)static EmbedCardembedCard(RichMedia.Layout layout, URI url)static EmbedCardembedCard(RichMedia.Layout layout, URL url)static EmbedCard.Partial.NeedsUrlembedCard(String layout)EmbedCardfullWidth()RichMedia.Layoutlayout()EmbedCardlayout(RichMedia.Layout layout)EmbedCardlayout(String layout)protected booleannodeEquals(EmbedCard other)Allows nodes that have their own fields to augment theequalsimplementation with tests for their own field values.protected intnodeHashCode()Allows nodes that have their own fields to augment thehashCodeimplementation with a hash of their own field values.Optional<Number>originalHeight()EmbedCardoriginalHeight(Number originalHeight)EmbedCardoriginalSize(Number originalWidth, Number originalHeight)Optional<Number>originalWidth()EmbedCardoriginalWidth(Number originalWidth)Map<String,?>toMap()Transforms this element to a map ofStringvalues to various basic object types suitable for direct rendering as JSON content.Stringurl()EmbedCardurl(String url)EmbedCardurl(URI url)EmbedCardurl(URL url)voidvalidate()Verifies that the node is well-formed (including the state of any descendents that it has).EmbedCardwide()Optional<Number>width()EmbedCardwidth(Number width)EmbedCardwrapLeft()EmbedCardwrapRight()-
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
isSupported
-
Methods inherited from interface com.atlassian.adf.model.node.Node
appendPlainText, toPlainText
-
-
-
-
Method Detail
-
embedCard
public static EmbedCard embedCard(RichMedia.Layout layout, URL url)
-
embedCard
public static EmbedCard embedCard(RichMedia.Layout layout, URI url)
-
embedCard
public static EmbedCard.Partial.NeedsLayout embedCard()
-
embedCard
public static EmbedCard.Partial.NeedsUrl embedCard(String layout)
-
embedCard
public static EmbedCard.Partial.NeedsUrl embedCard(RichMedia.Layout layout)
-
layout
public RichMedia.Layout layout()
-
layout
public EmbedCard layout(RichMedia.Layout layout)
-
wide
public EmbedCard wide()
-
fullWidth
public EmbedCard fullWidth()
-
center
public EmbedCard center()
-
wrapRight
public EmbedCard wrapRight()
-
wrapLeft
public EmbedCard wrapLeft()
-
alignEnd
public EmbedCard alignEnd()
-
alignStart
public EmbedCard alignStart()
-
url
public String url()
-
copy
public EmbedCard 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.
-
elementType
public String elementType()
Description copied from interface:ElementThetypevalue that identifies this element, such as"paragraph"or"strong".- Specified by:
elementTypein interfaceElement
-
nodeEquals
protected boolean nodeEquals(EmbedCard other)
Description copied from class:AbstractNodeAllows nodes that have their own fields to augment theequalsimplementation with tests for their own field values.Implementations need not check for identity,
null, or a different node class; those are already covered by theAbstractNode.equals(Object)implementation that is expected to be this method's only consumer.Just as with the relationship between
hashCode,equals, andtoStringfor ordinary Java classes, subclasses ofAbstractNodeshould maintain consistent implementations ofnodeHashCode,nodeEquals, andappendNodeFields.- Overrides:
nodeEqualsin classAbstractNode<EmbedCard>- Returns:
trueif all additional field values that belong to a particular type of content node test as equal;falseif differences are found- See Also:
AbstractNode.nodeHashCode(),AbstractNode.appendNodeFields(ToStringHelper)
-
nodeHashCode
protected int nodeHashCode()
Description copied from class:AbstractNodeAllows nodes that have their own fields to augment thehashCodeimplementation with a hash of their own field values.Implementations need not include the node's class; that is already covered by the
AbstractNode.hashCode()implementation that is expected to be this method's only consumer.Just as with the relationship between
hashCode,equals, andtoStringfor ordinary Java classes, subclasses ofAbstractNodeshould maintain consistent implementations ofnodeHashCode,nodeEquals, andappendNodeFields.- Overrides:
nodeHashCodein classAbstractNode<EmbedCard>- Returns:
- the hash code of any additional field values that belong to a particular type of content node.
- See Also:
AbstractNode.nodeEquals(AbstractNode),AbstractNode.appendNodeFields(ToStringHelper)
-
appendNodeFields
protected void appendNodeFields(AbstractNode.ToStringHelper buf)
Description copied from class:AbstractNodeAllows nodes that have their own fields to augment thetoString()implementation with their own field values.Each field's value should be provided by calling
AbstractNode.ToStringHelper.appendField(String, Object). Thevaluemay benull, in which case the field is omitted, for brevity. It will handle array values gracefully, including arrays of primitive types.Just as with the relationship between
hashCode,equals, andtoStringfor ordinary Java classes, subclasses ofAbstractNodeshould maintain consistent implementations ofnodeHashCode,nodeEquals, andappendNodeFields.- Overrides:
appendNodeFieldsin classAbstractNode<EmbedCard>- Parameters:
buf- where the field values should be written- See Also:
AbstractNode.nodeHashCode(),AbstractNode.nodeEquals(AbstractNode)
-
toMap
public Map<String,?> toMap()
Description copied from interface:ElementTransforms this element to a map ofStringvalues to various basic object types suitable for direct rendering as JSON content.
-
-