O - as OrderINVOICE - as Invoice data structurepublic class SpringTemplateInvoiceService<O extends Order<I>,I extends OrderItem,INVOICE> extends TemplateInvoiceService<O,I,INVOICE> implements org.springframework.context.ApplicationContextAware
TemplateInvoiceService for Spring Beans
Publisher is derived from the Spring Context. The publisherTemplateName should be prototype scope.
ApplicationContext| Constructor and Description |
|---|
SpringTemplateInvoiceService() |
SpringTemplateInvoiceService(String publisherTemplateName)
Publishers are stateful; hence the bean name is supplied so that a new instance is instatiated on each request |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.context.ApplicationContext |
getApplicationContext() |
protected Publisher |
getPublisher(O order)
Get Publisher for each instance request
|
protected void |
processContext(O order,
Map dataMap)
Can process order to derive other intermediate context variables and put them in the context Map.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
addChangeListener, convertStreamToInvoice, generateInvoice, getInvoiceType, getListeners, notifyAllListeners, setListeners, updateInvoiceHistorypublic final void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionprotected void processContext(O order, Map dataMap)
TemplateInvoiceServiceDate (If new it will update the order object)processContext in class TemplateInvoiceService<O extends Order<I>,I extends OrderItem,INVOICE>protected final Publisher getPublisher(O order)
getPublisher in class TemplateInvoiceService<O extends Order<I>,I extends OrderItem,INVOICE>public org.springframework.context.ApplicationContext getApplicationContext()
Copyright © 2018. All rights reserved.