public interface

JobService

com.atlassian.bitbucket.job.JobService

Class Overview

A service for managing jobs.

Summary

Public Methods
long countMessages(JobMessageSearchRequest request)
Counts all messages matching the supplied request object
@Nonnull Job create(JobCreationRequest request)
Creates a new Job from the supplied request object
@Nonnull JobMessage createMessage(JobMessageCreationRequest request)
Creates a new JobMessage from the supplied request object
@Nonnull Optional<Job> getById(long jobId)
Gets a Job by its ID
@Nonnull Page<Job> search(JobSearchRequest request, PageRequest pageRequest)
Finds all jobs matching the supplied request object
@Nonnull Page<JobMessage> searchMessages(JobMessageSearchRequest request, PageRequest pageRequest)
Finds all job messages matching the supplied request object
@Nonnull Job update(JobUpdateRequest request)
Updates a Job

Public Methods

public long countMessages (JobMessageSearchRequest request)

Counts all messages matching the supplied request object

Parameters
request the request
Returns
  • the number of matching messages

@Nonnull public Job create (JobCreationRequest request)

Creates a new Job from the supplied request object

Parameters
request the request
Returns

@Nonnull public JobMessage createMessage (JobMessageCreationRequest request)

Creates a new JobMessage from the supplied request object

Parameters
request the request
Returns

@Nonnull public 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

@Nonnull public Page<Job> search (JobSearchRequest request, PageRequest pageRequest)

Finds all jobs matching the supplied request object

Parameters
request the request
pageRequest the page request
Returns
  • the page of matching jobs

@Nonnull public Page<JobMessage> searchMessages (JobMessageSearchRequest request, PageRequest pageRequest)

Finds all job messages matching the supplied request object

Parameters
request the request
pageRequest the page request
Returns

@Nonnull public Job update (JobUpdateRequest request)

Updates a Job

Parameters
request the update request
Returns
  • the updated job