Class CheckBillingPositionsTask
java.lang.Object
ch.tocco.nice2.optional.order.api.action.invoice.tasks.AbstractOrderGeneratorCheckTask
ch.tocco.nice2.optional.order.spi.action.invoice.tasks.CheckBillingPositionsTask
- All Implemented Interfaces:
OrderGeneratorCheckTask, PersistTask<Tuple2<InvoicePropertiesContribution, Collection<Entity>>, String>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.google.common.base.Joiner -
Constructor Summary
ConstructorsConstructorDescriptionCheckBillingPositionsTask(TextResources textResources, DefaultDisplayService defaultDisplayService) -
Method Summary
Modifier and TypeMethodDescriptionbooleandoesEntityFail(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)methodrun(CommandContext commandContext, InvoicePropertiesContribution properties, Collection<Entity> entities) protected TextMessagesetupErrorMessage(EntityModel entityModel, List<String> entitiesWithoutBillingPosition) Methods inherited from class AbstractOrderGeneratorCheckTask
getFailingEntities, getFailingEntityDefaultDisplays, run, streamFailingEntitiesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface OrderGeneratorCheckTask
mapEntityForDisplayMethods inherited from interface PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrap
-
Field Details
-
NEW_LINE_JOINER
protected static final com.google.common.base.Joiner NEW_LINE_JOINER
-
-
Constructor Details
-
CheckBillingPositionsTask
public CheckBillingPositionsTask(TextResources textResources, DefaultDisplayService defaultDisplayService)
-
-
Method Details
-
run
public String run(CommandContext commandContext, InvoicePropertiesContribution properties, Collection<Entity> entities) -
doesEntityFail
Description copied from interface:OrderGeneratorCheckTaskchecks 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
-
setupErrorMessage
protected TextMessage setupErrorMessage(EntityModel entityModel, List<String> entitiesWithoutBillingPosition)
-