Package com.helger.peppol.xhe
Class DBNAllianceXHEData
java.lang.Object
com.helger.peppol.xhe.DBNAllianceXHEData
This class contains all the DBNAlliance data per XHE document in a syntax neutral way. This class
maps to the requirements of the Exchange Header Envelope (XHE) Version 1.0 specification.
- Author:
- Robinson Garcia, Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionDBNAllianceXHEData(com.helger.peppolid.factory.IIdentifierFactory aIdentifierFactory) Constructor -
Method Summary
Modifier and TypeMethodDescriptionaddPayload(DBNAlliancePayload aPayload) Set an individual payload.booleanbooleanareAllFieldsSet(boolean bLogMissing) com.helger.xhe.v10.XHE10XHETypecom.helger.commons.datetime.XMLOffsetDateTimeThe date and time for when this envelope was created.com.helger.peppolid.IParticipantIdentifiergetID()An informative unique ID created by the issuer of the envelope.Get the list of payloads of the exchange header envelope.com.helger.peppolid.IParticipantIdentifierbooleanbooleanhasID()setCreationDateAndTime(com.helger.commons.datetime.XMLOffsetDateTime aCreationDateTime) Set the content of the fields that are mapped toXHE/Header/CreationDateTime.Set the content of the fields that are mapped toXHE/Header/CreationDateTimeto the current date and time.setFromParty(com.helger.peppolid.IParticipantIdentifier aFromPartyID) Set the from party participant identifier.setFromParty(String sScheme, String sValue) Set the sender participant identifier.Set the content of the fields that are mapped toXHE/Header/ID.setPayloads(com.helger.commons.collection.impl.ICommonsList<DBNAlliancePayload> aPayloads) Set the list of payloads of the exchange header envelope (XHE).setToParty(com.helger.peppolid.IParticipantIdentifier aToPartyID) Set the to party participant identifier.setToParty(String sScheme, String sValue) Set the to party participant identifier.
-
Constructor Details
-
DBNAllianceXHEData
public DBNAllianceXHEData(@Nonnull com.helger.peppolid.factory.IIdentifierFactory aIdentifierFactory) Constructor- Parameters:
aIdentifierFactory- Identifier factory to be used. May not benull.
-
-
Method Details
-
getID
An informative unique ID created by the issuer of the envelope. The ID MUST be unique for each Exchange Header Envelope being created. This ID is not the same as the ID of the business message (such as the Invoice Number). It is not the same as a transmission Message ID generated by the application sending the message (as defined in e.g. AS4).
The InstanceIdentifier MUST be globally unique and it is RECOMMENDED to use UUID (such as 118e3040-51d2-11e3-8f96-0800200c9a66). This field is mapped toXHE/Header/ID.- Returns:
- The instance identifier. May be
null.
-
hasID
public boolean hasID()- Returns:
trueif an instance identifier is present,falseif not.
-
setID
Set the content of the fields that are mapped toXHE/Header/ID.- Parameters:
sID- An informative unique ID created by the issuer of the envelope. The ID MUST be unique for each Business Message Envelope being created. This ID is not the same as the ID of the business message (such as the Invoice Number). It is not the same as a transmission Message ID generated by the application sending the message (as defined in AS4).
The InstanceIdentifier MUST be globally unique and it is RECOMMENDED to use UUID (such as 118e3040-51d2-11e3-8f96-0800200c9a66). May not benull. This field is mapped toXHE/Header/ID.- Returns:
- this
-
getCreationDateTime
The date and time for when this envelope was created. It is NOT necessarily the same as the issue date of the business document (such as the invoice) being enveloped. It is NOT necessarily the date time for transmission.
The format of the value of this MUST include timezone information. This field is mapped toXHE/Header/CreationDateTime.- Returns:
- The creation date time. May be
null.
-
hasCreationDateTime
public boolean hasCreationDateTime()- Returns:
trueif creation date and time is present,falseif not.- Since:
- 7.0.0
-
setCreationDateAndTime
@Nonnull public DBNAllianceXHEData setCreationDateAndTime(@Nonnull com.helger.commons.datetime.XMLOffsetDateTime aCreationDateTime) Set the content of the fields that are mapped toXHE/Header/CreationDateTime.- Parameters:
aCreationDateTime- The date and time for when this envelope was created. It is NOT necessarily the same as the issue date of the business document (such as the invoice) being enveloped. It is NOT necessarily the date time for transmission.
The format of the value of this MUST include timezone information. May not benull. This field is mapped toXHE/Header/CreationDateTime.- Returns:
- this
-
setCreationDateAndTimeNow
Set the content of the fields that are mapped toXHE/Header/CreationDateTimeto the current date and time.- Returns:
- this
-
getFromPartyScheme
- Returns:
- The from party participant identifier scheme. May be
nullif not initialized. This field is mapped toXHE/Header/FromParty/PartyIdentification/ID/@schemeID.
-
getFromPartyValue
- Returns:
- The from party participant identifier value. May be
nullif not initialized. This field is mapped toXHE/Header/FromParty/PartyIdentification/ID/.
-
getFromPartyAsIdentifier
- Returns:
- The from party participant identifier as a participant identifier or
nullif certain information are missing or are invalid.
-
setFromParty
@Nonnull public DBNAllianceXHEData setFromParty(@Nonnull @Nonempty String sScheme, @Nonnull @Nonempty String sValue) Set the sender participant identifier.- Parameters:
sScheme- The DBNAlliance identifier scheme. May neither benullnor empty. This field is mapped toXHE/Header/FromParty/PartyIdentification/ID/@schemeID.sValue- The from party identifier value. May neither benullnor empty. This field is mapped toXHE/Header/FromParty/PartyIdentification/ID/.- Returns:
- this
-
setFromParty
@Nonnull public DBNAllianceXHEData setFromParty(@Nonnull com.helger.peppolid.IParticipantIdentifier aFromPartyID) Set the from party participant identifier.- Parameters:
aFromPartyID- The participant identifier to use. May not benull.- Returns:
- this
-
getToPartyScheme
- Returns:
- The to party participant identifier scheme. May be
nullif not initialized. This field is mapped toXHE/Header/ToParty/PartyIdentification/ID/@schemeID.
-
getToPartyValue
- Returns:
- The to party participant identifier value. May be
nullif not initialized. This field is mapped toXHE/Header/ToParty/PartyIdentification/ID/.
-
getToPartyAsIdentifier
- Returns:
- The to party participant identifier as a participant identifier or
nullif certain information are missing or are invalid.
-
setToParty
@Nonnull public DBNAllianceXHEData setToParty(@Nonnull @Nonempty String sScheme, @Nonnull @Nonempty String sValue) Set the to party participant identifier.- Parameters:
sScheme- The DBNAlliance identifier scheme. May neither benullnor empty. This field is mapped toXHE/Header/ToParty/PartyIdentification/ID/@schemeID.sValue- The to party identifier value. May neither benullnor empty. This field is mapped toXHE/Header/ToParty/PartyIdentification/ID/.- Returns:
- this
-
setToParty
@Nonnull public DBNAllianceXHEData setToParty(@Nonnull com.helger.peppolid.IParticipantIdentifier aToPartyID) Set the to party participant identifier.- Parameters:
aToPartyID- The participant identifier to use. May not benull.- Returns:
- this
-
getPayloads
Get the list of payloads of the exchange header envelope. This field is mapped toXHE/Payloads.- Returns:
- The payloads list .
-
setPayloads
@Nonnull public DBNAllianceXHEData setPayloads(@Nonnull com.helger.commons.collection.impl.ICommonsList<DBNAlliancePayload> aPayloads) Set the list of payloads of the exchange header envelope (XHE).- Parameters:
aPayloads- The list of payloads to be set. May not benull.- Returns:
- this
-
addPayload
Set an individual payload.- Parameters:
aPayload- An individual payload to be added to the list of payloads. May not benull.- Returns:
- this
-
areAllFieldsSet
public boolean areAllFieldsSet(boolean bLogMissing) - Parameters:
bLogMissing-trueif log messages should be emitted,falseif not- Returns:
trueif all mandatory fields required for creating an XHE are present,falseif at least one field is not set.
-
areAllFieldsSet
public boolean areAllFieldsSet()- Returns:
trueif all mandatory fields required for creating an XHE are present,falseif at least one field is not set.
-
getAsXHEDocument
- Returns:
- A generic JAXB XHE document of this data. Never
null. - See Also:
-