> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# JobsManagementServiceImpl

> Aufruf öffentlicher Servicemethoden über die REST API: jobsManagementServiceImpl

<ResponseField name="beanId" type="string">
  Die Spring-Bean-ID des aufzurufenden Services.

  jobsManagementServiceImpl
</ResponseField>

<ResponseField name="scope" type="string" default="PROTOTYPE">
  Bean-Scope. Für Serviceaufrufe wird PROTOTYPE verwendet.
</ResponseField>

<ResponseField name="functionName" type="string">
  Der öffentliche Methodenname des Services, der in der Signatur angegeben ist.
</ResponseField>

<ResponseField name="args" type="object[]">
  Das Argument-Array der Methode. Jedes Argument wird mit dem Index 0, 1 usw. übergeben; der Wert muss dem Java-Parametertyp entsprechen.
</ResponseField>

## Headers

```http theme={null}
POST /api/v1/bean/request
Content-Type: application/json
Lang-Context: de
Site-Context: my-site
Authorization: Bearer <token>
```

Senden Sie `Lang-Context` und `Site-Context` mit jeder Anfrage. Für geschützte Methoden senden Sie das JWT im Header `Authorization` im Format `Bearer <token>`.

**Zugriff:** ADMIN. **Bearer Token:** erforderlich.

* GUEST — nicht angemeldete Benutzer; nur Whitelist-Services sind verfügbar.
* USER — Authentifizierung erforderlich; Methoden mit USER-Prüfung sind verfügbar.
* ADMIN — vollständiger Zugriff auf öffentliche Methoden aller Services.
* Wenn eine Methode intern eine Rolle prüft, kann GUEST null erhalten.

## Methoden

<ResponseField name="getRepository" type="JobRepository">
  | Argument | Typ | Beschreibung                              |
  | -------- | --- | ----------------------------------------- |
  | —        | —   | Diese Methode akzeptiert keine Argumente. |

  ### getRepository

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getRepository",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="init" type="void">
  | Argument | Typ | Beschreibung                              |
  | -------- | --- | ----------------------------------------- |
  | —        | —   | Diese Methode akzeptiert keine Argumente. |

  ### init

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "init",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="searchJobs" type="SearchResponse">
  | Argument     | Typ                             | Beschreibung                |
  | ------------ | ------------------------------- | --------------------------- |
  | `requestMap` | `LinkedHashMap<String, Object>` | Übergeben über `args[0].0`. |

  ### searchJobs

  Beispiel für das JSON-Anfrageobjekt:

  ```json theme={null}
  {
      "type":  "SellerSKU",
      "searchTerm":  "",
      "query":  {
                    "isPublishedForSale":  true
                },
      "ignoreRegexWrap":  [
                              "id",
                              "name",
                              "embeddedSku",
                              "productsRef",
                              "isPublishedForSale"
                          ],
      "offset":  0,
      "limit":  10,
      "visiblePages":  10,
      "page":  1,
      "sortName":  "createdDate",
      "sortDirection":  "DESC"
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "searchJobs",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="createJob" type="Job">
  | Argument   | Typ                             | Beschreibung                |
  | ---------- | ------------------------------- | --------------------------- |
  | `jobAsMap` | `LinkedHashMap<String, Object>` | Übergeben über `args[0].0`. |

  ### createJob

  Beispiel für das JSON-Anfrageobjekt:

  ```json theme={null}
  {
      "id":  null,
      "status":  null,
      "type":  null,
      "description":  null,
      "current":  0,
      "total":  0,
      "progress":  0
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "createJob",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="saveJob" type="Job">
  | Argument   | Typ                             | Beschreibung                |
  | ---------- | ------------------------------- | --------------------------- |
  | `jobAsMap` | `LinkedHashMap<String, Object>` | Übergeben über `args[0].0`. |

  ### saveJob

  Beispiel für das JSON-Anfrageobjekt:

  ```json theme={null}
  {
      "id":  null,
      "status":  null,
      "type":  null,
      "description":  null,
      "current":  0,
      "total":  0,
      "progress":  0
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "saveJob",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="startJob" type="Job">
  | Argument | Typ      | Beschreibung                |
  | -------- | -------- | --------------------------- |
  | `type`   | `String` | Übergeben über `args[0].0`. |
  | `total`  | `int`    | Übergeben über `args[1].1`. |

  ### startJob

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "startJob",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="cancelJob" type="void">
  | Argument | Typ      | Beschreibung                |
  | -------- | -------- | --------------------------- |
  | `jobId`  | `String` | Übergeben über `args[0].0`. |

  ### cancelJob

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "cancelJob",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="toCanceled" type="Job">
  | Argument | Typ      | Beschreibung                |
  | -------- | -------- | --------------------------- |
  | `jobId`  | `String` | Übergeben über `args[0].0`. |

  ### toCanceled

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "toCanceled",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="toDone" type="Job">
  | Argument | Typ      | Beschreibung                |
  | -------- | -------- | --------------------------- |
  | `jobId`  | `String` | Übergeben über `args[0].0`. |

  ### toDone

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "toDone",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="updateProgress" type="Job">
  | Argument   | Typ      | Beschreibung                |
  | ---------- | -------- | --------------------------- |
  | `jobId`    | `String` | Übergeben über `args[0].0`. |
  | `progress` | `int`    | Übergeben über `args[1].1`. |

  ### updateProgress

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "updateProgress",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="incrementJob" type="Job">
  | Argument | Typ      | Beschreibung                |
  | -------- | -------- | --------------------------- |
  | `jobId`  | `String` | Übergeben über `args[0].0`. |
  | `step`   | `int`    | Übergeben über `args[1].1`. |

  ### incrementJob

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "incrementJob",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="decrementJob" type="Job">
  | Argument | Typ      | Beschreibung                |
  | -------- | -------- | --------------------------- |
  | `jobId`  | `String` | Übergeben über `args[0].0`. |
  | `step`   | `int`    | Übergeben über `args[1].1`. |

  ### decrementJob

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "decrementJob",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="toFailed" type="Job">
  | Argument | Typ      | Beschreibung                |
  | -------- | -------- | --------------------------- |
  | `jobId`  | `String` | Übergeben über `args[0].0`. |

  ### toFailed

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "toFailed",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="setUnfinishedJobsToFailed" type="void">
  | Argument | Typ | Beschreibung                              |
  | -------- | --- | ----------------------------------------- |
  | —        | —   | Diese Methode akzeptiert keine Argumente. |

  ### setUnfinishedJobsToFailed

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "setUnfinishedJobsToFailed",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="removeJobsByIds" type="void">
  | Argument  | Typ                 | Beschreibung                |
  | --------- | ------------------- | --------------------------- |
  | `jobsIds` | `ArrayList<String>` | Übergeben über `args[0].0`. |

  ### removeJobsByIds

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeJobsByIds",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeJobAndClean" type="void">
  | Argument | Typ      | Beschreibung                |
  | -------- | -------- | --------------------------- |
  | `jobId`  | `String` | Übergeben über `args[0].0`. |

  ### removeJobAndClean

  ```json theme={null}
  {
    "beanId": "jobsManagementServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeJobAndClean",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>
