public class UBL4JConfigurationBean extends Object
UBL4JConfigurationBeanBuilder
creates an instance of UBL4JConfigurationBean
based on the content of
ubl4j.properties
file.UBL4JConfigurationBeanBuilder
,
ubl4j.properties
Constructor and Description |
---|
UBL4JConfigurationBean() |
Modifier and Type | Method and Description |
---|---|
File |
getConfigurationFile()
Return the file where the configuration is stored.
|
Locale |
getDefaultLocale()
Gets the default locale used for locale sensitive operations.
|
WorkTimeUnit |
getDisplayWorkTimeUnit()
Gets the
WorkTimeUnit that is included in the printable invoice. |
String |
getInvoiceTermsFileName()
Gets the file that contains the invoice terms and conditions.
|
List |
getInvoiceTypeConstraintClassNames()
Gets the list of constraints classes called to validate the invoice
|
List |
getInvoiceTypeProcessUnitClassNames()
Gets the list of process unit classes called to process the invoice
|
List |
getOrderTypeConstraintClassNames()
Gets the list of constraints classes called to validate the order
|
List |
getOrderTypeProcessUnitClassNames()
Gets the list of process unit classes called to process the order
|
File |
getOutputDir()
Gets the output directory used by default to save the invoice output files.
|
WorkTimeUnit |
getPersistenceWorkTimeUnit()
Gets the
persistenceWorkTimeUnit that is used for invoice calculation and persisted. |
BigDecimal |
getWorkHourPerDay()
Gets the number of working hours in a day.
|
boolean |
isIncludeQuantityUnitInInvoiceLine()
Indicates weather to include the unit quantity in all invoice lines or just as a single token
|
boolean |
isIncludeVatRateInInvoiceLine()
Indicates weather to include the VAT rate in all invoice lines or just as a single token
|
boolean |
isWorkTimeUnitConversionEnabled()
Indicates weather the the conversion is performed or not.
|
void |
setConfigurationFile(File configurationFile)
Sets the file where the corresponding configuration is stored.
|
void |
setDefaultLocale(Locale defaultLocale)
Sets the default locale to be used for locale sensitive operations.
|
void |
setDisplayWorkTimeUnit(WorkTimeUnit displayWorkTimeUnit)
Sets the
WorkTimeUnit that is used for rendering the invoice output; by default, it's initialised based
on the value of org.openinvoice.ubl4j.util.WorkTimeUnit.display.unit property. |
void |
setIncludeQuantityUnitInInvoiceLine(boolean includeQuantityUnitInInvoiceLine)
Sets the flag for adding the unit code either as a field in the invoice line or as a
single token.
|
void |
setIncludeVatRateInInvoiceLine(boolean includeVatRateInInvoiceLine)
Adding the VAT rate either as a field in the invoice line or as a single token.
|
void |
setInvoiceTermsFileName(String invoiceTermsFileName)
Sets the file name to be used for constructing the invoice terms and conditions.
|
void |
setInvoiceTypeConstraintClassNames(List invoiceTypeConstraintClassNames)
Sets the list of constraints classes called to validate the given invoice; by default,
the value of the InvoiceTypeConstraintFactory property
is used to construct the list.
|
void |
setInvoiceTypeProcessUnitClassNames(List invoiceTypeProcessUnitClassNames)
Sets the list of process units called to process a given invoice after it's generated; by default,
the value of the InvoiceTypeProcessUnitFactory property
is used to construct the list.
|
void |
setOrderTypeConstraintClassNames(List orderTypeConstraintClassNames)
Sets the list of constraints classes called to validate a given order; by default,
the value of the OrderTypeConstraintFactory property
is used to construct the list.
|
void |
setOrderTypeProcessUnitClassNames(List orderTypeProcessUnitClassNames)
Sets the list of process units called to process a given order after it's un-marshaled; by default,
the value of the OrderTypeProcessUnitFactory property
is used to construct the list.
|
void |
setOutputDir(File outputDir)
Sets the output directory used to save the invoice output files.
|
void |
setPersistenceWorkTimeUnit(WorkTimeUnit persistenceWorkTimeUnit)
Sets the
WorkTimeUnit that is used for the invoice calculation; by default, it's initialised based
on the value of org.openinvoice.ubl4j.util.WorkTimeUnit.persistence.unit property. |
void |
setWorkHourPerDay(BigDecimal workHourPerDay)
Sets the number of working hours in a day.
|
void |
setWorkTimeUnitConversionEnabled(boolean workTimeUnitConversionEnabled)
Sets the conversion on or off.
|
String |
toString() |
public String getInvoiceTermsFileName()
public void setInvoiceTermsFileName(String invoiceTermsFileName)
invoiceTermsFileName
- the invoiceTerms filepublic BigDecimal getWorkHourPerDay()
public void setWorkHourPerDay(BigDecimal workHourPerDay)
workHourPerDay
- defines the number of hours in a working daypublic boolean isWorkTimeUnitConversionEnabled()
public void setWorkTimeUnitConversionEnabled(boolean workTimeUnitConversionEnabled)
false
, no conversion is done.workTimeUnitConversionEnabled
- enables conversionpublic WorkTimeUnit getPersistenceWorkTimeUnit()
persistenceWorkTimeUnit
that is used for invoice calculation and persisted.public void setPersistenceWorkTimeUnit(WorkTimeUnit persistenceWorkTimeUnit)
WorkTimeUnit
that is used for the invoice calculation; by default, it's initialised based
on the value of org.openinvoice.ubl4j.util.WorkTimeUnit.persistence.unit property. The time unit can be:
WorkTimeUnit.Hours
or set the value of
org.openinvoice.ubl4j.util.WorkTimeUnit.persistence.unit to HUR.
WorkTimeUnit.Days
or set the value of
org.openinvoice.ubl4j.util.WorkTimeUnit.persistence.unit to DAY.
The value of org.openinvoice.ubl4j.util.WorkTimeUnit.workHourPerDay
is used to decide on the number of hours in a working day.
persistenceWorkTimeUnit
- the time unit for invoice calculationpublic WorkTimeUnit getDisplayWorkTimeUnit()
WorkTimeUnit
that is included in the printable invoice. Valid values are: HUR and DAY.public void setDisplayWorkTimeUnit(WorkTimeUnit displayWorkTimeUnit)
WorkTimeUnit
that is used for rendering the invoice output; by default, it's initialised based
on the value of org.openinvoice.ubl4j.util.WorkTimeUnit.display.unit property. The time unit can be:
WorkTimeUnit.Hours
or set the value of
org.openinvoice.ubl4j.util.WorkTimeUnit.display.unit to HUR.
WorkTimeUnit.Days
or set the value of
org.openinvoice.ubl4j.util.WorkTimeUnit.display.unit to DAY.
The value of org.openinvoice.ubl4j.util.WorkTimeUnit.workHourPerDay
is used to decide on the number of hours in a working day.
persistenceWorkTimeUnit
- the time unit for invoice calculationpublic boolean isIncludeQuantityUnitInInvoiceLine()
public void setIncludeQuantityUnitInInvoiceLine(boolean includeQuantityUnitInInvoiceLine)
includeQuantityUnitInInvoiceLine
- flag indicating the inclusion of the unit code in invoice linespublic boolean isIncludeVatRateInInvoiceLine()
public void setIncludeVatRateInInvoiceLine(boolean includeVatRateInInvoiceLine)
includeVatRateInInvoiceLine
- flags the inclusion of VAT rate in invoice linespublic List getInvoiceTypeProcessUnitClassNames()
public void setInvoiceTypeProcessUnitClassNames(List invoiceTypeProcessUnitClassNames)
invoiceTypeProcessUnitClassNames
- list of process unitspublic List getInvoiceTypeConstraintClassNames()
public void setInvoiceTypeConstraintClassNames(List invoiceTypeConstraintClassNames)
invoiceTypeConstraintClassNames
- the list of constraintspublic List getOrderTypeProcessUnitClassNames()
public void setOrderTypeProcessUnitClassNames(List orderTypeProcessUnitClassNames)
orderTypeProcessUnitClassNames
- list of process unitspublic List getOrderTypeConstraintClassNames()
public void setOrderTypeConstraintClassNames(List orderTypeConstraintClassNames)
orderTypeConstraintClassNames
- the list of constraintspublic Locale getDefaultLocale()
public void setDefaultLocale(Locale defaultLocale)
defaultLocale
- the input localepublic File getOutputDir()
public void setOutputDir(File outputDir)
outputDir
- the default output dir.public File getConfigurationFile()
public void setConfigurationFile(File configurationFile)
configurationFile
- the corresponding configuration file.Copyright © 2011-2013 Plain Source. All Rights Reserved.