mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Add sequence diagram for inventory
It is deliberately simplified to still be somewhat readable, especially regarding the names of participants.
This commit is contained in:
parent
b6f774664f
commit
45f1ae88b3
97
src/main/asciidoc/models/design/seq_inventory.puml
Normal file
97
src/main/asciidoc/models/design/seq_inventory.puml
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
@startuml
|
||||||
|
participant Administrator
|
||||||
|
participant InventoryController
|
||||||
|
participant Inventory
|
||||||
|
participant Catalog
|
||||||
|
participant "item1:UniqueInventoryItem" as item1
|
||||||
|
participant "prod1:Product" as prod1
|
||||||
|
participant Spring
|
||||||
|
|
||||||
|
== List Inventory ==
|
||||||
|
|
||||||
|
Administrator -> InventoryController : list()
|
||||||
|
activate Administrator
|
||||||
|
activate InventoryController
|
||||||
|
InventoryController -> Inventory : findAll()
|
||||||
|
activate Inventory
|
||||||
|
InventoryController <-- Inventory : Streamable<UniqueInventoryItem>
|
||||||
|
deactivate Inventory
|
||||||
|
InventoryController -> Spring : add result to model as “inventory”
|
||||||
|
activate Spring
|
||||||
|
InventoryController <-- Spring : Model
|
||||||
|
deactivate Spring
|
||||||
|
Administrator <-- InventoryController : Template “inventory”
|
||||||
|
deactivate Administrator
|
||||||
|
deactivate InventoryController
|
||||||
|
|
||||||
|
== Edit Inventory Item ==
|
||||||
|
|
||||||
|
Administrator -> InventoryController : edit()
|
||||||
|
activate Administrator
|
||||||
|
activate InventoryController
|
||||||
|
InventoryController -> Inventory : findByProduct()
|
||||||
|
activate Inventory
|
||||||
|
InventoryController <-- Inventory : UniqueInventoryItem
|
||||||
|
deactivate Inventory
|
||||||
|
InventoryController -> InventoryController : update Product with new data
|
||||||
|
InventoryController -> Catalog : save Product
|
||||||
|
activate Catalog
|
||||||
|
InventoryController <-- Catalog
|
||||||
|
deactivate Catalog
|
||||||
|
InventoryController -> Inventory : update Quantity of UniqueInventoryItem
|
||||||
|
activate Inventory
|
||||||
|
InventoryController <-- Inventory
|
||||||
|
deactivate Inventory
|
||||||
|
Administrator <-- InventoryController : Redirect to “/inventory”
|
||||||
|
deactivate Administrator
|
||||||
|
deactivate InventoryController
|
||||||
|
|
||||||
|
== Add Inventory Item ==
|
||||||
|
|
||||||
|
Administrator -> InventoryController : add()
|
||||||
|
activate Administrator
|
||||||
|
activate InventoryController
|
||||||
|
create prod1
|
||||||
|
InventoryController -> prod1 : new
|
||||||
|
activate prod1
|
||||||
|
InventoryController -> Catalog : save()
|
||||||
|
activate Catalog
|
||||||
|
InventoryController <-- Catalog : Product
|
||||||
|
deactivate Catalog
|
||||||
|
create item1
|
||||||
|
InventoryController -> item1 : new
|
||||||
|
activate item1
|
||||||
|
InventoryController -> Inventory : save()
|
||||||
|
activate Inventory
|
||||||
|
InventoryController <-- Inventory : UniqueInventoryItem
|
||||||
|
deactivate Inventory
|
||||||
|
Administrator <-- InventoryController : Redirect to “/inventory”
|
||||||
|
'deactivate prod1
|
||||||
|
'deactivate item1
|
||||||
|
deactivate Administrator
|
||||||
|
deactivate InventoryController
|
||||||
|
|
||||||
|
== Delete Inventory Item ==
|
||||||
|
Administrator -> InventoryController : delete()
|
||||||
|
activate Administrator
|
||||||
|
activate InventoryController
|
||||||
|
InventoryController -> Inventory : findByProduct()
|
||||||
|
activate Inventory
|
||||||
|
InventoryController <-- Inventory : UniqueInventoryItem
|
||||||
|
deactivate Inventory
|
||||||
|
InventoryController -> Inventory : delete()
|
||||||
|
activate Inventory
|
||||||
|
Inventory -> item1
|
||||||
|
destroy item1
|
||||||
|
InventoryController <-- Inventory
|
||||||
|
deactivate Inventory
|
||||||
|
InventoryController -> Catalog : delete()
|
||||||
|
activate Catalog
|
||||||
|
Catalog -> prod1
|
||||||
|
destroy prod1
|
||||||
|
InventoryController <-- Catalog
|
||||||
|
deactivate Catalog
|
||||||
|
Administrator <-- InventoryController : Redirect to “/inventory”
|
||||||
|
deactivate InventoryController
|
||||||
|
deactivate Administrator
|
||||||
|
@enduml
|
BIN
src/main/asciidoc/models/design/seq_inventory.svg
(Stored with Git LFS)
Normal file
BIN
src/main/asciidoc/models/design/seq_inventory.svg
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in a new issue