Class CreateDunningRunPersistTask
java.lang.Object
ch.tocco.nice2.optional.debitor.api.action.CreateDunningRunPersistTask
- All Implemented Interfaces:
PersistTask<CreateDunningRunActionService.DunningRunBean,Void>
public class CreateDunningRunPersistTask
extends Object
implements PersistTask<CreateDunningRunActionService.DunningRunBean,Void>
-
Constructor Summary
ConstructorsConstructorDescriptionCreateDunningRunPersistTask(Context context, EntityDefaultValueService entityDefaultValueService, DunningService dunningService, CommandExecutor commandExecutor, TemplateEngineFactory templateEngineFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected EntityManagerprotected @Nullable StringgetLocalizedFreemarkerField(Entity dunning, Entity dunningLevelStatus, String field, Locale orderLocale) protected LocalegetOrderLocale(Entity debitor) @Nullable Voidrun(Optional<CreateDunningRunActionService.DunningRunBean> dunningRunConfig, CommandContext commandContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
CreateDunningRunPersistTask
public CreateDunningRunPersistTask(Context context, EntityDefaultValueService entityDefaultValueService, DunningService dunningService, CommandExecutor commandExecutor, TemplateEngineFactory templateEngineFactory)
-
-
Method Details
-
run
@Nullable public @Nullable Void run(Optional<CreateDunningRunActionService.DunningRunBean> dunningRunConfig, CommandContext commandContext) throws Exception - Specified by:
runin interfacePersistTask<CreateDunningRunActionService.DunningRunBean,Void> - Throws:
Exception
-
createDunningEntity
protected void createDunningEntity(Entity dunningRun, Tuple2<Entity, Optional<String>> tuple2) throws InterruptedException, TemplateException -
getDunningEM
-
getOrderLocale
-
getLocalizedFreemarkerField
@Nullable protected @Nullable String getLocalizedFreemarkerField(Entity dunning, Entity dunningLevelStatus, String field, Locale orderLocale) throws TemplateException - Throws:
TemplateException
-