Class CreateOrdersTask
java.lang.Object
ch.tocco.nice2.optional.order.api.action.invoice.tasks.AbstractOrderGeneratorTask
ch.tocco.nice2.optional.order.spi.action.invoice.tasks.CreateOrdersTask
- All Implemented Interfaces:
OrderGeneratorTask
,PersistTask<Tuple3<Entity,
InvoicePropertiesContribution, Collection<OrderGeneratorBean>>, Tuple3<Entity, InvoicePropertiesContribution, Collection<OrderGeneratorBean>>>
this task creates a order for each
OrderGeneratorBean
and sets:
- the recipient
- the values from Invoice_action_settings or the default
- the action properties from InvoicePropertiesContribution
- the billing date on the source entity-
Constructor Summary
ConstructorDescriptionCreateOrdersTask
(PrincipalService principalService, org.slf4j.Logger log, EntityDefaultValueService defaultValueService, OrderGenerateAddressService orderGenerateAddressService, TemplateEngineFactory templateEngineFactory, L10N l10N, OrderPriceCategoryService priceCategoryService) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyCustomChangesToOrder
(Entity order, Entity source, Entity settings, OrderGeneratorBean orderGeneratorBean) Override this method in your subclass to modify the created order.protected InvoiceRecipient
getInvoiceRecipient
(OrderGeneratorBean orderGeneratorBean, Entity source, Entity settings) void
run
(CommandContext context, Entity settings, InvoicePropertiesContribution properties, Collection<OrderGeneratorBean> beans) Methods inherited from class ch.tocco.nice2.optional.order.api.action.invoice.tasks.AbstractOrderGeneratorTask
run
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrap
-
Constructor Details
-
CreateOrdersTask
public CreateOrdersTask(PrincipalService principalService, org.slf4j.Logger log, EntityDefaultValueService defaultValueService, OrderGenerateAddressService orderGenerateAddressService, TemplateEngineFactory templateEngineFactory, L10N l10N, OrderPriceCategoryService priceCategoryService)
-
-
Method Details
-
run
public void run(CommandContext context, Entity settings, InvoicePropertiesContribution properties, Collection<OrderGeneratorBean> beans) -
applyCustomChangesToOrder
protected void applyCustomChangesToOrder(Entity order, Entity source, Entity settings, OrderGeneratorBean orderGeneratorBean) Override this method in your subclass to modify the created order. -
getInvoiceRecipient
protected InvoiceRecipient getInvoiceRecipient(OrderGeneratorBean orderGeneratorBean, Entity source, Entity settings)
-