Interface JobService


public interface JobService
A service for managing jobs.
Since:
5.13
  • Method Details

    • countMessages

      long countMessages(@Nonnull JobMessageSearchRequest request)
      Counts all messages matching the supplied request object
      Parameters:
      request - the request
      Returns:
      the number of matching messages
    • create

      @Nonnull Job create(@Nonnull JobCreationRequest request)
      Creates a new Job from the supplied request object
      Parameters:
      request - the request
      Returns:
      the new Job
    • createMessage

      @Nonnull JobMessage createMessage(@Nonnull JobMessageCreationRequest request)
      Creates a new JobMessage from the supplied request object
      Parameters:
      request - the request
      Returns:
      the new JobMessage
    • search

      @Nonnull Page<Job> search(@Nonnull JobSearchRequest request, @Nonnull PageRequest pageRequest)
      Finds all jobs matching the supplied request object
      Parameters:
      request - the request
      pageRequest - the page request
      Returns:
      the page of matching jobs
    • searchMessages

      @Nonnull Page<JobMessage> searchMessages(@Nonnull JobMessageSearchRequest request, @Nonnull PageRequest pageRequest)
      Finds all job messages matching the supplied request object
      Parameters:
      request - the request
      pageRequest - the page request
      Returns:
      the page of matching job messages
    • getById

      @Nonnull Optional<Job> getById(long jobId)
      Gets a Job by its ID
      Parameters:
      jobId - the ID of the job
      Returns:
      the matching Job or null if no such Job exists
    • update

      @Nonnull Job update(@Nonnull JobUpdateRequest request)
      Updates a Job
      Parameters:
      request - the update request
      Returns:
      the updated job