Class CheckPriceCategoriesTask
java.lang.Object
ch.tocco.nice2.optional.order.api.action.invoice.tasks.AbstractOrderGeneratorCheckTask
ch.tocco.nice2.optional.order.impl.action.invoice.tasks.CheckPriceCategoriesTask
- All Implemented Interfaces:
OrderGeneratorCheckTask
,PersistTask<Tuple2<InvoicePropertiesContribution,
Collection<Entity>>, String>
-
Constructor Summary
ConstructorDescriptionCheckPriceCategoriesTask
(InvoiceRecipientService invoiceRecipientService, OrderPriceCategoryService orderPriceCategoryService, DefaultDisplayService defaultDisplayService, TextResources textResources) -
Method Summary
Modifier and TypeMethodDescriptionboolean
doesEntityFail
(InvoicePropertiesContribution properties, Entity entity) checks if an entity fails the check task this must be overwritten when using the check task in the new client action check tasks may still work in legacy client without this method, but may not call it in theirOrderGeneratorCheckTask.run(CommandContext, InvoicePropertiesContribution, Collection)
methodmapEntityForDisplay
(InvoicePropertiesContribution properties, Entity entity) decide which entity should be displayed in the error messagerun
(CommandContext commandContext, InvoicePropertiesContribution properties, Collection<Entity> entities) Methods inherited from class ch.tocco.nice2.optional.order.api.action.invoice.tasks.AbstractOrderGeneratorCheckTask
getFailingEntities, getFailingEntityDefaultDisplays, run, streamFailingEntities
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
-
CheckPriceCategoriesTask
public CheckPriceCategoriesTask(InvoiceRecipientService invoiceRecipientService, OrderPriceCategoryService orderPriceCategoryService, DefaultDisplayService defaultDisplayService, TextResources textResources)
-
-
Method Details
-
run
public String run(CommandContext commandContext, InvoicePropertiesContribution properties, Collection<Entity> entities) -
mapEntityForDisplay
Description copied from interface:OrderGeneratorCheckTask
decide which entity should be displayed in the error message- Returns:
- the entity to display
-
doesEntityFail
Description copied from interface:OrderGeneratorCheckTask
checks if an entity fails the check task this must be overwritten when using the check task in the new client action check tasks may still work in legacy client without this method, but may not call it in theirOrderGeneratorCheckTask.run(CommandContext, InvoicePropertiesContribution, Collection)
method- Returns:
- true if entity fails the check, false otherwise
-