Package com.helger.peppol.sbdh
Class PeppolSBDHDataWriter
java.lang.Object
com.helger.peppol.sbdh.PeppolSBDHDataWriter
Convert a Peppol SBDH document to a regular SBDH document
- Author:
- Philip Helger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.unece.cefact.namespaces.sbdh.StandardBusinessDocumentCreate a newStandardBusinessDocumentfrom the specified document data.final Stringfinal booleanfinal PeppolSBDHDataWritersetFavourSpeed(boolean bFavourSpeed) Enable or disable the "favour speed" option.final PeppolSBDHDataWritersetHeaderVersion(String sHeaderVersion) Set the header version to be used.
-
Field Details
-
DEFAULT_FAVOUR_SPEED
public static final boolean DEFAULT_FAVOUR_SPEED- See Also:
-
-
Constructor Details
-
PeppolSBDHDataWriter
public PeppolSBDHDataWriter()
-
-
Method Details
-
getHeaderVersion
- Returns:
- The SBDH header version to be used. May not be
null.
-
setHeaderVersion
Set the header version to be used.- Parameters:
sHeaderVersion- The head version. May not benull.- Returns:
- this for chaining
-
isFavourSpeed
public final boolean isFavourSpeed()- Returns:
trueif speed is favoured,falseif not. Default isDEFAULT_FAVOUR_SPEED.- Since:
- 8.8.1
-
setFavourSpeed
Enable or disable the "favour speed" option. This- Parameters:
bFavourSpeed-trueto favour speed,falseto not favour speed.- Returns:
- this for chaining
- Since:
- 8.8.1
-
createStandardBusinessDocument
@Nonnull public org.unece.cefact.namespaces.sbdh.StandardBusinessDocument createStandardBusinessDocument(@Nonnull PeppolSBDHData aData) Create a newStandardBusinessDocumentfrom the specified document data.- Parameters:
aData- The document data to be used. May not benullandPeppolSBDHData.areAllFieldsSet()must return true!- Returns:
- Never
null. - Throws:
IllegalArgumentException- if not all document data fields are set!
-