From 0adbd71d845c405b386f942745ffffe99bdb97bb Mon Sep 17 00:00:00 2001 From: Theo Reichert Date: Fri, 19 Jan 2024 16:39:57 +0100 Subject: [PATCH] Update catalog diagram --- src/main/asciidoc/models/design/catalog.puml | 60 ++++++++++---------- src/main/asciidoc/models/design/catalog.svg | 4 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/main/asciidoc/models/design/catalog.puml b/src/main/asciidoc/models/design/catalog.puml index a24affe..99019ca 100644 --- a/src/main/asciidoc/models/design/catalog.puml +++ b/src/main/asciidoc/models/design/catalog.puml @@ -16,9 +16,8 @@ package java.util { package Salespoint { 'https://st.inf.tu-dresden.de/SalesPoint/api//org/salespointframework/catalog/Catalog.html' interface Catalog { - findByAnyCategory(categories : String) : Streamable - findByAllCategories(categories : String) : Streamable - + + findByAnyCategory(categories : String) : Streamable + + findByAllCategories(categories : String) : Streamable } interface DataInitializer class Product { @@ -27,17 +26,10 @@ package Salespoint { + Product(name : String, price : MonetaryAmount, [Metric : metric]) + getID() : Product.Identifier + getCategories() : Streamable - '+ addCategory(category : String) : boolean - '+ removeCategory(category : String) : boolean + getName() : String + getPrice() : MonetaryAmount + setPrice(MonetaryAmount) : void - '+ supports(quantity : Quantity) : boolean - } - ' class Quantity { - ' + getAmount() : @NotNull BigDecimal - ' } } package catering.order { @@ -46,14 +38,6 @@ package catering.order { package catering.catalog { - interface CateringCatalog { - + DEFAULT_SORT : Sort - + findByCategories() - + findRentablesByCategories() - + findConsumablesByCategories() - } - CateringCatalog --|> Catalog - class Consumable { - promotionPrice : MonetaryAmount - wholesalePrice : MonetaryAmount @@ -66,30 +50,46 @@ package catering.catalog { + getWholesalePrice() : MonetaryAmount + setWholesalePrice(price : MonetaryAmount) } - Consumable --|> Product - Consumable ..> MonetaryAmount - Consumable ..> java.util.Optional - Consumable ..> java.util.Set - Consumable ..> catering.order.OrderType + + Consumable ---|> Product + Consumable .L.> MonetaryAmount + Consumable .L.> java.util.Optional + Consumable .L.> java.util.Set + Consumable .U.> catering.order.OrderType class Rentable { - wholesalePrice : MonetaryAmount + - pricePerHour : MonetaryAmount + Rentable(name : String, pricePerHour : MonetaryAmount, wholesalePrice : MonetaryAmount, Set categories, metric : Metric) : Rentable + getWholesalePrice() : MonetaryAmount + setWholesalePrice(price : MonetaryAmount) + + getRetailPrice() : MonetaryAmount + + setRetailPrice(price : MonetaryAmount) } - Rentable --|> Product - Rentable ..> java.util.Set - Rentable ..> catering.order.OrderType + + Rentable -U-|> Product + Rentable -[hidden]-|> Consumable + Rentable .L.> java.util.Set + Rentable .D.> catering.order.OrderType + + interface CateringCatalog { + + DEFAULT_SORT : Sort + + findByCategories() + + findByCategories(categories : String) : Streamable + + findRentables(categories : String) : Streamable + + findConsumables(categories : String) : Streamable + + findRentablesByCategoriesContains(categories : String) : Streamable + + findConsumablesByCategoriesContains(categories : String) : Streamable + } + + CateringCatalog -U-|> Catalog class CatalogDataInitializer { - rentableCatalog : RentableCatalog - consumableCatalog : ConsumableCatalog + initialize() } - CatalogDataInitializer ..|> DataInitializer + + CatalogDataInitializer .U.|> DataInitializer } - -'#TODO: to determine which Products of a Category to offer I need to retrieve information about availability of e.g. Cooks and ServicePersonel from the <>rs or Rentables from the Inventory' - @enduml diff --git a/src/main/asciidoc/models/design/catalog.svg b/src/main/asciidoc/models/design/catalog.svg index 71bcbda..5c9db14 100644 --- a/src/main/asciidoc/models/design/catalog.svg +++ b/src/main/asciidoc/models/design/catalog.svg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:189975e2ba132f15225928a9b15be7166ba6cb7e89973f838263b8adc4acbefe -size 39931 +oid sha256:ef1baa617dd7d1901a7a239f3d63a4ae3bec55e7a85bad7c7455d307e02e2180 +size 41511