Package com.atlassian.adf.model.node
Class BlockCard.CardAttributes
- java.lang.Object
-
- com.atlassian.adf.model.node.BlockCard.CardAttributes
-
- All Implemented Interfaces:
Fold3<String,Map<String,?>,BlockCard.Datasource>
- Direct Known Subclasses:
BlockCard.Datasource
- Enclosing class:
- BlockCard
public abstract static class BlockCard.CardAttributes extends Object implements Fold3<String,Map<String,?>,BlockCard.Datasource>
A sum type providing access to the link data for this card.
-
-
Constructor Summary
Constructors Constructor Description CardAttributes()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidaccept(Consumer<? super String> ifUrl, Consumer<? super Map<String,?>> ifData, Consumer<? super BlockCard.Datasource> ifDatasource)Do something with either the URI or JSON-LD data, as appropriate.abstract <T> Tfold(Function<? super String,? extends T> ifUrl, Function<? super Map<String,?>,? extends T> ifData, Function<? super BlockCard.Datasource,? extends T> ifDatasource)Transforms the link data into a desired resulting output form.
-
-
-
Method Detail
-
fold
public abstract <T> T fold(Function<? super String,? extends T> ifUrl, Function<? super Map<String,?>,? extends T> ifData, Function<? super BlockCard.Datasource,? extends T> ifDatasource)
Transforms the link data into a desired resulting output form. This method provides theurlvalue as a raw string without verifying that it is a valid URI.- Specified by:
foldin interfaceFold3<String,Map<String,?>,BlockCard.Datasource>- Type Parameters:
T- the inferred output data type of the mappings- Parameters:
ifUrl- the mapping to be applied if the link data is in the URI format.ifData- the mapping to be applied if the link data is in JSON-LD format.ifDatasource- the mapping to be applied if the link data is in datasource format.- Returns:
- the result of applying the appropriate mapping function
-
accept
public abstract void accept(Consumer<? super String> ifUrl, Consumer<? super Map<String,?>> ifData, Consumer<? super BlockCard.Datasource> ifDatasource)
Do something with either the URI or JSON-LD data, as appropriate. This method provides theurlvalue as a raw string without verifying that it is a valid URI.- Specified by:
acceptin interfaceFold3<String,Map<String,?>,BlockCard.Datasource>- Parameters:
ifUrl- what to do with the URI if that is the form the link was provided in.ifData- what to do with the JSON-LD if that is the form the link was provided in.ifDatasource- what to do with the datasource if that is the form the link was provided in.
-
-