Class FasteningElement.Builder
java.lang.Object
org.jivesoftware.smackx.message_fastening.element.FasteningElement.Builder
- Enclosing class:
- FasteningElement
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExternalPayload(ExternalElement externalPayload) Add an external payload.addExternalPayloads(List<ExternalElement> externalPayloads) Add multiple external payloads at once.addWrappedPayload(XmlElement wrappedPayload) Add a wrapped payload.addWrappedPayloads(List<XmlElement> wrappedPayloads) Add multiple wrapped payloads at once.build()Build the element.setClear()Declare thisFasteningElementto remove previous fastenings.setOriginId(String originIdString) Set the origin-id of the referenced message.setOriginId(OriginIdElement originId) Set theOriginIdElementof the referenced message.setShell()Declare thisFasteningElementto be a shell element.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setOriginId
Set the origin-id of the referenced message.- Parameters:
originIdString- origin id as String- Returns:
- builder instance
-
setOriginId
Set theOriginIdElementof the referenced message.- Parameters:
originId- origin-id as element- Returns:
- builder instance
-
addWrappedPayload
Add a wrapped payload.- Parameters:
wrappedPayload- wrapped payload- Returns:
- builder instance
-
addWrappedPayloads
Add multiple wrapped payloads at once.- Parameters:
wrappedPayloads- list of wrapped payloads- Returns:
- builder instance
-
addExternalPayload
Add an external payload.- Parameters:
externalPayload- external payload- Returns:
- builder instance
-
addExternalPayloads
Add multiple external payloads at once.- Parameters:
externalPayloads- external payloads- Returns:
- builder instance
-
setClear
Declare thisFasteningElementto 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:
-
setShell
Declare thisFasteningElementto be a shell element. Shell elements are used as hints that a Stanza Content Encryption payload contains another sensitiveFasteningElement. The outer "shell"FasteningElementis used to do fastening collation.- Returns:
- builder instance
- See Also:
-
build
Build the element.- Returns:
- built element.
-