Interface TinyTaskConfService
-
- All Implemented Interfaces:
public interface TinyTaskConfServiceConfigure the properties of Tasker, compare the database and configuration files, giving priority to the larger version. When the versions are the same, prioritize the database. Additionally, provide default configurations that can be inherited for non-independent properties.
- Since:
2022-12-11
trydofor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classTinyTaskConfService.Conf
-
Method Summary
Modifier and Type Method Description abstract 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 - save to database if not exist in database - save to database, if exist in database, but higher version - otherwise no operationabstract Set<TinyTaskConfService.Conf>config(@NotNull() Object bean)Configures all TinyTasker annotated methods, and returns the taskId and its config. abstract TaskerPropdatabase(long id, boolean nonnull)Load properties from database by taskId abstract TaskerPropproperty(long id, boolean nonnull)Load properties from config file, get value by key abstract LinkedHashMap<String, Diff.V<out Object>>diffProp(long id)abstract booleanenable(long id, boolean enabled)Enable or disable the task abstract booleanreplace(long id, TaskerProp prop)Save properties to database -
-
Method Detail
-
config
abstract 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 - save to database if not exist in database - save to database, if exist in database, but higher version - otherwise no operation
-
config
@NotNull() abstract 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") abstract TaskerProp database(long id, boolean nonnull)
Load properties from database by taskId
-
property
@Contract(value = "_,true->!null") abstract TaskerProp property(long id, boolean nonnull)
Load properties from config file, get value by key
-
diffProp
@NotNull() abstract LinkedHashMap<String, Diff.V<out Object>> diffProp(long id)
-
enable
abstract boolean enable(long id, boolean enabled)
Enable or disable the task
-
replace
abstract boolean replace(long id, TaskerProp prop)
Save properties to database
-
-
-
-