Class PeppolSBDHDataWriter

java.lang.Object
com.helger.peppol.sbdh.PeppolSBDHDataWriter

@NotThreadSafe public class PeppolSBDHDataWriter extends Object
Convert a Peppol SBDH document to a regular SBDH document
Author:
Philip Helger
  • Field Details

    • DEFAULT_FAVOUR_SPEED

      public static final boolean DEFAULT_FAVOUR_SPEED
      See Also:
  • Constructor Details

    • PeppolSBDHDataWriter

      public PeppolSBDHDataWriter()
  • Method Details

    • getHeaderVersion

      @Nonnull public final String getHeaderVersion()
      Returns:
      The SBDH header version to be used. May not be null.
    • setHeaderVersion

      @Nonnull public final PeppolSBDHDataWriter setHeaderVersion(@Nonnull String sHeaderVersion)
      Set the header version to be used.
      Parameters:
      sHeaderVersion - The head version. May not be null.
      Returns:
      this for chaining
    • isFavourSpeed

      public final boolean isFavourSpeed()
      Returns:
      true if speed is favoured, false if not. Default is DEFAULT_FAVOUR_SPEED.
      Since:
      8.8.1
    • setFavourSpeed

      @Nonnull public final PeppolSBDHDataWriter setFavourSpeed(boolean bFavourSpeed)
      Enable or disable the "favour speed" option. This
      Parameters:
      bFavourSpeed - true to favour speed, false to 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 new StandardBusinessDocument from the specified document data.
      Parameters:
      aData - The document data to be used. May not be null and PeppolSBDHData.areAllFieldsSet() must return true!
      Returns:
      Never null.
      Throws:
      IllegalArgumentException - if not all document data fields are set!