Class FasteningElement.Builder
- java.lang.Object
-
- org.jivesoftware.smackx.message_fastening.element.FasteningElement.Builder
-
- Enclosing class:
- FasteningElement
public static class FasteningElement.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FasteningElement.Builder
addExternalPayload(ExternalElement externalPayload)
Add an external payload.FasteningElement.Builder
addExternalPayloads(List<ExternalElement> externalPayloads)
Add multiple external payloads at once.FasteningElement.Builder
addWrappedPayload(ExtensionElement wrappedPayload)
Add a wrapped payload.FasteningElement.Builder
addWrappedPayloads(List<ExtensionElement> wrappedPayloads)
Add multiple wrapped payloads at once.FasteningElement
build()
Build the element.FasteningElement.Builder
setClear()
Declare thisFasteningElement
to remove previous fastenings.FasteningElement.Builder
setOriginId(String originIdString)
Set the origin-id of the referenced message.FasteningElement.Builder
setOriginId(OriginIdElement originId)
Set theOriginIdElement
of the referenced message.FasteningElement.Builder
setShell()
Declare thisFasteningElement
to be a shell element.
-
-
-
Constructor Detail
-
Builder
public Builder()
-
-
Method Detail
-
setOriginId
public FasteningElement.Builder setOriginId(String originIdString)
Set the origin-id of the referenced message.- Parameters:
originIdString
- origin id as String- Returns:
- builder instance
-
setOriginId
public FasteningElement.Builder setOriginId(OriginIdElement originId)
Set theOriginIdElement
of the referenced message.- Parameters:
originId
- origin-id as element- Returns:
- builder instance
-
addWrappedPayload
public FasteningElement.Builder addWrappedPayload(ExtensionElement wrappedPayload)
Add a wrapped payload.- Parameters:
wrappedPayload
- wrapped payload- Returns:
- builder instance
-
addWrappedPayloads
public FasteningElement.Builder addWrappedPayloads(List<ExtensionElement> wrappedPayloads)
Add multiple wrapped payloads at once.- Parameters:
wrappedPayloads
- list of wrapped payloads- Returns:
- builder instance
-
addExternalPayload
public FasteningElement.Builder addExternalPayload(ExternalElement externalPayload)
Add an external payload.- Parameters:
externalPayload
- external payload- Returns:
- builder instance
-
addExternalPayloads
public FasteningElement.Builder addExternalPayloads(List<ExternalElement> externalPayloads)
Add multiple external payloads at once.- Parameters:
externalPayloads
- external payloads- Returns:
- builder instance
-
setClear
public FasteningElement.Builder setClear()
Declare thisFasteningElement
to remove previous fastenings. Semantically the wrapped payloads of this element declares all wrapped payloads from the referenced fastening element that share qualified names as removed.- Returns:
- builder instance
- See Also:
- XEP-0422: Message Fastening §3.4 Removing fastenings
-
setShell
public FasteningElement.Builder setShell()
Declare thisFasteningElement
to be a shell element. Shell elements are used as hints that a Stanza Content Encryption payload contains another sensitiveFasteningElement
. The outer "shell"FasteningElement
is used to do fastening collation.- Returns:
- builder instance
- See Also:
- XEP-0422: Message Fastening §3.5 Interaction with stanza encryption, XEP-0420: Stanza Content Encryption
-
build
public FasteningElement build()
Build the element.- Returns:
- built element.
-
-