Class Message
java.lang.Object
no.digipost.api.client.representations.Message
- All Implemented Interfaces:
MayHaveSender
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Batchfinal ZonedDateTimefinal Stringfinal Stringfinal Documentfinal PrintIfUnreadfinal MessageRecipientfinal RequestForRegistrationfinal Longfinal SenderOrganizationFields inherited from interface no.digipost.api.client.representations.MayHaveSender
NO_SENDER -
Method Summary
Modifier and TypeMethodDescriptionstatic MessagecopyMessageWithOnlyDigipostDetails(Message messageToCopy) static MessagecopyPrintMessage(Message messageToCopy) Copies a message and forces all its documents to have file type of PDF.Comparator<? super Document>booleanbooleanbooleanisSameMessageAs(Message message) static Message.MessageBuildernewMessage(String messageId, Document primaryDocument) static Message.MessageBuildernewMessage(UUID messageId, Document primaryDocument) toString()
-
Field Details
-
messageId
-
senderId
-
senderOrganization
-
recipient
-
deliveryTime
-
invoiceReference
-
-
attachments
-
printIfUnread
-
requestForRegistration
-
batch
-
-
Method Details
-
newMessage
-
newMessage
-
copyPrintMessage
Copies a message and forces all its documents to have file type of PDF.- Parameters:
messageToCopy- message to copy- Returns:
- a copy of
messageToCopy
-
copyMessageWithOnlyDigipostDetails
-
getAllDocuments
- Returns:
- an ordered Stream containing every
Documentin this message. The primary document will be the first element of the list, with the attachments following.
-
isDirectPrint
public boolean isDirectPrint() -
isSameMessageAs
-
hasAnyDocumentRequiringEncryption
public boolean hasAnyDocumentRequiringEncryption() -
getChannel
-
documentOrder
- Returns:
Comparatorwhich order documents by the same order as they are contained in this message. If a document
-
getSenderId
- Specified by:
getSenderIdin interfaceMayHaveSender- Returns:
- the sender ID, or
Optional.empty()if it does not exist.
-
getSenderOrganization
- Specified by:
getSenderOrganizationin interfaceMayHaveSender- Returns:
- the sender organization, or
Optional.empty()if it does not exist.
-
toString
-