diff --git a/docs/images/.gitignore b/docs/images/.gitignore index e33609d2..664db108 100644 --- a/docs/images/.gitignore +++ b/docs/images/.gitignore @@ -1 +1,2 @@ *.png +*.svg diff --git a/docs/images/deposit-update-chart.png b/docs/images/deposit-update-chart.png deleted file mode 100644 index d84eb52f..00000000 Binary files a/docs/images/deposit-update-chart.png and /dev/null differ diff --git a/docs/images/deposit-update-chart.uml b/docs/images/deposit-update-chart.uml index 26f44335..e4f49ae7 100644 --- a/docs/images/deposit-update-chart.uml +++ b/docs/images/deposit-update-chart.uml @@ -1,37 +1,39 @@ @startuml participant CLIENT as "SWORD client\n(eg. HAL)" participant DEPOSIT as "swh-deposit" participant DEPOSIT_STORAGE as "deposit storage" activate CLIENT activate DEPOSIT activate DEPOSIT_STORAGE CLIENT ->> DEPOSIT: POST /1//\nHEADER In-Progress: true DEPOSIT ->> DEPOSIT_STORAGE: check authentication DEPOSIT_STORAGE -->> DEPOSIT: return ok (if client exists and credentials ok) DEPOSIT -->> CLIENT: return 201, - loop while status is 'partial' - CLIENT -> DEPOSIT: POST/PUT /1///media/\nPOST/PUT /1///metadata/ + CLIENT -> DEPOSIT: POST/PUT /1///media/\nPOST/PUT /1///metadata/ - DEPOSIT ->> DEPOSIT_STORAGE: check authentication - DEPOSIT_STORAGE -->> DEPOSIT: return ok + DEPOSIT ->> DEPOSIT_STORAGE: check authentication + DEPOSIT_STORAGE -->> DEPOSIT: return ok - DEPOSIT ->> DEPOSIT_STORAGE: check inputs() - DEPOSIT_STORAGE -->> DEPOSIT: return ok + DEPOSIT ->> DEPOSIT_STORAGE: check inputs() + alt status is 'partial' + DEPOSIT_STORAGE -->> DEPOSIT: return ok alt HEADER: In-Progress = true DEPOSIT ->> DEPOSIT_STORAGE: add-or-replace-data-and-update-status('partial') else HEADER: In-Progress = false - DEPOSIT ->> DEPOSIT_STORAGE: add-or-replace-data-and-update-status('ready') + DEPOSIT ->> DEPOSIT_STORAGE: add-or-replace-data-and-update-status('deposited') end DEPOSIT_STORAGE -->> DEPOSIT: return ok - + DEPOSIT -->> CLIENT: return 204 + else status is not partial + DEPOSIT_STORAGE -->> DEPOSIT: return ko + DEPOSIT -->> CLIENT: return 400, "You can only act on deposit with status partial" end - DEPOSIT -->> CLIENT: return 201, \nreturn 204 @enduml