Interface JobService

  • All Superinterfaces:
    AppService

    public interface JobService
    extends AppService
    Service for interacting with Jobs
    • Method Detail

      • jobForID

        JobReference jobForID​(java.lang.String uuid,
                              java.lang.String project)
                       throws JobNotFound
        Parameters:
        uuid - job ID
        project - the project
        Returns:
        a reference to the job by the ID
        Throws:
        JobNotFound - if the job was not found
      • jobForName

        JobReference jobForName​(java.lang.String name,
                                java.lang.String project)
                         throws JobNotFound
        Parameters:
        name - the job group path/name string
        project - the project
        Returns:
        a job reference for the group/name
        Throws:
        JobNotFound - if the job was not found
      • jobForName

        JobReference jobForName​(java.lang.String group,
                                java.lang.String name,
                                java.lang.String project)
                         throws JobNotFound
        Parameters:
        group - group path or null
        name - job name
        project - the project
        Returns:
        a job reference for the group and name
        Throws:
        JobNotFound - if the job was not found
      • searchExecutions

        java.util.List<ExecutionReference> searchExecutions​(java.lang.String state,
                                                            java.lang.String project,
                                                            java.lang.String jobUuid,
                                                            java.lang.String excludeJobUuid,
                                                            java.lang.String since)
        Parameters:
        state - to search
        project - the project
        jobUuid - to search or null
        excludeJobUuid - to search or null
        since - to search or null
        Returns:
        a list of references to executions using the input parameters
      • searchExecutions

        java.util.List<ExecutionReference> searchExecutions​(java.lang.String state,
                                                            java.lang.String project,
                                                            java.lang.String jobUuid,
                                                            java.lang.String excludeJobUuid,
                                                            java.lang.String since,
                                                            boolean reverseSince)
        Parameters:
        state - to search
        project - the project
        jobUuid - to search or null
        excludeJobUuid - to search or null
        since - to search or null
        reverseSince - if true search executions older than since parameter
        Returns:
        a list of references to executions using the input parameters
      • executionForId

        ExecutionReference executionForId​(java.lang.String id,
                                          java.lang.String project)
                                   throws ExecutionNotFound
        Parameters:
        id - execution id
        project - the project
        Returns:
        a execution reference for the id
        Throws:
        ExecutionNotFound - if the execution was not found
      • startJob

        @Deprecated
        java.lang.String startJob​(JobReference jobReference,
                                  java.lang.String jobArgString,
                                  java.lang.String jobFilter,
                                  java.lang.String asUser)
                           throws JobNotFound
        Parameters:
        jobReference - reference to a job
        jobArgString - argString for the execution
        jobFilter - filter for the execution
        asUser - user to execute the job(null for the same user)
        Returns:
        Id of the result execution, or null if there was an error
        Throws:
        JobNotFound - if the specified job was not found
      • runJob

        ExecutionReference runJob​(JobReference jobReference,
                                  java.lang.String jobArgString,
                                  java.lang.String jobFilter,
                                  java.lang.String asUser)
                           throws JobNotFound,
                                  JobExecutionError
        Run a job
        Parameters:
        jobReference - reference to a job
        jobArgString - argString for the execution
        jobFilter - filter for the execution
        asUser - user to execute the job(null for the same user)
        Returns:
        Id of the result execution
        Throws:
        JobNotFound - if the specified job was not found
        JobExecutionError - if an error occurred executing the job
      • runJob

        ExecutionReference runJob​(JobReference jobReference,
                                  java.lang.String jobArgString,
                                  java.lang.String nodeFilter,
                                  java.lang.String asUser,
                                  java.util.Map<java.lang.String,​?> meta)
                           throws JobNotFound,
                                  JobExecutionError
        Run a job
        Parameters:
        jobReference - reference to a job
        jobArgString - argString for the execution
        nodeFilter - filter for the execution
        asUser - user to execute the job(null for the same user)
        meta - metadata to attach to the execution
        Returns:
        Id of the result execution
        Throws:
        JobNotFound - if the specified job was not found
        JobExecutionError - if an error occurred executing the job
      • runJob

        ExecutionReference runJob​(JobReference jobReference,
                                  java.util.Map options,
                                  java.lang.String jobFilter,
                                  java.lang.String asUser)
                           throws JobNotFound,
                                  JobExecutionError
        Run a job
        Parameters:
        jobReference - reference to a job
        options - option values
        jobFilter - filter for the execution
        asUser - user to execute the job(null for the same user)
        Returns:
        Id of the result execution
        Throws:
        JobNotFound - if the specified job was not found
        JobExecutionError - if an error occurred executing the job
      • runJob

        ExecutionReference runJob​(JobReference jobReference,
                                  java.util.Map optionData,
                                  java.lang.String jobFilter,
                                  java.lang.String asUser,
                                  java.util.Map<java.lang.String,​?> meta)
                           throws JobNotFound,
                                  JobExecutionError
        Run a job
        Parameters:
        jobReference - reference to a job
        options - option values
        jobFilter - filter for the execution
        asUser - user to execute the job(null for the same user)
        meta - metadata to attach to the execution
        Returns:
        Id of the result execution
        Throws:
        JobNotFound - if the specified job was not found
        JobExecutionError - if an error occurred executing the job
      • deleteBulkExecutionIds

        java.util.Map deleteBulkExecutionIds​(java.util.Collection ids,
                                             java.lang.String asUser)
        Parameters:
        ids - collection of id to iterate
        asUser - user to execute delete (null for the same user)
        Returns:
        [success:true/false, failures:[ [success:false, message: String, id: id],... ], successTotal:Integer]
      • queryExecutions

        java.util.Map queryExecutions​(java.util.Map filter)
        Parameters:
        filter - for query executions
        Returns:
        map with results and total