Class AbstractToEbInterfaceConverter
- java.lang.Object
-
- at.austriapro.ebinterface.ubl.AbstractConverter
-
- at.austriapro.ebinterface.ubl.from.AbstractToEbInterfaceConverter
-
- Direct Known Subclasses:
AbstractToEbInterface40Converter,AbstractToEbInterface41Converter,AbstractToEbInterface42Converter,AbstractToEbInterface43Converter,AbstractToEbInterface50Converter,AbstractToEbInterface60Converter,AbstractToEbInterface61Converter
@Immutable public abstract class AbstractToEbInterfaceConverter extends AbstractConverter
Base class for Peppol UBL to ebInterface converter- Author:
- philip
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractToEbInterfaceConverter.EText
-
Field Summary
Fields Modifier and Type Field Description static StringEBI_GENERATING_SYSTEM_40static StringEBI_GENERATING_SYSTEM_41static StringEBI_GENERATING_SYSTEM_42static StringEBI_GENERATING_SYSTEM_43static StringEBI_GENERATING_SYSTEM_50static StringEBI_GENERATING_SYSTEM_60static StringEBI_GENERATING_SYSTEM_61protected IToEbinterfaceSettingsm_aSettings-
Fields inherited from class at.austriapro.ebinterface.ubl.AbstractConverter
AT_UNDEFINED_VATIN, CREDIT_NOTE_TYPE_CODES, CUSTOMIZATION_SCHEMEID, IBAN_MAX_LENGTH, INVOICE_TYPE_CODE_CREDIT_NOTE, INVOICE_TYPE_CODE_INVOICE, INVOICE_TYPE_CODE_PARTIAL, INVOICE_TYPE_CODE_PREPAYMENT_INVOICE, INVOICE_TYPE_CODE_SELF_BILLING, INVOICE_TYPE_CODES, m_aContentLocale, m_aDisplayLocale, OTHER_TAX_SCHEME_ID, PAYMENT_CHANNEL_CODE_IBAN, PAYMENT_MEANS_CREDIT_CARD, PAYMENT_MEANS_CREDIT_TRANSFER, PAYMENT_MEANS_DEBIT_CARD, PAYMENT_MEANS_DEBIT_TRANSFER, PAYMENT_MEANS_DIRECT_DEBIT, PAYMENT_MEANS_PAYMENT_TO_BANK_ACCOUNT, PAYMENT_MEANS_SEPA_CREDIT_TRANSFER, PAYMENT_MEANS_SEPA_DIRECT_DEBIT, REGEX_BIC, ROUNDING_MODE, SCALE_PERC, SCALE_PRICE2, SCALE_PRICE4, SCHEME_BIC, SCHEME_IBAN, SUPPORTED_TAX_SCHEME_ID, SUPPORTED_TAX_SCHEME_SCHEME_ID, UBL_VERSION_20, UBL_VERSION_21, UBL_VERSION_22, UBL_VERSION_23, UOM_DEFAULT
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractToEbInterfaceConverter(Locale aDisplayLocale, Locale aContentLocale, IToEbinterfaceSettings aSettings)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckCreditNoteConsistency(oasis.names.specification.ubl.schema.xsd.creditnote_21.CreditNoteType aUBLCreditNote, com.helger.commons.error.list.ErrorList aTransformationErrorList)Check if the passed UBL invoice is transformableprotected voidcheckInvoiceConsistency(oasis.names.specification.ubl.schema.xsd.invoice_21.InvoiceType aUBLInvoice, com.helger.commons.error.list.ErrorList aTransformationErrorList)Check if the passed UBL invoice is transformableprotected static oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_21.TaxCategoryTypefindTaxCategory(List<oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_21.TaxTotalType> aUBLTaxTotals)protected static StringgetAllowanceChargeComment(oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_21.AllowanceChargeType aUBLAllowanceCharge)protected StringgetOrString(String sSep, String... aValues)Get a string in the form [string][sep][string][sep][string][or][last-string].protected static booleanisBIC(String sScheme)protected static booleanisDirectDebit(String sPaymentMeansCode)protected static booleanisIBAN(String sPaymentChannelCode)protected static booleanisSEPADirectDebit(String sPaymentMeansCode)protected static booleanisTaxExemptionCategoryID(String sUBLTaxCategoryID)protected static booleanisUniversalBankTransaction(String sPaymentMeansCode)protected static booleanisVATSchemeID(String sScheme)
-
-
-
Field Detail
-
EBI_GENERATING_SYSTEM_40
public static final String EBI_GENERATING_SYSTEM_40
- See Also:
- Constant Field Values
-
EBI_GENERATING_SYSTEM_41
public static final String EBI_GENERATING_SYSTEM_41
- See Also:
- Constant Field Values
-
EBI_GENERATING_SYSTEM_42
public static final String EBI_GENERATING_SYSTEM_42
- See Also:
- Constant Field Values
-
EBI_GENERATING_SYSTEM_43
public static final String EBI_GENERATING_SYSTEM_43
- See Also:
- Constant Field Values
-
EBI_GENERATING_SYSTEM_50
public static final String EBI_GENERATING_SYSTEM_50
- See Also:
- Constant Field Values
-
EBI_GENERATING_SYSTEM_60
public static final String EBI_GENERATING_SYSTEM_60
- See Also:
- Constant Field Values
-
EBI_GENERATING_SYSTEM_61
public static final String EBI_GENERATING_SYSTEM_61
- See Also:
- Constant Field Values
-
m_aSettings
protected final IToEbinterfaceSettings m_aSettings
-
-
Constructor Detail
-
AbstractToEbInterfaceConverter
protected AbstractToEbInterfaceConverter(@Nonnull Locale aDisplayLocale, @Nonnull Locale aContentLocale, @Nonnull IToEbinterfaceSettings aSettings)
Constructor- Parameters:
aDisplayLocale- The locale for error messages. May not benull.aContentLocale- The locale for the created ebInterface files. May not benull.aSettings- Conversion settings to be used. May not benull.
-
-
Method Detail
-
getAllowanceChargeComment
@Nonnull protected static String getAllowanceChargeComment(@Nonnull oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_21.AllowanceChargeType aUBLAllowanceCharge)
-
checkInvoiceConsistency
protected final void checkInvoiceConsistency(@Nonnull oasis.names.specification.ubl.schema.xsd.invoice_21.InvoiceType aUBLInvoice, @Nonnull com.helger.commons.error.list.ErrorList aTransformationErrorList)
Check if the passed UBL invoice is transformable- Parameters:
aUBLInvoice- The UBL invoice to check. May not benull.aTransformationErrorList- The error list to be filled. May not benull.
-
checkCreditNoteConsistency
protected final void checkCreditNoteConsistency(@Nonnull oasis.names.specification.ubl.schema.xsd.creditnote_21.CreditNoteType aUBLCreditNote, @Nonnull com.helger.commons.error.list.ErrorList aTransformationErrorList)
Check if the passed UBL invoice is transformable- Parameters:
aUBLCreditNote- The UBL invoice to check. May not benull.aTransformationErrorList- The error list to be filled. May not benull.
-
isTaxExemptionCategoryID
protected static final boolean isTaxExemptionCategoryID(@Nullable String sUBLTaxCategoryID)
-
isVATSchemeID
protected static boolean isVATSchemeID(String sScheme)
-
findTaxCategory
@Nullable protected static oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_21.TaxCategoryType findTaxCategory(@Nonnull List<oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_21.TaxTotalType> aUBLTaxTotals)
-
getOrString
@Nonnull protected final String getOrString(@Nonnull String sSep, @Nullable String... aValues)
Get a string in the form [string][sep][string][sep][string][or][last-string]. So the last and the second last entries are separated by " or " whereas the other entries are separated by the provided separator.- Parameters:
sSep- Separator to use. May not benull.aValues- Values to be combined.- Returns:
- The combined string. Never
null.
-
isUniversalBankTransaction
protected static boolean isUniversalBankTransaction(@Nullable String sPaymentMeansCode)
-
-