Package com.helger.phase4.peppol
Class Phase4PeppolSendingReport
java.lang.Object
com.helger.phase4.peppol.Phase4PeppolSendingReport
This class contains the structured information about what happens on Peppol sending.
- Since:
- 3.0.5
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable String@Nullable String@Nullable com.helger.collection.commons.ICommonsList<com.helger.phase4.ebms3header.Ebms3Error> @Nullable com.helger.phase4.ebms3header.Ebms3SignalMessage@Nullable OffsetDateTimelong@Nullable String@Nullable Exception@Nullable com.helger.phase4.sender.EAS4UserMessageSendResult@NonNull com.helger.json.IJsonObjectGet the whole report as one big JSON structure.@NonNull String@NonNull StringgetAsJsonString(@NonNull com.helger.json.serialize.IJsonWriterSettings aJWS) @NonNull com.helger.xml.microdom.IMicroElementgetAsMicroElement(@Nullable String sNamespaceURI, @NonNull @Nonempty String sTagName) Get the sending report as a MicroDOM element.@NonNull String@NonNull StringgetAsXMLString(@Nullable String sNamespaceURI, @NonNull com.helger.xml.serialize.write.IXMLWriterSettings aXWS) @Nullable X509Certificate@Nullable OffsetDateTime@Nullable com.helger.security.certificate.ECertificateCheckResult@Nullable String@Nullable String@Nullable String@Nullable String@NonNull OffsetDateTime@Nullable com.helger.peppolid.IDocumentTypeIdentifierlong@Nullable String@Nullable Exceptionlong@Nullable com.helger.peppolid.IProcessIdentifier@Nullable com.helger.phase4.client.AS4ClientSentMessage<byte[]> @Nullable com.helger.peppolid.IParticipantIdentifier@Nullable String@Nullable Exception@Nullable com.helger.peppolid.IParticipantIdentifier@Nullable String@NonNull @Nonempty String@Nullable StringbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetAS4ConversationID(@Nullable String s) Remember the AS4 Conversation ID used to send out the message.voidsetAS4MessageID(@Nullable String s) Remember the AS4 Message ID used to send out the message.voidsetAS4ReceivedSignalMsg(@Nullable com.helger.phase4.ebms3header.Ebms3SignalMessage a) Remember the synchronously received AS4 Signal Message from C3.voidsetAS4SendingDT(@Nullable OffsetDateTime a) Remember the AS4 sending date time, as the correlation basis for MLS.voidsetAS4SendingDurationMillis(long n) voidsetAS4SendingError(@Nullable String s) voidsetAS4SendingException(@Nullable Exception e) Remember any exception that eventually occurred on AS4 sending.voidsetAS4SendingResult(@Nullable com.helger.phase4.sender.EAS4UserMessageSendResult e) Remember the overall AS4 sending result.voidsetC3Cert(@Nullable X509Certificate a) Remember the public Peppol AP certificate of C3 determined by the SMP lookup.voidsetC3CertCheckDT(@Nullable OffsetDateTime a) Remember the date and time, when the Peppol AP certificate of C3, as retrieved from the SMP, was checked for revocation.voidsetC3CertCheckResult(@Nullable com.helger.security.certificate.ECertificateCheckResult e) Remember the result of checking the Peppol AP certificate of C3, as retrieved from the SMP, for validity.voidsetC3EndpointURL(@Nullable String s) Remember the AP endpoint URL of C3 determined by the SMP lookup.voidsetC3SMPURL(@Nullable String s) Remember the SMP URL of C3 determined by the SMP lookup.voidsetC3TechnicalContact(@Nullable String s) Remember the technical contact information retrieved from the SMP endpoint.voidsetCountryC1(@Nullable String s) Remember the senders (C1) Country Code (2 letter code).voidsetDocTypeID(@Nullable com.helger.peppolid.IDocumentTypeIdentifier a) Remember the Peppol Document Type ID that was exchanged.voidsetLookupDurationMillis(long n) voidsetLookupError(@Nullable String s) voidsetLookupException(@Nullable Exception a) voidsetOverallDurationMillis(long n) Remember the overall duration it took to perform the lookup and sending process.voidsetOverallSuccess(boolean b) Remember the overall success.voidsetProcessID(@Nullable com.helger.peppolid.IProcessIdentifier a) Remember the Peppol Process ID that was exchanged.voidsetRawHttpResponse(@Nullable com.helger.phase4.client.AS4ClientSentMessage<byte[]> aRawHttpResponse) Set the raw HTTP response message received from the other side.voidsetReceiverID(@Nullable com.helger.peppolid.IParticipantIdentifier a) Remember the receivers Peppol Participant ID (C4 ID).voidsetSBDHInstanceIdentifier(@Nullable String s) Remember the SBDH Instance Identifier.voidsetSBDHParseException(@Nullable Exception e) Remember any specific exception that occurred during parsing of a provided SBDH.voidsetSenderID(@Nullable com.helger.peppolid.IParticipantIdentifier a) Remember the senders Peppol Participant ID (C1 ID).voidsetSenderPartyID(@Nullable String s) Remember the sender party ID (the ID of C3).voidsetSendingSuccess(boolean b) Remember the overall sending success.voidsetTransportProfileID(@Nullable String s) Remember the transport profile ID.
-
Constructor Details
-
Phase4PeppolSendingReport
public Phase4PeppolSendingReport(@NonNull com.helger.peppol.sml.ISMLInfo aSMLInfo)
-
-
Method Details
-
getCurrentDateTimeUTC
- Returns:
- The date and time for which the sending report is created. Never
null. - Since:
- 4.2.0
-
getSMLDNSZone
- Returns:
- The SML DNS zone on which the message exchange takes place. Neither
nullnor empty. - Since:
- 4.2.0
-
getSBDHParseException
- Returns:
- The specific exception that occurred during parsing of a provided SBDH. May be
null. - Since:
- 4.2.0
-
hasSBDHParseException
public boolean hasSBDHParseException() -
setSBDHParseException
Remember any specific exception that occurred during parsing of a provided SBDH.- Parameters:
e- The exception that was caught. May benull.
-
getSenderID
public @Nullable com.helger.peppolid.IParticipantIdentifier getSenderID()- Returns:
- The sending participant identifier. May be
null. - Since:
- 4.2.0
-
hasSenderID
public boolean hasSenderID() -
setSenderID
public void setSenderID(@Nullable com.helger.peppolid.IParticipantIdentifier a) Remember the senders Peppol Participant ID (C1 ID).- Parameters:
a- Peppol Participant ID. May benull.
-
getReceiverID
public @Nullable com.helger.peppolid.IParticipantIdentifier getReceiverID()- Returns:
- The receiving participant identifier. May be
null. - Since:
- 4.2.0
-
hasReceiverID
public boolean hasReceiverID() -
setReceiverID
public void setReceiverID(@Nullable com.helger.peppolid.IParticipantIdentifier a) Remember the receivers Peppol Participant ID (C4 ID).- Parameters:
a- Peppol Participant ID. May benull.
-
getDocTypeID
public @Nullable com.helger.peppolid.IDocumentTypeIdentifier getDocTypeID()- Returns:
- The exchanged document type identifier. May be
null. - Since:
- 4.2.0
-
hasDocTypeID
public boolean hasDocTypeID() -
setDocTypeID
public void setDocTypeID(@Nullable com.helger.peppolid.IDocumentTypeIdentifier a) Remember the Peppol Document Type ID that was exchanged.- Parameters:
a- Document Type ID. May benull.
-
getProcessID
public @Nullable com.helger.peppolid.IProcessIdentifier getProcessID()- Returns:
- The exchanged process identifier. May be
null. - Since:
- 4.2.0
-
hasProcessID
public boolean hasProcessID() -
setProcessID
public void setProcessID(@Nullable com.helger.peppolid.IProcessIdentifier a) Remember the Peppol Process ID that was exchanged.- Parameters:
a- Process ID. May benull.
-
getCountryC1
- Returns:
- The sender (C1) Country Code. May be
null. - Since:
- 4.2.0
-
hasCountryC1
public boolean hasCountryC1() -
setCountryC1
Remember the senders (C1) Country Code (2 letter code).- Parameters:
s- C1 country code. May benull.
-
getSenderPartyID
- Returns:
- The sender party (C3) ID. May be
null. - Since:
- 4.2.0
-
hasSenderPartyID
public boolean hasSenderPartyID() -
setSenderPartyID
Remember the sender party ID (the ID of C3).- Parameters:
s- Sender party ID. May benull.
-
getTransportProfileID
- Returns:
- The transport profile ID. May be
null. - Since:
- 4.2.0
-
hasTransportProfileID
public boolean hasTransportProfileID() -
setTransportProfileID
Remember the transport profile ID.- Parameters:
s- Transport profile ID. May benull.
-
getSBDHInstanceIdentifier
- Returns:
- The SBDH Instance Identifier. May be
null. - Since:
- 4.2.0
-
hasSBDHInstanceIdentifier
public boolean hasSBDHInstanceIdentifier() -
setSBDHInstanceIdentifier
Remember the SBDH Instance Identifier. That is the identifier, that uniquely identifies the specific transmission and is referred to by MLR and MLS.- Parameters:
s- SBDH instance identifier. May benull.
-
getC3SMPURL
- Returns:
- The SMP URL of C3 determined by the DNS lookup. May be
null. - Since:
- 4.3.2
-
hasC3SMPURL
public boolean hasC3SMPURL()- Returns:
trueif a C3 SMP URL is present,falseif not.- Since:
- 4.3.2
-
setC3SMPURL
Remember the SMP URL of C3 determined by the SMP lookup.- Parameters:
s- C3 SMP URL. May benull.- Since:
- 4.3.2
-
getC3EndpointURL
- Returns:
- The AP endpoint URL of C3 determined by the SMP lookup. May be
null. - Since:
- 4.2.0
-
hasC3EndpointURL
public boolean hasC3EndpointURL() -
setC3EndpointURL
Remember the AP endpoint URL of C3 determined by the SMP lookup.- Parameters:
s- C3 endpoint URL. May benull.
-
getC3Cert
- Returns:
- The public Peppol AP certificate of C3 determined by the SMP lookup. May be
null. - Since:
- 4.2.0
-
hasC3Cert
public boolean hasC3Cert() -
hasC3CertSubjectCN
public boolean hasC3CertSubjectCN() -
hasC3CertSubjectO
public boolean hasC3CertSubjectO() -
hasC3CertSubjectC
public boolean hasC3CertSubjectC() -
setC3Cert
Remember the public Peppol AP certificate of C3 determined by the SMP lookup.- Parameters:
a- C3 public Peppol AP certificate. May benull.
-
getC3CertCheckDT
- Returns:
- The date and time, when the Peppol AP certificate of C3, as retrieved from the SMP, was
checked for revocation. May be
null. - Since:
- 4.2.0
-
hasC3CertCheckDT
public boolean hasC3CertCheckDT() -
setC3CertCheckDT
Remember the date and time, when the Peppol AP certificate of C3, as retrieved from the SMP, was checked for revocation.- Parameters:
a- The Peppol AP Certificate check date time. May benull.
-
getC3CertCheckResult
public @Nullable com.helger.security.certificate.ECertificateCheckResult getC3CertCheckResult()- Returns:
- The result of checking the Peppol AP certificate of C3, as retrieved from the SMP, for
validity. May be
null. - Since:
- 4.2.0
-
hasC3CertCheckResult
public boolean hasC3CertCheckResult() -
setC3CertCheckResult
public void setC3CertCheckResult(@Nullable com.helger.security.certificate.ECertificateCheckResult e) Remember the result of checking the Peppol AP certificate of C3, as retrieved from the SMP, for validity.- Parameters:
e- The Peppol AP Certificate check result. May benull.
-
getC3TechnicalContact
- Returns:
- The technical contact information retrieved from the SMP endpoint. May be
null. - Since:
- 4.2.0
-
hasC3TechnicalContact
public boolean hasC3TechnicalContact()- Returns:
trueif a C3 technical contact is present,falseif not.- Since:
- 4.2.0
-
setC3TechnicalContact
Remember the technical contact information retrieved from the SMP endpoint. This might be helpful to quickly find support.- Parameters:
s- The technical contact URL to use. May benull.- Since:
- 4.2.0
-
getLookupError
-
hasLookupError
public boolean hasLookupError() -
setLookupError
-
getLookupException
-
hasLookupException
public boolean hasLookupException() -
setLookupException
-
getLookupDurationMillis
public long getLookupDurationMillis() -
hasLookupDurationMillis
public boolean hasLookupDurationMillis() -
setLookupDurationMillis
public void setLookupDurationMillis(long n) -
getAS4MessageID
- Returns:
- The AS4 Message ID used to send out the message. May be
null. - Since:
- 4.2.0
-
hasAS4MessageID
public boolean hasAS4MessageID() -
setAS4MessageID
Remember the AS4 Message ID used to send out the message.- Parameters:
s- The AS4 Message ID. May benull.
-
getAS4ConversationID
- Returns:
- The AS4 Conversation ID used to send out the message. May be
null. - Since:
- 4.2.0
-
hasAS4ConversationID
public boolean hasAS4ConversationID() -
setAS4ConversationID
Remember the AS4 Conversation ID used to send out the message.- Parameters:
s- The AS4 Conversation ID. May benull.
-
getAS4SendingDT
- Returns:
- The AS4 sending date time. May be
null. - Since:
- 4.2.0
-
hasAS4SendingDT
public boolean hasAS4SendingDT() -
setAS4SendingDT
Remember the AS4 sending date time, as the correlation basis for MLS.- Parameters:
a- The sending date time.- Since:
- 3.1.0
-
getRawHttpResponse
public @Nullable com.helger.phase4.client.AS4ClientSentMessage<byte[]> getRawHttpResponse()- Returns:
- The raw HTTP response message received from the other side. This is only emitted in
case of non-success. May be
null. - Since:
- 4.2.3
-
hasRawHttpResponse
public boolean hasRawHttpResponse()- Returns:
trueif a raw response is present,falseif not.- Since:
- 4.2.3
-
setRawHttpResponse
public void setRawHttpResponse(@Nullable com.helger.phase4.client.AS4ClientSentMessage<byte[]> aRawHttpResponse) Set the raw HTTP response message received from the other side. This is only emitted in case of non-success.- Parameters:
aRawHttpResponse- The raw response to use. May benullto explicit state that it should not be part of the sending report.- Since:
- 4.2.3
-
getAS4ReceivedSignalMsg
public @Nullable com.helger.phase4.ebms3header.Ebms3SignalMessage getAS4ReceivedSignalMsg()- Returns:
- The synchronously received AS4 Signal Message from C3. May be
null. - Since:
- 4.2.0
-
getAS4ReceivedErrors
@ReturnsMutableObject public @Nullable com.helger.collection.commons.ICommonsList<com.helger.phase4.ebms3header.Ebms3Error> getAS4ReceivedErrors()- Returns:
- The list of AS4 EBMS errors received from C3. May be
nullor empty. - Since:
- 4.2.0
-
hasAS4ReceivedSignalMsg
public boolean hasAS4ReceivedSignalMsg() -
hasAS4ResponseErrors
public boolean hasAS4ResponseErrors() -
setAS4ReceivedSignalMsg
public void setAS4ReceivedSignalMsg(@Nullable com.helger.phase4.ebms3header.Ebms3SignalMessage a) Remember the synchronously received AS4 Signal Message from C3.- Parameters:
a- The parsed AS4 Signal Message. May benull.
-
getAS4SendingResult
public @Nullable com.helger.phase4.sender.EAS4UserMessageSendResult getAS4SendingResult()- Returns:
- The overall AS4 sending result. May be
null. - Since:
- 4.2.0
-
hasAS4SendingResult
public boolean hasAS4SendingResult() -
hasUnsuccessfulAS4SendingResult
public boolean hasUnsuccessfulAS4SendingResult() -
setAS4SendingResult
public void setAS4SendingResult(@Nullable com.helger.phase4.sender.EAS4UserMessageSendResult e) Remember the overall AS4 sending result.- Parameters:
e- The AS4 sending result. May benull.
-
getAS4SendingError
-
hasAS4SendingError
public boolean hasAS4SendingError() -
setAS4SendingError
-
getAS4SendingException
- Returns:
- The exception that eventually occurred on AS4 sending. May be
null. - Since:
- 4.2.0
-
hasAS4SendingException
public boolean hasAS4SendingException() -
setAS4SendingException
Remember any exception that eventually occurred on AS4 sending.- Parameters:
e- The exception from AS4 sending. May benull.
-
getAS4SendingDurationMillis
public long getAS4SendingDurationMillis() -
hasAS4SendingDurationMillis
public boolean hasAS4SendingDurationMillis() -
setAS4SendingDurationMillis
public void setAS4SendingDurationMillis(long n) -
getOverallDurationMillis
public long getOverallDurationMillis()- Returns:
- The overall duration it took to perform the lookup and sending process.
- Since:
- 4.2.0
-
setOverallDurationMillis
public void setOverallDurationMillis(@Nonnegative long n) Remember the overall duration it took to perform the lookup and sending process.- Parameters:
n- The overall milliseconds needed. Must be ≥ 0.
-
isSendingSuccess
public boolean isSendingSuccess()- Returns:
trueif sending was done successful.- Since:
- 4.2.0
-
setSendingSuccess
public void setSendingSuccess(boolean b) Remember the overall sending success.- Parameters:
b-trueon success,falseon failure.
-
isOverallSuccess
public boolean isOverallSuccess()- Returns:
trueif sending and all follow up activities was done successful.- Since:
- 4.2.0
-
setOverallSuccess
public void setOverallSuccess(boolean b) Remember the overall success. This may differ from the sending success, if e.g. sending succeeded but storing the record for Peppol reporting failed.- Parameters:
b-trueon success,falseon failure.
-
getAsJsonObject
public @NonNull com.helger.json.IJsonObject getAsJsonObject()Get the whole report as one big JSON structure. Only elements that were provided, are contained in the report.- Returns:
- The sending report as a JSON object. May not be
null.
-
getAsJsonString
- Returns:
- The JSON representation of the sending report, as a formatted string. Never
null.
-
getAsJsonString
- Parameters:
aJWS- The JSON writer settings to use. May not benull.- Returns:
- The JSON representation of the sending report, as a string. Never
null.
-
getAsMicroElement
public @NonNull com.helger.xml.microdom.IMicroElement getAsMicroElement(@Nullable String sNamespaceURI, @Nonempty @NonNull @Nonempty String sTagName) Get the sending report as a MicroDOM element. Only elements that were provided, are contained in the report.- Parameters:
sNamespaceURI- The namespace URI to be used. May benull.sTagName- The tag name to use for the root element. May neither benullnor empty.- Returns:
- The created micro element and never
null.
-
getAsXMLString
-
getAsXMLString
-