Changeset View
Changeset View
Standalone View
Standalone View
docs/images/deposit-delete-chart.uml
| @startuml | @startuml | ||||
| participant CLIENT as "SWORD client\n(eg. HAL)" | participant CLIENT as "SWORD client\n(eg. HAL)" | ||||
| participant DEPOSIT as "swh-deposit" | participant DEPOSIT as "swh-deposit" | ||||
| participant DEPOSIT_STORAGE as "deposit storage" | participant DEPOSIT_STORAGE as "deposit storage" | ||||
| activate CLIENT | activate CLIENT | ||||
| activate DEPOSIT | activate DEPOSIT | ||||
| activate DEPOSIT_STORAGE | activate DEPOSIT_STORAGE | ||||
| CLIENT ->> DEPOSIT: POST /1/<collection-name>/\nHEADER In-Progress: true | CLIENT ->> DEPOSIT: POST /1/<collection-name>/\nHEADER In-Progress: true | ||||
| DEPOSIT ->> DEPOSIT_STORAGE: check authentication | DEPOSIT ->> DEPOSIT_STORAGE: check authentication | ||||
| DEPOSIT_STORAGE -->> DEPOSIT: return ok (if client exists and credentials ok) | DEPOSIT_STORAGE -->> DEPOSIT: return ok (if client exists and credentials ok) | ||||
| DEPOSIT -->> CLIENT: return 201, <deposit receipt> | DEPOSIT -->> CLIENT: return 201, <deposit receipt> | ||||
| loop while status is 'partial' | |||||
| CLIENT -> DEPOSIT: DELETE /1/<collection-name>/<deposit-id>/media/\nDELETE /1/<collection-name>/<deposit-id>/metadata/ | CLIENT -> DEPOSIT: DELETE /1/<collection-name>/<deposit-id>/media/\nDELETE /1/<collection-name>/<deposit-id>/metadata/ | ||||
| DEPOSIT ->> DEPOSIT_STORAGE: check authentication | DEPOSIT ->> DEPOSIT_STORAGE: check authentication | ||||
| DEPOSIT_STORAGE -->> DEPOSIT: return ok | DEPOSIT_STORAGE -->> DEPOSIT: return ok | ||||
| DEPOSIT ->> DEPOSIT_STORAGE: check inputs() | DEPOSIT ->> DEPOSIT_STORAGE: check inputs() | ||||
| alt status is 'partial' | alt status is 'partial' | ||||
| DEPOSIT_STORAGE -->> DEPOSIT: return ok | DEPOSIT_STORAGE -->> DEPOSIT: return ok | ||||
| DEPOSIT ->> DEPOSIT_STORAGE: delete-deposit-or-deposit-archives() | DEPOSIT ->> DEPOSIT_STORAGE: delete-deposit-or-deposit-archives() | ||||
| DEPOSIT_STORAGE -->> DEPOSIT: return ok | DEPOSIT_STORAGE -->> DEPOSIT: return ok | ||||
| DEPOSIT -->> CLIENT: return 204 | DEPOSIT -->> CLIENT: return 204 | ||||
| else status is not 'partial' | else status is not 'partial' | ||||
| DEPOSIT_STORAGE -->> DEPOSIT: return ko | DEPOSIT_STORAGE -->> DEPOSIT: return ko | ||||
| DEPOSIT -->> CLIENT: return 400 | DEPOSIT -->> CLIENT: return 400, "You can only act on deposit with status partial" | ||||
| end | |||||
| end | end | ||||
| @enduml | @enduml | ||||