Class TinyTaskConfServiceImpl
-
- All Implemented Interfaces:
-
pro.fessional.wings.tiny.task.service.TinyTaskConfService
@Service()@ConditionalWingsEnabled() public class TinyTaskConfServiceImpl implements TinyTaskConfService
- Since:
2022-12-14
trydofor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumTinyTaskConfServiceImpl.Jane
-
Constructor Summary
Constructors Constructor Description TinyTaskConfServiceImpl()
-
Method Summary
Modifier and Type Method Description TinyTaskConfService.Confconfig(@NotNull() Object bean, @NotNull() Method method, @Nullable() Object para)Configure the TinyTasker annotated and enabled method , return the taskId. - throw exception if property not exist - insert to database if not exist in database - update to database, if exist and matched and lower version - otherwise no operationSet<TinyTaskConfService.Conf>config(@NotNull() Object bean)Configures all TinyTasker annotated methods, and returns the taskId and its config. TaskerPropdatabase(long id, boolean nonnull)Load properties from database by taskId TaskerPropproperty(long id, boolean nonnull)Load properties from config file, get value by key LinkedHashMap<String, Diff.V<out Object>>diffProp(long id)booleanenable(long id, boolean enabled)Enable or disable the task booleanreplace(long id, TaskerProp prop)Save properties to database <K, T> voiddiff(Map<K, Diff.V<out Object>> map, K key, T t1, T t2)voidsetAppName(String appName)voidsetApplicationContext(ApplicationContext applicationContext)voidsetTinyTaskDefineProp(TinyTaskDefineProp tinyTaskDefineProp)voidsetWinTaskDefineDao(WinTaskDefineDao winTaskDefineDao)voidsetLightIdService(LightIdService lightIdService)voidsetJournalService(JournalService journalService)-
-
Method Detail
-
config
@Transactional() TinyTaskConfService.Conf config(@NotNull() Object bean, @NotNull() Method method, @Nullable() Object para)
Configure the TinyTasker annotated and enabled method , return the taskId. - throw exception if property not exist - insert to database if not exist in database - update to database, if exist and matched and lower version - otherwise no operation
-
config
@NotNull()@Transactional() Set<TinyTaskConfService.Conf> config(@NotNull() Object bean)
Configures all TinyTasker annotated methods, and returns the taskId and its config. Throw exception if autorun but para is incorrect.
-
database
@Contract(value = "_,true->!null") TaskerProp database(long id, boolean nonnull)
Load properties from database by taskId
-
property
@Contract(value = "_,true->!null") TaskerProp property(long id, boolean nonnull)
Load properties from config file, get value by key
-
diffProp
@NotNull() LinkedHashMap<String, Diff.V<out Object>> diffProp(long id)
-
enable
@Transactional() boolean enable(long id, boolean enabled)
Enable or disable the task
-
replace
@Transactional() boolean replace(long id, TaskerProp prop)
Save properties to database
-
setAppName
@Value(value = "${spring.application.name}") void setAppName(String appName)
-
setApplicationContext
@Autowired() void setApplicationContext(ApplicationContext applicationContext)
-
setTinyTaskDefineProp
@Autowired() void setTinyTaskDefineProp(TinyTaskDefineProp tinyTaskDefineProp)
-
setWinTaskDefineDao
@Autowired() void setWinTaskDefineDao(WinTaskDefineDao winTaskDefineDao)
-
setLightIdService
@Autowired() void setLightIdService(LightIdService lightIdService)
-
setJournalService
@Autowired() void setJournalService(JournalService journalService)
-
-
-
-