Class AbstractJobPerformable<T extends CronJobModel>

    • Constructor Detail

      • AbstractJobPerformable

        public AbstractJobPerformable()
    • Method Detail

      • perform

        public abstract PerformResult perform​(T cronJob)
        Description copied from interface: JobPerformable
        The execution body for a ServicelayerJob. Implement here your execution logic. It can be called synchronous or asynchronous. So be aware of thread-safety. Method will return a result object saying if the execution has reached end and if it was successful.
        Specified by:
        perform in interface JobPerformable<T extends CronJobModel>
        Parameters:
        cronJob - the related CronJob in whose context the execution will be performed.
        Returns:
        a PerformResult that indicates whether the execution was successfully executed or not and has finished or not.
      • isAbortable

        public boolean isAbortable()
        Description copied from interface: JobPerformable
        Checks whether the execution is implemented abortable.
        Specified by:
        isAbortable in interface JobPerformable<T extends CronJobModel>
        Returns:
        true if the execution can be aborted
      • isPerformable

        public boolean isPerformable()
        Description copied from interface: JobPerformable
        Checks whether the execution can be performed at the moment.
        Specified by:
        isPerformable in interface JobPerformable<T extends CronJobModel>
        Returns:
        true if the execution is ready
      • setModelService

        public void setModelService​(ModelService modelService)
      • setSessionService

        public void setSessionService​(SessionService sessionService)
      • setFlexibleSearchService

        public void setFlexibleSearchService​(FlexibleSearchService flexibleSearchService)
      • clearAbortRequestedIfNeeded

        protected final boolean clearAbortRequestedIfNeeded​(T myCronJob)
        Checks if given CronJobModel has a CronJobModel.REQUESTABORT flag set true -abort request was send for this cron job. If so then resets this flag to null and returns true. If no abort request abort was send returns false.