Class MessageDelivery
java.lang.Object
no.digipost.api.client.representations.Representation
no.digipost.api.client.representations.MessageDelivery
- All Implemented Interfaces:
MayHaveSender
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Channelprotected ZonedDateTimeprotected Stringprotected Documentprotected longprotected MessageStatusFields inherited from class no.digipost.api.client.representations.Representation
linksFields inherited from interface no.digipost.api.client.representations.MayHaveSender
NO_SENDER -
Constructor Summary
ConstructorsConstructorDescriptionMessageDelivery(String messageId, Channel channel, MessageStatus status, ZonedDateTime deliveryTime) -
Method Summary
Modifier and TypeMethodDescriptiongetDocument(UUID uuid) getLinks()Always returns the resolved sender-id of the message, i.e.booleanbooleanisSameMessageAs(Message message) protected voidbooleanMethods inherited from class no.digipost.api.client.representations.Representation
addLink, getLinkByRelationName
-
Field Details
-
messageId
-
deliveryMethod
-
senderId
protected long senderId -
status
-
deliveryTime
-
-
attachments
-
-
Constructor Details
-
MessageDelivery
public MessageDelivery() -
MessageDelivery
public MessageDelivery(String messageId, Channel channel, MessageStatus status, ZonedDateTime deliveryTime)
-
-
Method Details
-
getLinks
-
setLinks
-
getMessageId
-
getAttachments
-
isSameMessageAs
-
getStatus
-
getEncryptionKeyLink
-
getSendLink
-
willBeDeliveredInDigipost
public boolean willBeDeliveredInDigipost() -
isAlreadyDeliveredToDigipost
public boolean isAlreadyDeliveredToDigipost() -
getSelfLink
-
getChannel
-
getDeliveryTime
-
getPrimaryDocument
-
getAllDocuments
- Returns:
- an ordered Stream containing every
Documentin this delivery. The primary document will be the first element of the stream, with the attachments following.
-
getDocument
-
getSenderId
Always returns the resolved sender-id of the message, i.e. what the receiver of the message sees as the sender of the message. If the originatingMessagehas specified nosender-idnorsender-organization, it will be set to the broker-id which was specified in the X-Digipost-UserId header of the initiating request.- Specified by:
getSenderIdin interfaceMayHaveSender- Returns:
- always the sender-id, never
null.
-
getSenderOrganization
- Specified by:
getSenderOrganizationin interfaceMayHaveSender- Returns:
- always
Optional.empty() - See Also:
-