Class TinyTaskConfServiceImpl

  • All Implemented Interfaces:
    pro.fessional.wings.tiny.task.service.TinyTaskConfService

    @Service()@ConditionalWingsEnabled() 
    public class TinyTaskConfServiceImpl
     implements TinyTaskConfService
                        
    Since:

    2022-12-14

    Author:

    trydofor

    • Constructor Detail

      • TinyTaskConfServiceImpl

        TinyTaskConfServiceImpl()
    • 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
        - save to database if not exist in database
        - save to database, if exist in database, but higher 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

      • 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)
      • setWinTaskDefineDao

        @Autowired() void setWinTaskDefineDao(WinTaskDefineDao winTaskDefineDao)
      • setLightIdService

        @Autowired() void setLightIdService(LightIdService lightIdService)
      • setJournalService

        @Autowired() void setJournalService(JournalService journalService)