Add sequence diagram for catalog

This commit is contained in:
Theo Reichert 2023-11-11 04:21:07 +01:00 committed by Simon Bruder
parent 6060c8081e
commit e660a03d71
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 59 additions and 0 deletions

View file

@ -0,0 +1,56 @@
@startuml
' participant Administrator
participant User
participant Catalog
participant Inventory
participant Salespoint
participant Spring
== List Products for events of type ==
User -> Catalog : catalog(type)
activate User
activate Catalog
Catalog -> Catalog : type == 'EVENTCATERING' ? rentableCatalog.findByType(type)
Catalog -> Catalog : type != 'RENT_A_COOK' ? consumableCatalog.findByType(type)
Catalog -> Spring : type == 'EVENTCATERING' ? addAttribute(rentables_of_type)
activate Spring
Catalog <-- Spring
deactivate Spring
Catalog -> Spring : type != 'RENT_A_COOK' ? model.addAttribute(consumables_of_type)
activate Spring
Catalog <-- Spring
deactivate Spring
Catalog -> Spring : model.addAttribute(type)
activate Spring
Catalog <-- Spring
deactivate Spring
User <-- Catalog : catalog.html
deactivate Catalog
== Show product details ==
User -> Catalog : detail(id)
activate Catalog
Catalog -> Inventory : inventory.findByProductIdentifier(id)
activate Inventory
Catalog <-- Inventory : inventoryItem
deactivate Inventory
Catalog -> Salespoint : inventoryItem.getQuantity()
activate Salespoint
Catalog <-- Salespoint : quantity
deactivate Salespoint
Catalog -> Spring : model.addAttribute(inventoryItem)
activate Spring
Catalog <-- Spring
deactivate Spring
Catalog -> Spring : model.addAttribute(quantity)
activate Spring
Catalog <-- Spring
deactivate Spring
User <-- Catalog : detail.html
deactivate Catalog
' deactivate User
@enduml

BIN
src/main/asciidoc/models/design/seq_catalog.svg (Stored with Git LFS) Normal file

Binary file not shown.