Interface OrderGeneratorCheckTask
- All Superinterfaces:
PersistTask<Tuple2<InvoicePropertiesContribution,
Collection<Entity>>, String>
- All Known Implementing Classes:
AbstractOrderGeneratorCheckTask
,CheckBillingPositionsTask
,CheckInvoiceRecipientsTask
,CheckPriceCategoriesTask
,MembershipCheckPriceCategoriesTask
,OrderGeneratorDummyCheckTask
public interface OrderGeneratorCheckTask
extends PersistTask<Tuple2<InvoicePropertiesContribution,Collection<Entity>>,String>
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
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 theirrun(CommandContext, InvoicePropertiesContribution, Collection)
methodgetFailingEntities
(InvoicePropertiesContribution properties, Collection<Entity> entities) default Entity
mapEntityForDisplay
(InvoicePropertiesContribution properties, Entity entity) decide which entity should be displayed in the error messagerun
(CommandContext commandContext, InvoicePropertiesContribution properties, Collection<Entity> entities) 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, run, skipErrors, unwrap
-
Method Details
-
run
String run(CommandContext commandContext, InvoicePropertiesContribution properties, Collection<Entity> entities) throws NoEntityToLoadException - Throws:
NoEntityToLoadException
-
getFailingEntities
List<Entity> getFailingEntities(InvoicePropertiesContribution properties, Collection<Entity> entities) -
doesEntityFail
default boolean doesEntityFail(InvoicePropertiesContribution properties, Entity entity) throws NoEntityToLoadException 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 theirrun(CommandContext, InvoicePropertiesContribution, Collection)
method- Returns:
- true if entity fails the check, false otherwise
- Throws:
NoEntityToLoadException
-
mapEntityForDisplay
decide which entity should be displayed in the error message- Returns:
- the entity to display
-