Package com.helger.phase4.incoming
Interface IAS4IncomingMessageState
- All Known Implementing Classes:
AS4IncomingMessageState
public interface IAS4IncomingMessageState
Read-only AS4 message state for incoming messages.
Old name before v3:
Old name before v3:
IAS4MessageState- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleancontainsCompressedAttachmentID(@Nullable String sID) @Nullable IAS4Profiledefault @Nullable EAS4CompressionModegetAttachmentCompressionMode(@Nullable String sID) @Nullable com.helger.collection.commons.ICommonsMap<String, EAS4CompressionMode> @Nullable IAS4CryptoFactory@Nullable IAS4CryptoFactory@Nullable com.helger.collection.commons.ICommonsList<WSS4JAttachment> @Nullable Document@Nullable X509Certificate@Nullable org.apache.wss4j.dom.str.STRParser.REFERENCE_TYPEdefault @Nullable Ebms3Errordefault @Nullable Ebms3PullRequestdefault @Nullable Ebms3Receiptdefault @Nullable Ebms3SignalMessagedefault @Nullable Ebms3UserMessagedefault @Nullable Document@Nullable PModeLegint@Nullable String@NonNull Locale@Nullable String@Nullable com.helger.datetime.xml.XMLOffsetDateTime@Nullable Ebms3Messaging@Nullable IMPCgetMPC()@Nullable com.helger.collection.commons.ICommonsList<WSS4JAttachment> @Nullable Document@Nullable IPModegetPMode()default @Nullable String@NonNull OffsetDateTime@Nullable String@NonNull AS4ResourceHelper@Nullable String@Nullable X509Certificate@Nullable org.apache.wss4j.dom.str.STRParser.REFERENCE_TYPE@Nullable Node@NonNull ESoapVersion@Nullable Exceptionintdefault booleandefault booleandefault booleandefault booleandefault booleandefault booleandefault booleanhasMPC()default booleandefault booleandefault booleandefault booleandefault booleandefault booleanbooleanbooleanbooleanbooleanboolean
-
Method Details
-
getReceiptDT
@NonNull OffsetDateTime getReceiptDT()- Returns:
- Date and time when the receipt started. This must be set in the implementation and
never
null.
-
getSoapVersion
@NonNull ESoapVersion getSoapVersion()- Returns:
- The SOAP version of the current request as specified in the constructor. Never
null. - Since:
- v0.9.8
-
getResourceHelper
@NonNull AS4ResourceHelper getResourceHelper()- Returns:
- The resource manager as specified in the constructor. Never
null.
-
getLocale
@NonNull Locale getLocale()- Returns:
- The request locale to use. Never
null.
-
getMessaging
@Nullable Ebms3Messaging getMessaging()- Returns:
- The parent of the user message/signal message for further evaluation.
-
getEbmsUserMessage
- Returns:
- The EBMS user message. May be
null. - Since:
- v0.9.7
-
getEbmsSignalMessage
- Returns:
- The EBMS signal message. May be
null. - Since:
- v0.9.7
-
getEbmsError
- Returns:
- The EBMS signal message error. May be
null. - Since:
- v0.9.7
-
getEbmsPullRequest
- Returns:
- The EBMS signal message pull request. May be
null. - Since:
- v0.9.7
-
getEbmsReceipt
- Returns:
- The EBMS signal message receipt. May be
null. - Since:
- v0.9.7
-
getPMode
@Nullable IPMode getPMode()- Returns:
- the PMode that is used with the current message. May be
nullif none was found.
-
getOriginalSoapDocument
@Nullable Document getOriginalSoapDocument()- Returns:
- get the original SOAP document, only the entire document no attachment. This might by encrypted.
- Since:
- v0.9.8
- See Also:
-
hasOriginalSoapDocument
default boolean hasOriginalSoapDocument()- Returns:
trueif an original SOAP document is present,falseif not.- See Also:
-
getOriginalAttachments
@Nullable com.helger.collection.commons.ICommonsList<WSS4JAttachment> getOriginalAttachments()- Returns:
- has saved the original attachment, can be encrypted or not depends if encryption is used or not.
- See Also:
-
hasOriginalAttachments
default boolean hasOriginalAttachments()- Returns:
trueif original attachments are present,falseif not.- See Also:
-
getDecryptedSoapDocument
@Nullable Document getDecryptedSoapDocument()- Returns:
- get the decrypted SOAP document, only the entire document no attachment
- Since:
- v0.9.8
- See Also:
-
hasDecryptedSoapDocument
default boolean hasDecryptedSoapDocument()- Returns:
trueof a decrypted SOAP document is present,falseif not.- See Also:
-
getEffectiveDecryptedSoapDocument
- Returns:
- The effectively decrypted SOAP document.
- Since:
- 3.0.0
- See Also:
-
getDecryptedAttachments
@Nullable com.helger.collection.commons.ICommonsList<WSS4JAttachment> getDecryptedAttachments()- Returns:
- Getting decrypted attachment, if there were encrypted attachments to begin with. May be
null. - See Also:
-
hasDecryptedAttachments
default boolean hasDecryptedAttachments()- Returns:
trueif a decrypted attachments are present,falseif not.
-
getCompressedAttachmentIDs
@Nullable com.helger.collection.commons.ICommonsMap<String,EAS4CompressionMode> getCompressedAttachmentIDs()- Returns:
- IDs from all compressed attachments and/or payload. May be
null.
-
hasCompressedAttachmentIDs
default boolean hasCompressedAttachmentIDs() -
getAttachmentCompressionMode
- Parameters:
sID- id to look up“. May benull.- Returns:
- Looks up if a compression mode with the id sID exists and returns the mode else
null
-
containsCompressedAttachmentID
- Parameters:
sID- the id to look up. May benull.- Returns:
- looks up if the compressed attachment contain the given ID
-
getMPC
@Nullable IMPC getMPC()- Returns:
- the MPC that is used in the current message exchange. May be
null.
-
hasMPC
default boolean hasMPC()- Returns:
trueif an MPC is set,falseif not.- See Also:
-
isSoapBodyPayloadPresent
boolean isSoapBodyPayloadPresent()- Returns:
trueif a payload in the soap body is present, elsefalse- See Also:
-
getInitiatorID
@Nullable String getInitiatorID()- Returns:
- initiator set in the usermessage if the incoming message is a UserMessage. This is the
content of the FromParty/PartyId element and in Peppol reflects the C2. May be
null.
-
hasInitiatorID
default boolean hasInitiatorID()- Returns:
trueif an initiator ID was part of the UserMessage,falseif not.- See Also:
-
getResponderID
@Nullable String getResponderID()- Returns:
- responder set in the usermessage if the incoming message is a UserMessage. This is the
content of the ToParty/PartyId element and in Peppol reflects the C3. May be
null.
-
hasResponderID
default boolean hasResponderID()- Returns:
trueif a responder ID was part of the UserMessage,falseif not.- See Also:
-
getSigningCertificate
@Nullable X509Certificate getSigningCertificate()- Returns:
- The signing certificate in the incoming message. May be
null. - Since:
- 3.0.5
- See Also:
-
hasSigningCertificate
default boolean hasSigningCertificate()- Returns:
trueif a signing certificate is provided,falseif not.- Since:
- 3.0.5
- See Also:
-
getSigningCertificateReferenceType
@Nullable org.apache.wss4j.dom.str.STRParser.REFERENCE_TYPE getSigningCertificateReferenceType()- Returns:
- The reference type that was used to resolve the signing certificate. May be
null. - Since:
- 4.2.6
- See Also:
-
hasSigningCertificateReferenceType
default boolean hasSigningCertificateReferenceType()- Returns:
trueif a signing certificate reference type is provided,falseif not.- Since:
- 4.2.6
- See Also:
-
getDecryptingCertificate
@Nullable X509Certificate getDecryptingCertificate()- Returns:
- The decrypting certificate in the incoming message. May be
null. - Since:
- 3.0.5
- See Also:
-
hasDecryptingCertificate
default boolean hasDecryptingCertificate()- Returns:
trueif a decrypting certificate is provided,falseif not.- Since:
- 3.0.5
- See Also:
-
getDecryptingCertificateReferenceType
@Nullable org.apache.wss4j.dom.str.STRParser.REFERENCE_TYPE getDecryptingCertificateReferenceType()- Returns:
- The reference type that was used to resolve the decrypting certificate. May be
null. - Since:
- 4.2.6
- See Also:
-
hasDecryptingCertificateReferenceType
default boolean hasDecryptingCertificateReferenceType()- Returns:
trueif a decrypting certificate reference type is provided,falseif not.- Since:
- 4.2.6
- See Also:
-
getEffectivePModeLeg
@Nullable PModeLeg getEffectivePModeLeg()- Returns:
- The effective leg to use. May be leg 1 or leg 2 of the PMode. If no PMode was found, no PModeLeg is present.
- See Also:
-
getEffectivePModeLegNumber
@CheckForSigned int getEffectivePModeLegNumber()- Returns:
- 1 or 2, depending on the used leg. Any other value indicates "undefined". If no PMode was found, no PModeLeg is present.
- See Also:
-
getSoapWSS4JSecurityActions
@Nonnegative int getSoapWSS4JSecurityActions()- Returns:
- A bit set of the WSS4J security action tags found. 0 for nothing. See class org.apache.wss4j.dom.WSContants line 326ff for the constants.
- Since:
- v0.9.8
-
isSoapSignatureChecked
boolean isSoapSignatureChecked()- Returns:
trueif the incoming message was signed and the signature was verified,falseotherwise.
-
isSoapDecrypted
boolean isSoapDecrypted()- Returns:
trueif the incoming message was decrypted,falseotherwise.
-
getSoapWSS4JException
@Nullable Exception getSoapWSS4JException()- Returns:
- An Exception that occurred during processing the incoming SOAP WS-Security handler. If
this is a
org.apache.wss4j.common.ext.WSSecurityExceptionexception something happened on the security level. - Since:
- 0.9.11
-
hasSoapWSS4JException
default boolean hasSoapWSS4JException()- Returns:
trueif a SOAP WSS4J exception is present,falseif not.- See Also:
-
getProfileID
- Returns:
- The phase4 profile ID to be used. May be
null. - Since:
- v0.9.7
-
getAS4Profile
@Nullable IAS4Profile getAS4Profile()- Returns:
- The phase4 profile to be used. May be
nullin case it could not be determined. - Since:
- v2.5.3
-
getMessageID
@Nullable String getMessageID()- Returns:
- The AS4 message ID. Source is the
MessageInfoelement. May benull. - Since:
- v0.9.7
-
getRefToMessageID
@Nullable String getRefToMessageID()- Returns:
- The AS4 "reference to message ID". This value is optional in the headers. Source is the
MessageInfoelement. May benull. - Since:
- v1.2.0
-
getMessageTimestamp
@Nullable com.helger.datetime.xml.XMLOffsetDateTime getMessageTimestamp()- Returns:
- The AS4 provided message timestamp. This value is mandatory in the source
MessageInfoelement. May benull. - Since:
- v1.2.0
-
isPingMessage
boolean isPingMessage()- Returns:
trueif the incoming message is an AS4 ping message,falseotherwise.- Since:
- v0.9.7
-
getSoapBodyPayloadNode
@Nullable Node getSoapBodyPayloadNode()- Returns:
- The child of the SOAP Body node or
null. That is always decrypted. - Since:
- v0.9.8
-
isSoapHeaderElementProcessingSuccessful
boolean isSoapHeaderElementProcessingSuccessful()- Returns:
trueif SOAP header element processing was successful,falseif not. If not, than many other values are also not set and at least one error is in the error list.- Since:
- v0.9.7
-
getCryptoFactorySign
@Nullable IAS4CryptoFactory getCryptoFactorySign()- Returns:
- The crypto factory that was used to verify an eventually contained signature. May be
null. If this is non-nullit is NO indicator, whether a message was signed or not. - Since:
- 3.0.0-beta6
- See Also:
-
getCryptoFactoryCrypt
@Nullable IAS4CryptoFactory getCryptoFactoryCrypt()- Returns:
- The crypto factory that was used to decrypt an eventually encrypted message. May be
null. If this is non-nullit is NO indicator, whether a message was encrypted or not. - Since:
- 3.0.0-beta6
- See Also:
-