Package com.helger.peppol.sbdh
Class PeppolSBDHData
java.lang.Object
com.helger.peppol.sbdh.PeppolSBDHData
This class contains all the Peppol data per SBDH document in a syntax neutral
way. This class maps to the requirements of the Peppol Business Message
Envelope 2.0 specification.
- Since:
- 9.2.0 - was previously called "PeppolSBDHDocument"
- Author:
- Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionPeppolSBDHData(com.helger.peppolid.factory.IIdentifierFactory aIdentifierFactory) Constructor -
Method Summary
Modifier and TypeMethodDescriptioncom.helger.commons.collection.attr.StringMapbooleanCheck if all additional attributes contain non-reserved names.booleanbooleanareAllFieldsSet(boolean bLogMissing) Check if all mandatory fields are set in the SBDH data.booleanareAllFieldsSet(Consumer<String> aMissingFieldConsumer) Check if all mandatory fields are set in the SBDH data.static PeppolSBDHDatacreateUBL21(Element aBusinessMessage, com.helger.peppolid.factory.IIdentifierFactory aIdentifierFactory) Create a newPeppolSBDHDataobject for a business message assuming it is UBL 2.1.booleanorg.unece.cefact.namespaces.sbdh.StandardBusinessDocumentGet the contained business message.Parse the existing business message as a special Peppol "BinaryContent" element.Parse the existing business message as a special Peppol SBDH "TextContent" element.Get the contained business message without cloning it.Get the country code of C1.com.helger.commons.datetime.XMLOffsetDateTimeThe date and time for when this envelope was created.com.helger.peppolid.IDocumentTypeIdentifierAn informative unique ID created by the issuer of the envelope.com.helger.peppolid.IProcessIdentifiercom.helger.peppolid.IParticipantIdentifiercom.helger.peppolid.IParticipantIdentifierThe standard of the enveloped business message, normally described by use of the XML namespace of the business message root element (such as urn:oasis:names:specification:ubl:schema:xsd:Order-2).getType()Message type - mandatory in SBDH.The version number of the enveloped business message (such as the value "2.1" for OASIS UBL 2.1 or "2.2" for OASIS UBL 2.2).booleanCheck if a business message is present without having the need to explicitly callgetBusinessMessage()which returns a cloned node and is therefore an expensive operation.booleanCheck if the country code of C1 is present or not.booleaninthashCode()booleanbooleanbooleanhasType()booleansetBusinessMessage(Element aBusinessMessage) Set the main business message that should be transmitted together with the SBDH.setBusinessMessageBinaryOnly(byte[] aBinaryPayload, com.helger.commons.mime.IMimeType aMimeType, Charset aCharset) Set a business message with binary payload.setBusinessMessageNoClone(Element aBusinessMessage) Set the main business message that should be transmitted together with the SBDH.setBusinessMessageTextOnly(String sTextPayload, com.helger.commons.mime.IMimeType aMimeType) Set a business message with text payload.setCountryC1(String sCountryC1) Set the country code of C1 to be used.setCreationDateAndTime(com.helger.commons.datetime.XMLOffsetDateTime aCreationDateAndTime) Set the content of the fields that are mapped toStandardBusinessDocumentHeader/DocumentIdentification.setDocumentIdentification(String sStandard, String sTypeVersion, String sType, String sInstanceIdentifier, com.helger.commons.datetime.XMLOffsetDateTime aCreationDateAndTime) Set the content of the fields that are mapped toStandardBusinessDocumentHeader/DocumentIdentification.setDocumentType(com.helger.peppolid.IDocumentTypeIdentifier aDocTypeID) Set the document type identifier.setDocumentType(String sScheme, String sValue) Set the document type identifier.Set the document type identifier using the default identifier scheme/authorityPeppolIdentifierHelper.DOCUMENT_TYPE_SCHEME_BUSDOX_DOCID_QNS.Set the document type identifier using the default identifier scheme/authorityPeppolIdentifierHelper.DOCUMENT_TYPE_SCHEME_PEPPOL_DOCTYPE_WILDCARD.setInstanceIdentifier(String sInstanceIdentifier) Set the content of the fields that are mapped toStandardBusinessDocumentHeader/DocumentIdentification.setProcess(com.helger.peppolid.IProcessIdentifier aProcessID) Set the process identifier.setProcess(String sScheme, String sValue) Set the process identifier.setProcessWithDefaultScheme(String sValue) Set the document type identifier using the default identifier scheme/authorityPeppolIdentifierHelper.DEFAULT_PROCESS_SCHEME.setReceiver(com.helger.peppolid.IParticipantIdentifier aReceiverID) Set the receiver participant identifier.setReceiver(String sScheme, String sValue) Set the receiver participant identifier.setReceiverWithDefaultScheme(String sValue) Set the receiver participant identifier value using the default identifier scheme/authorityPeppolIdentifierHelper.DEFAULT_PARTICIPANT_SCHEME.setSender(com.helger.peppolid.IParticipantIdentifier aSenderID) Set the sender participant identifier.Set the sender participant identifier.setSenderWithDefaultScheme(String sValue) Set the sender participant identifier value using the default identifier scheme/authorityPeppolIdentifierHelper.DEFAULT_PARTICIPANT_SCHEME.setStandard(String sStandard) Set the content of the fields that are mapped toStandardBusinessDocumentHeader/DocumentIdentification.Set the content of the fields that are mapped toStandardBusinessDocumentHeader/DocumentIdentification.setTypeVersion(String sTypeVersion) Set the content of the fields that are mapped toStandardBusinessDocumentHeader/DocumentIdentification.toString()
-
Constructor Details
-
PeppolSBDHData
Constructor- Parameters:
aIdentifierFactory- Identifier factory to be used. May not benull.
-
-
Method Details
-
getSenderScheme
- Returns:
- The sender participant identifier scheme. May be
nullif not initialized. This field is mapped toStandardBusinessDocumentHeader/Sender/Identifier/@Authority.
-
getSenderValue
- Returns:
- The sender participant identifier value. May be
nullif not initialized. This field is mapped toStandardBusinessDocumentHeader/Sender/Identifier/.
-
getSenderAsIdentifier
- Returns:
- The sender participant identifier as a participant identifier or
nullif certain information are missing or are invalid.
-
setSender
@Nonnull public PeppolSBDHData setSender(@Nonnull @Nonempty String sScheme, @Nonnull @Nonempty String sValue) Set the sender participant identifier.- Parameters:
sScheme- The Peppol identifier scheme. This is usually alwaysPeppolIdentifierHelper.DEFAULT_PARTICIPANT_SCHEME. May neither benullnor empty. This field is mapped toStandardBusinessDocumentHeader/Sender/Identifier/@Authority.sValue- The sender identifier value. May neither benullnor empty. This field is mapped toStandardBusinessDocumentHeader/Sender/Identifier/.- Returns:
- this
-
setSender
@Nonnull public PeppolSBDHData setSender(@Nonnull com.helger.peppolid.IParticipantIdentifier aSenderID) Set the sender participant identifier.- Parameters:
aSenderID- The participant identifier to use. May not benull.- Returns:
- this
- Since:
- 8.6.1
-
setSenderWithDefaultScheme
Set the sender participant identifier value using the default identifier scheme/authorityPeppolIdentifierHelper.DEFAULT_PARTICIPANT_SCHEME.- Parameters:
sValue- The sender identifier value. May neither benullnor empty. This field is mapped toStandardBusinessDocumentHeader/Sender/Identifier/.- Returns:
- this
-
getReceiverScheme
- Returns:
- The receiver participant identifier scheme. May be
nullif not initialized. This field is mapped toStandardBusinessDocumentHeader/Receiver/Identifier/@Authority.
-
getReceiverValue
- Returns:
- The receiver participant identifier value. May be
nullif not initialized. This field is mapped toStandardBusinessDocumentHeader/Receiver/Identifier/.
-
getReceiverAsIdentifier
- Returns:
- The receiver participant identifier as a participant identifier or
nullif certain information are missing or are invalid.
-
setReceiver
@Nonnull public PeppolSBDHData setReceiver(@Nonnull @Nonempty String sScheme, @Nonnull @Nonempty String sValue) Set the receiver participant identifier.- Parameters:
sScheme- The Peppol identifier scheme. This is usually alwaysPeppolIdentifierHelper.DEFAULT_PARTICIPANT_SCHEME. May neither benullnor empty. This field is mapped toStandardBusinessDocumentHeader/Receiver/Identifier/@Authority.sValue- The receiver identifier value. May neither benullnor empty. This field is mapped toStandardBusinessDocumentHeader/Receiver/Identifier/.- Returns:
- this
-
setReceiver
@Nonnull public PeppolSBDHData setReceiver(@Nonnull com.helger.peppolid.IParticipantIdentifier aReceiverID) Set the receiver participant identifier.- Parameters:
aReceiverID- The participant identifier to use. May not benull.- Returns:
- this
- Since:
- 8.6.1
-
setReceiverWithDefaultScheme
Set the receiver participant identifier value using the default identifier scheme/authorityPeppolIdentifierHelper.DEFAULT_PARTICIPANT_SCHEME.- Parameters:
sValue- The sender identifier value. May neither benullnor empty. This field is mapped toStandardBusinessDocumentHeader/Receiver/Identifier/.- Returns:
- this
-
getDocumentTypeScheme
- Returns:
- The document type identifier scheme. May be
nullif not initialized yet. This field is currently not mapped.
-
getDocumentTypeValue
- Returns:
- The document type identifier value. May be
nullif not initialized yet. This field is mapped toStandardBusinessDocumentHeader/BusinessScope/Scope[Type/text()="DOCUMENTID"]/InstanceIdentifier.
-
getDocumentTypeAsIdentifier
- Returns:
- The document type identifier as an object or
nullif certain information are missing or are invalid.
-
setDocumentType
@Nonnull public PeppolSBDHData setDocumentType(@Nonnull @Nonempty String sScheme, @Nonnull @Nonempty String sValue) Set the document type identifier.- Parameters:
sScheme- The document type identifier scheme. May neither benullnor empty.sValue- The document type identifier value. May neither benullnor empty. This field is mapped toStandardBusinessDocumentHeader/BusinessScope/Scope[Type/text()="DOCUMENTID"]/InstanceIdentifier.- Returns:
- this
-
setDocumentType
@Nonnull public PeppolSBDHData setDocumentType(@Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocTypeID) Set the document type identifier.- Parameters:
aDocTypeID- The document type identifier to use. May not benull.- Returns:
- this
- Since:
- 8.6.1
-
setDocumentTypeWithBusdoxDocidQns
Set the document type identifier using the default identifier scheme/authorityPeppolIdentifierHelper.DOCUMENT_TYPE_SCHEME_BUSDOX_DOCID_QNS.- Parameters:
sValue- The document type identifier value. May neither benullnor empty. This field is mapped toStandardBusinessDocumentHeader/BusinessScope/Scope[Type/text()="DOCUMENTID"]/InstanceIdentifier.- Returns:
- this
- Since:
- 8.3.1
-
setDocumentTypeWithPeppolDoctypeWildcard
@Nonnull public PeppolSBDHData setDocumentTypeWithPeppolDoctypeWildcard(@Nonnull @Nonempty String sValue) Set the document type identifier using the default identifier scheme/authorityPeppolIdentifierHelper.DOCUMENT_TYPE_SCHEME_PEPPOL_DOCTYPE_WILDCARD.- Parameters:
sValue- The document type identifier value. May neither benullnor empty. This field is mapped toStandardBusinessDocumentHeader/BusinessScope/Scope[Type/text()="DOCUMENTID"]/InstanceIdentifier.- Returns:
- this
- Since:
- 8.3.1
-
getProcessScheme
- Returns:
- The process identifier scheme. May be
nullif not initialized yet. This field is currently not mapped.
-
getProcessValue
- Returns:
- The process identifier value. May be
nullif not initialized yet. This field is mapped toStandardBusinessDocumentHeader/BusinessScope/Scope[Type/text()="PROCESSID"]/InstanceIdentifier.
-
getProcessAsIdentifier
- Returns:
- The process identifier as an object or
nullif certain information are missing or are invalid.
-
setProcess
@Nonnull public PeppolSBDHData setProcess(@Nonnull @Nonempty String sScheme, @Nonnull @Nonempty String sValue) Set the process identifier.- Parameters:
sScheme- The process identifier scheme. May neither benullnor empty.sValue- The process identifier. May neither benullnor empty. This field is mapped toStandardBusinessDocumentHeader/BusinessScope/Scope[Type/text()="PROCESSID"]/InstanceIdentifier.- Returns:
- this
-
setProcess
@Nonnull public PeppolSBDHData setProcess(@Nonnull com.helger.peppolid.IProcessIdentifier aProcessID) Set the process identifier.- Parameters:
aProcessID- The process identifier to use. May not benull.- Returns:
- this
- Since:
- 8.6.1
-
setProcessWithDefaultScheme
Set the document type identifier using the default identifier scheme/authorityPeppolIdentifierHelper.DEFAULT_PROCESS_SCHEME.- Parameters:
sValue- The process identifier. May neither benullnor empty. This field is mapped toStandardBusinessDocumentHeader/BusinessScope/Scope[Type/text()="PROCESSID"]/InstanceIdentifier.- Returns:
- this
-
getCountryC1
Get the country code of C1. This is a new mandatory field, introduced by the Peppol Business Message Envelope 2.0 specification. It is mapped inside the BusinessScope area.- Returns:
- The country code of C1. May be
null. - Since:
- 9.0.5
- See Also:
-
hasCountryC1
public boolean hasCountryC1()Check if the country code of C1 is present or not.- Returns:
trueif the country code of C1 is present,falseif not.- Since:
- 9.0.5
- See Also:
-
setCountryC1
Set the country code of C1 to be used.- Parameters:
sCountryC1- The country code of C1 to be used. May benull.- Returns:
- this for chaining
- Since:
- 9.0.5
- See Also:
-
additionalAttributes
@Nonnull @ReturnsMutableObject public com.helger.commons.collection.attr.StringMap additionalAttributes()- Returns:
- The mutable attribute map where all additional attributes according to Spec v1.1, chapter 1.6.1 were added.
- Since:
- 6.1.4
-
setDocumentIdentification
@Nonnull public PeppolSBDHData setDocumentIdentification(@Nonnull @Nonempty String sStandard, @Nonnull @Nonempty String sTypeVersion, @Nonnull @Nonempty String sType, @Nonnull @Nonempty String sInstanceIdentifier, @Nonnull com.helger.commons.datetime.XMLOffsetDateTime aCreationDateAndTime) Set the content of the fields that are mapped toStandardBusinessDocumentHeader/DocumentIdentification.- Parameters:
sStandard- The standard of the enveloped business message, normally described by use of the XML namespace of the business message root element (such as urn:oasis:names:specification: ubl:schema:xsd:Order-2). May not benull. This field is mapped toStandardBusinessDocumentHeader/DocumentIdentification/Standard.sTypeVersion- The version number of the enveloped business message (such as the value "2.1" for OASIS UBL 2.1). May not benull. This field is mapped toStandardBusinessDocumentHeader/DocumentIdentification/TypeVersion.sType- Message type - mandatory in SBDH. XML local element name of the root-element in the business message. May not benull. This field is mapped toStandardBusinessDocumentHeader/DocumentIdentification/Type.sInstanceIdentifier- An informative unique ID created by the issuer of the envelope. The InstanceIdentifier 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 toStandardBusinessDocumentHeader/DocumentIdentification/InstanceIdentifier.aCreationDateAndTime- 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 toStandardBusinessDocumentHeader/DocumentIdentification/CreationDateAndTime.- Returns:
- this
- See Also:
-
getStandard
The standard of the enveloped business message, normally described by use of the XML namespace of the business message root element (such as urn:oasis:names:specification:ubl:schema:xsd:Order-2). This field is mapped toStandardBusinessDocumentHeader/DocumentIdentification/Standard.- Returns:
- The standard value. May be
null.
-
hasStandard
public boolean hasStandard()- Returns:
trueif a standard is present,falseif not.- Since:
- 7.0.0
-
setStandard
Set the content of the fields that are mapped toStandardBusinessDocumentHeader/DocumentIdentification.- Parameters:
sStandard- The standard of the enveloped business message, normally described by use of the XML namespace of the business message root element (such as urn:oasis:names:specification: ubl:schema:xsd:Order-2). May not benull. This field is mapped toStandardBusinessDocumentHeader/DocumentIdentification/Standard.- Returns:
- this
- Since:
- 8.3.1
- See Also:
-
getTypeVersion
The version number of the enveloped business message (such as the value "2.1" for OASIS UBL 2.1 or "2.2" for OASIS UBL 2.2). This field is mapped toStandardBusinessDocumentHeader/DocumentIdentification/TypeVersion.- Returns:
- The type version. May be
null.
-
hasTypeVersion
public boolean hasTypeVersion()- Returns:
trueif a type version is present,falseif not.- Since:
- 7.0.0
-
setTypeVersion
Set the content of the fields that are mapped toStandardBusinessDocumentHeader/DocumentIdentification.- Parameters:
sTypeVersion- The version number of the enveloped business message (such as the value "2.1" for OASIS UBL 2.1). May not benull. This field is mapped toStandardBusinessDocumentHeader/DocumentIdentification/TypeVersion.- Returns:
- this
- Since:
- 8.3.1
- See Also:
-
getType
Message type - mandatory in SBDH. XML local element name of the root-element in the business message. This field is mapped toStandardBusinessDocumentHeader/DocumentIdentification/Type.- Returns:
- Type value. May be
null.
-
hasType
public boolean hasType()- Returns:
trueif a type is present,falseif not.- Since:
- 7.0.0
-
setType
Set the content of the fields that are mapped toStandardBusinessDocumentHeader/DocumentIdentification.- Parameters:
sType- Message type - mandatory in SBDH. XML local element name of the root-element in the business message. May not benull. This field is mapped toStandardBusinessDocumentHeader/DocumentIdentification/Type.- Returns:
- this
- Since:
- 8.3.1
- See Also:
-
getInstanceIdentifier
An informative unique ID created by the issuer of the envelope. The InstanceIdentifier 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 AS2 or START).
The InstanceIdentifier MUST be globally unique and it is RECOMMENDED to use UUID (such as 118e3040-51d2-11e3-8f96-0800200c9a66). This field is mapped toStandardBusinessDocumentHeader/DocumentIdentification/InstanceIdentifier.- Returns:
- The instance identifier. May be
null.
-
hasInstanceIdentifier
public boolean hasInstanceIdentifier()- Returns:
trueif an instance identifier is present,falseif not.- Since:
- 7.0.0
-
setInstanceIdentifier
Set the content of the fields that are mapped toStandardBusinessDocumentHeader/DocumentIdentification.- Parameters:
sInstanceIdentifier- An informative unique ID created by the issuer of the envelope. The InstanceIdentifier 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 toStandardBusinessDocumentHeader/DocumentIdentification/InstanceIdentifier.- Returns:
- this
- Since:
- 8.3.1
- See Also:
-
getCreationDateAndTime
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 toStandardBusinessDocumentHeader/DocumentIdentification/CreationDateAndTime.- Returns:
- The creation date time. May be
null.
-
hasCreationDateAndTime
public boolean hasCreationDateAndTime()- Returns:
trueif creation date and time is present,falseif not.- Since:
- 7.0.0
-
setCreationDateAndTime
@Nonnull public PeppolSBDHData setCreationDateAndTime(@Nonnull com.helger.commons.datetime.XMLOffsetDateTime aCreationDateAndTime) Set the content of the fields that are mapped toStandardBusinessDocumentHeader/DocumentIdentification.- Parameters:
aCreationDateAndTime- 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 toStandardBusinessDocumentHeader/DocumentIdentification/CreationDateAndTime.- Returns:
- this
- Since:
- 8.3.1
- See Also:
-
getBusinessMessage
Get the contained business message.- Returns:
nullif no business message is present. A clone (deep copy) of the business message otherwise.- See Also:
-
getBusinessMessageNoClone
Get the contained business message without cloning it.- Returns:
nullif no business message is present.- Since:
- 8.6.1
- See Also:
-
hasBusinessMessage
public boolean hasBusinessMessage()Check if a business message is present without having the need to explicitly callgetBusinessMessage()which returns a cloned node and is therefore an expensive operation.- Returns:
trueif a business message is present,falseotherwise.
-
getBusinessMessageAsBinaryContent
Parse the existing business message as a special Peppol "BinaryContent" element.- Returns:
- The parsed payload as a Peppol SBDH "BinaryContent" or
nullif the existing Business Message is not a valid binary content. - Since:
- 8.2.4
- See Also:
-
getBusinessMessageAsTextContent
Parse the existing business message as a special Peppol SBDH "TextContent" element.- Returns:
- The parsed payload as a Peppol "TextContent" or
nullif the existing Business Message is not a valid text content. - Since:
- 8.2.4
- See Also:
-
setBusinessMessage
Set the main business message that should be transmitted together with the SBDH. The DOM element is cloned internally to avoid outside modification- Parameters:
aBusinessMessage- The business message to be set. May not benull. Internally the passed element is cloned, so that further modifications outside of this method have no impact on the business message inside this object.- Returns:
- this
- See Also:
-
setBusinessMessageNoClone
Set the main business message that should be transmitted together with the SBDH. The DOM element is not cloned / copied internally.- Parameters:
aBusinessMessage- The business message to be set. May not benull. Internally the passed element is cloned, so that further modifications outside of this method have no impact on the business message inside this object.- Returns:
- this
- Since:
- 8.8.1
- See Also:
-
setBusinessMessageBinaryOnly
@Nonnull public PeppolSBDHData setBusinessMessageBinaryOnly(@Nonnull byte[] aBinaryPayload, @Nonnull com.helger.commons.mime.IMimeType aMimeType, @Nullable Charset aCharset) Set a business message with binary payload. Based on the Peppol SBDH v1.2 binary payload specification. This is wrapper for creating the Peppol SBDH "BinaryContent" element.- Parameters:
aBinaryPayload- The bytes to be wrapped. May not benull.aMimeType- The MIME type to use. May not benull.aCharset- The character set to be used, if the MIME type is text based. May benull.- Returns:
- this for chaining
- Since:
- 6.2.4
- See Also:
-
setBusinessMessageTextOnly
@Nonnull public PeppolSBDHData setBusinessMessageTextOnly(@Nonnull String sTextPayload, @Nonnull com.helger.commons.mime.IMimeType aMimeType) Set a business message with text payload. Based on the Peppol SBDH v1.2 text payload specification. Note: the character set of the wrapped text must be identical to the character set of the SBDH surrounding it. In case the payload requires a specific character set, it is suggested to use the binary message. This is wrapper for creating the Peppol SBDH "TextContent" element.- Parameters:
sTextPayload- The text to be wrapped. May not benull.aMimeType- The MIME type to use. May not benull.- Returns:
- this for chaining
- Since:
- 6.2.4
- See Also:
-
areAllFieldsSet
public boolean areAllFieldsSet(boolean bLogMissing) Check if all mandatory fields are set in the SBDH data.- Parameters:
bLogMissing-trueif log messages should be emitted,falseif not- Returns:
trueif all mandatory fields required for creating an SBDH are present,falseif at least one field is not set.
-
areAllFieldsSet
Check if all mandatory fields are set in the SBDH data.- Parameters:
aMissingFieldConsumer- The consumer to be invoked for each missing field. May not benull- Returns:
trueif all mandatory fields required for creating an SBDH are present,falseif at least one field is not set.- Since:
- 9.6.1
-
areAllFieldsSet
public boolean areAllFieldsSet()- Returns:
trueif all mandatory fields required for creating an SBDH are present,falseif at least one field is not set.
-
areAllAdditionalAttributesValid
public boolean areAllAdditionalAttributesValid()Check if all additional attributes contain non-reserved names.- Returns:
trueif no additional attributes are present or if all additional attributes contain valid names.
-
getAsStandardBusinessDocument
@Nonnull public org.unece.cefact.namespaces.sbdh.StandardBusinessDocument getAsStandardBusinessDocument()- Returns:
- A generic JAXB SBD document of this data. Never
null. - Since:
- 9.2.0
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-
createUBL21
@Nonnull public static PeppolSBDHData createUBL21(@Nonnull Element aBusinessMessage, @Nonnull com.helger.peppolid.factory.IIdentifierFactory aIdentifierFactory) Create a newPeppolSBDHDataobject for a business message assuming it is UBL 2.1. The resulting object has all required fields set, except for:- sender ID
- receiver ID
- document type ID
- and process ID
- Parameters:
aBusinessMessage- The XML business message. May not benull.aIdentifierFactory- Identifier factory to be used. May not benull.- Returns:
- A pre-filled
PeppolSBDHDataobject with some information still missing. - Since:
- 8.3.1
- See Also:
-