Class ElementalNode
-
- All Implemented Interfaces:
public final class ElementalNodeThe channel element allows a notification to be customized based on which channel it is sent through. For example, you may want to display a detailed message when the notification is sent through email, and a more concise message in a push notification. Channel elements are only valid as top-level elements; you cannot nest channel elements. If there is a channel element specified at the top-level of the document, all sibling elements must be channel elements. Note: As an alternative, most elements support a
channelproperty. Which allows you to selectively display an individual element on a per channel basis. See the control flow docs for more details.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceElementalNode.VisitorAn interface that defines how to map each variant of ElementalNode to a value of type T.
-
Method Summary
-
-
Method Detail
-
textNodeWithType
final Optional<ElementalTextNodeWithType> textNodeWithType()
-
metaNodeWithType
final Optional<ElementalMetaNodeWithType> metaNodeWithType()
-
channelNodeWithType
final Optional<ElementalChannelNodeWithType> channelNodeWithType()
The channel element allows a notification to be customized based on which channel it is sent through. For example, you may want to display a detailed message when the notification is sent through email, and a more concise message in a push notification. Channel elements are only valid as top-level elements; you cannot nest channel elements. If there is a channel element specified at the top-level of the document, all sibling elements must be channel elements. Note: As an alternative, most elements support a
channelproperty. Which allows you to selectively display an individual element on a per channel basis. See the control flow docs for more details.
-
imageNodeWithType
final Optional<ElementalImageNodeWithType> imageNodeWithType()
-
actionNodeWithType
final Optional<ElementalActionNodeWithType> actionNodeWithType()
-
dividerNodeWithType
final Optional<ElementalDividerNodeWithType> dividerNodeWithType()
-
quoteNodeWithType
final Optional<ElementalQuoteNodeWithType> quoteNodeWithType()
-
isTextNodeWithType
final Boolean isTextNodeWithType()
-
isMetaNodeWithType
final Boolean isMetaNodeWithType()
-
isChannelNodeWithType
final Boolean isChannelNodeWithType()
-
isImageNodeWithType
final Boolean isImageNodeWithType()
-
isActionNodeWithType
final Boolean isActionNodeWithType()
-
isDividerNodeWithType
final Boolean isDividerNodeWithType()
-
isQuoteNodeWithType
final Boolean isQuoteNodeWithType()
-
asTextNodeWithType
final ElementalTextNodeWithType asTextNodeWithType()
-
asMetaNodeWithType
final ElementalMetaNodeWithType asMetaNodeWithType()
-
asChannelNodeWithType
final ElementalChannelNodeWithType asChannelNodeWithType()
The channel element allows a notification to be customized based on which channel it is sent through. For example, you may want to display a detailed message when the notification is sent through email, and a more concise message in a push notification. Channel elements are only valid as top-level elements; you cannot nest channel elements. If there is a channel element specified at the top-level of the document, all sibling elements must be channel elements. Note: As an alternative, most elements support a
channelproperty. Which allows you to selectively display an individual element on a per channel basis. See the control flow docs for more details.
-
asImageNodeWithType
final ElementalImageNodeWithType asImageNodeWithType()
-
asActionNodeWithType
final ElementalActionNodeWithType asActionNodeWithType()
-
asDividerNodeWithType
final ElementalDividerNodeWithType asDividerNodeWithType()
-
asQuoteNodeWithType
final ElementalQuoteNodeWithType asQuoteNodeWithType()
-
accept
final <T extends Any> T accept(ElementalNode.Visitor<T> visitor)
-
validate
final ElementalNode validate()
-
ofTextNodeWithType
final static ElementalNode ofTextNodeWithType(ElementalTextNodeWithType textNodeWithType)
-
ofMetaNodeWithType
final static ElementalNode ofMetaNodeWithType(ElementalMetaNodeWithType metaNodeWithType)
-
ofChannelNodeWithType
final static ElementalNode ofChannelNodeWithType(ElementalChannelNodeWithType channelNodeWithType)
The channel element allows a notification to be customized based on which channel it is sent through. For example, you may want to display a detailed message when the notification is sent through email, and a more concise message in a push notification. Channel elements are only valid as top-level elements; you cannot nest channel elements. If there is a channel element specified at the top-level of the document, all sibling elements must be channel elements. Note: As an alternative, most elements support a
channelproperty. Which allows you to selectively display an individual element on a per channel basis. See the control flow docs for more details.
-
ofImageNodeWithType
final static ElementalNode ofImageNodeWithType(ElementalImageNodeWithType imageNodeWithType)
-
ofActionNodeWithType
final static ElementalNode ofActionNodeWithType(ElementalActionNodeWithType actionNodeWithType)
-
ofDividerNodeWithType
final static ElementalNode ofDividerNodeWithType(ElementalDividerNodeWithType dividerNodeWithType)
-
ofQuoteNodeWithType
final static ElementalNode ofQuoteNodeWithType(ElementalQuoteNodeWithType quoteNodeWithType)
-
-
-
-