Controller for Job model.
More...
|
| getAllUserResults ($userId, $status, $request, $response, $sort, $limit, $page, $apiVersion) |
|
| getAllResults ($id, $status, $request, $response, $sort, $limit, $page, $apiVersion) |
|
| getFilteredResults ($uploadId, $status, $request, $response, $sort, $limit, $page, $apiVersion) |
|
| updateEta (&$job) |
|
| getUploadEtaInSeconds ($jobId, $uploadId) |
|
| addJobQueue (&$job, $request=null) |
|
| compareJobsInfo ($JobsInfo1, $JobsInfo2) |
| Sort compare function to order $JobsInfo by job_pk. More...
|
|
Controller for Job model.
Definition at line 36 of file JobController.php.
◆ addJobQueue()
Fossology\UI\Api\Controllers\JobController::addJobQueue |
( |
& |
$job, |
|
|
|
$request = null |
|
) |
| |
|
private |
Add the job queue to the job object
- Parameters
-
[in,out] | Job | $job | The job to be updated |
| Request | $request | The request object |
Definition at line 451 of file JobController.php.
◆ compareJobsInfo()
Fossology\UI\Api\Controllers\JobController::compareJobsInfo |
( |
|
$JobsInfo1, |
|
|
|
$JobsInfo2 |
|
) |
| |
|
private |
Sort compare function to order $JobsInfo by job_pk.
- Parameters
-
array | $JobsInfo1 | Result from GetJobInfo |
array | $JobsInfo2 | Result from GetJobInfo |
- Returns
- int
Definition at line 484 of file JobController.php.
◆ createJob()
Fossology\UI\Api\Controllers\JobController::createJob |
( |
|
$request, |
|
|
|
$response, |
|
|
|
$args |
|
) |
| |
Create a new job
- Parameters
-
ServerRequestInterface | $request | |
ResponseHelper | $response | |
array | $args | |
- Returns
- ResponseHelper
- Exceptions
-
Definition at line 147 of file JobController.php.
◆ deleteJob()
Fossology\UI\Api\Controllers\JobController::deleteJob |
( |
|
$request, |
|
|
|
$response, |
|
|
|
$args |
|
) |
| |
Delete a job using it's Job ID and Queue ID. Job ID is job_pk in job table and Queue ID is jobqueue_pk in jobqueue table
- Parameters
-
ServerRequestInterface | $request | |
ResponseHelper | $response | |
array | $args | |
- Returns
- ResponseHelper
- Exceptions
-
Definition at line 184 of file JobController.php.
◆ getAllJobs()
Fossology\UI\Api\Controllers\JobController::getAllJobs |
( |
|
$request, |
|
|
|
$response, |
|
|
|
$args |
|
) |
| |
Get all jobs created by all the users
- Parameters
-
ServerRequestInterface | $request | |
ResponseHelper | $response | |
array | $args | |
- Returns
- ResponseHelper
- Exceptions
-
Definition at line 68 of file JobController.php.
◆ getAllResults()
Fossology\UI\Api\Controllers\JobController::getAllResults |
( |
|
$id, |
|
|
|
$status, |
|
|
|
$request, |
|
|
|
$response, |
|
|
|
$sort, |
|
|
|
$limit, |
|
|
|
$page, |
|
|
|
$apiVersion |
|
) |
| |
|
private |
Get all jobs for the current user.
- Parameters
-
integer | null | $id | Specific job id or null for all jobs |
string | null | $status | Status of the jobs to return |
Request | $request | Request object |
ResponseHelper | $response | Response object |
string | $sort | Sorting order for the results |
integer | $limit | Limit of jobs per page |
integer | $page | Page number required |
integer | $apiVersion | API version |
- Returns
- ResponseHelper
Definition at line 275 of file JobController.php.
◆ getAllUserResults()
Fossology\UI\Api\Controllers\JobController::getAllUserResults |
( |
|
$userId, |
|
|
|
$status, |
|
|
|
$request, |
|
|
|
$response, |
|
|
|
$sort, |
|
|
|
$limit, |
|
|
|
$page, |
|
|
|
$apiVersion |
|
) |
| |
|
private |
Get all jobs created by the current user.
- Parameters
-
integer | $userId | Specific user id |
string | null | $status | Status of the jobs to return |
Request | $request | Request object |
ResponseHelper | $response | Response object |
string | $sort | Sorting order for the results |
integer | $limit | Limit of jobs per page |
integer | $page | Page number required |
integer | $apiVersion | API version |
- Returns
- ResponseHelper
Definition at line 248 of file JobController.php.
◆ getFilteredResults()
Fossology\UI\Api\Controllers\JobController::getFilteredResults |
( |
|
$uploadId, |
|
|
|
$status, |
|
|
|
$request, |
|
|
|
$response, |
|
|
|
$sort, |
|
|
|
$limit, |
|
|
|
$page, |
|
|
|
$apiVersion |
|
) |
| |
|
private |
Get all jobs for the given upload.
- Parameters
-
integer | $uploadId | Upload id to be filtered |
string | null | $status | Status of the jobs to return |
Request | $request | Request object |
ResponseHelper | $response | Response object |
string | $sort | Sorting order for the results |
integer | $limit | Limit of jobs per page |
integer | $page | Page number required |
integer | $apiVersion | API version |
- Returns
- ResponseHelper
- Exceptions
-
Definition at line 306 of file JobController.php.
◆ getJobs()
Fossology\UI\Api\Controllers\JobController::getJobs |
( |
|
$request, |
|
|
|
$response, |
|
|
|
$args |
|
) |
| |
Get all jobs by a user
- Parameters
-
ServerRequestInterface | $request | |
ResponseHelper | $response | |
array | $args | |
- Returns
- ResponseHelper
- Exceptions
-
Definition at line 99 of file JobController.php.
◆ getUploadEtaInSeconds()
Fossology\UI\Api\Controllers\JobController::getUploadEtaInSeconds |
( |
|
$jobId, |
|
|
|
$uploadId |
|
) |
| |
|
private |
Get the ETA in seconds for the upload.
- Parameters
-
integer | $jobId | The job ID for which the ETA is required |
integer | $uploadId | Upload for which the ETA is required |
- Returns
- integer ETA in seconds (0 if job already finished)
Definition at line 342 of file JobController.php.
◆ updateEta()
Fossology\UI\Api\Controllers\JobController::updateEta |
( |
& |
$job | ) |
|
|
private |
Update the ETA and status for the given job
- Parameters
-
[in,out] | Job | $job | The job to be updated |
Definition at line 329 of file JobController.php.
◆ JOB_COMPLETED
const Fossology\UI\Api\Controllers\JobController::JOB_COMPLETED = 0x1 << 1 |
◆ JOB_FAILED
const Fossology\UI\Api\Controllers\JobController::JOB_FAILED = 0x1 << 4 |
◆ JOB_QUEUED
const Fossology\UI\Api\Controllers\JobController::JOB_QUEUED = 0x1 << 3 |
◆ JOB_STARTED
const Fossology\UI\Api\Controllers\JobController::JOB_STARTED = 0x1 << 2 |
◆ UPLOAD_PARAM
const Fossology\UI\Api\Controllers\JobController::UPLOAD_PARAM = "upload" |
The documentation for this class was generated from the following file: