Class CreateDunningRunPersistTask
java.lang.Object
ch.tocco.nice2.optional.debitor.api.action.CreateDunningRunPersistTask
- All Implemented Interfaces:
PersistTask<CreateDunningRunPersistTask.DunningRunBean, List<Entity>>
public class CreateDunningRunPersistTask
extends Object
implements PersistTask<CreateDunningRunPersistTask.DunningRunBean, List<Entity>>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionCreateDunningRunPersistTask(Context context, EntityDefaultValueService entityDefaultValueService, DunningService dunningService, CommandExecutor commandExecutor, TemplateEngineFactory templateEngineFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected EntitycreateDunningEntity(Entity dunningRun, CreateDunningRunPersistTask.DebitorAddressChange debitorChange) protected @Nullable StringgetLocalizedFreemarkerField(Entity dunning, Entity dunningLevelStatus, String field, Locale orderLocale) protected LocalegetOrderLocale(Entity debitor) run(Optional<CreateDunningRunPersistTask.DunningRunBean> dunningRunConfig, CommandContext commandContext) voidsetDebitorTotalsTask(OptionalTask<Entity, Entity> debitorTotalsTask) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrap
-
Constructor Details
-
CreateDunningRunPersistTask
public CreateDunningRunPersistTask(Context context, EntityDefaultValueService entityDefaultValueService, DunningService dunningService, CommandExecutor commandExecutor, TemplateEngineFactory templateEngineFactory)
-
-
Method Details
-
run
public List<Entity> run(Optional<CreateDunningRunPersistTask.DunningRunBean> dunningRunConfig, CommandContext commandContext) throws Exception - Specified by:
runin interfacePersistTask<CreateDunningRunPersistTask.DunningRunBean, List<Entity>>- Throws:
Exception
-
createDunningEntity
protected Entity createDunningEntity(Entity dunningRun, CreateDunningRunPersistTask.DebitorAddressChange debitorChange) throws TemplateException - Throws:
TemplateException
-
getOrderLocale
-
getLocalizedFreemarkerField
protected @Nullable String getLocalizedFreemarkerField(Entity dunning, Entity dunningLevelStatus, String field, Locale orderLocale) throws TemplateException - Throws:
TemplateException
-
setDebitorTotalsTask
-