Class JobsApiServiceImpl

java.lang.Object
org.lockss.spring.base.BaseSpringApiServiceImpl
org.lockss.laaws.crawler.impl.JobsApiServiceImpl
All Implemented Interfaces:
JobsApiDelegate

@Service public class JobsApiServiceImpl extends BaseSpringApiServiceImpl implements JobsApiDelegate
  • Field Details

  • Constructor Details

    • JobsApiServiceImpl

      @Autowired public JobsApiServiceImpl(jakarta.servlet.http.HttpServletRequest request)
  • Method Details

    • getJobs

      public org.springframework.http.ResponseEntity<JobPager> getJobs(Integer limit, String continuationToken)
      Get all crawl jobs
      Specified by:
      getJobs in interface JobsApiDelegate
      See Also:
    • deleteJobs

      public org.springframework.http.ResponseEntity<Void> deleteJobs()
      Deletes all the currently queued and active crawl requests.
      Specified by:
      deleteJobs in interface JobsApiDelegate
      Returns:
      a ResponseEntity<Void>.
      See Also:
    • queueJob

      public org.springframework.http.ResponseEntity<org.lockss.util.rest.crawler.CrawlJob> queueJob(org.lockss.util.rest.crawler.CrawlDesc crawlDesc)
      Requests a crawl.
      Specified by:
      queueJob in interface JobsApiDelegate
      Parameters:
      crawlDesc - A CrawlDesc with the information about the requested crawl.
      Returns:
      a ResponseEntity<CrawlJob> with the information about the job created to perform the crawl.
      See Also:
    • getCrawlJob

      public org.springframework.http.ResponseEntity<org.lockss.util.rest.crawler.CrawlJob> getCrawlJob(String jobId)
      Provides the status of a requested crawl.
      Specified by:
      getCrawlJob in interface JobsApiDelegate
      Parameters:
      jobId - A String with the identifier assigned to the crawl when added.
      Returns:
      a ResponseEntity<CrawlJob> with the status of the crawl.
      See Also:
    • deleteCrawlJob

      public org.springframework.http.ResponseEntity<org.lockss.util.rest.crawler.CrawlJob> deleteCrawlJob(String jobId)
      Deletes a crawl previously added to the crawl queue, stopping the crawl if already running.
      Specified by:
      deleteCrawlJob in interface JobsApiDelegate
      Parameters:
      jobId - A String with the identifier assigned to the crawl when added.
      Returns:
      a ResponseEntity<CrawlJob> with the status of the deleted crawl.
      See Also: