' SPDX-License-Identifier: AGPL-3.0-or-later ' SPDX-FileCopyrightText: 2023 swt23w23 @startuml skinparam linetype ortho skinparam groupInheritance 2 package javax.money { class MonetaryAmount } package java.util { class Optional class Set } 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 } interface DataInitializer class Product { - name : String - price : MonetaryAmount + 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 { enum OrderType } package catering.catalog { interface CateringCatalog { + DEFAULT_SORT : Sort + findByCategories() + findRentablesByCategories() + findConsumablesByCategories() } CateringCatalog --|> Catalog class Consumable { - promotionPrice : MonetaryAmount - wholesalePrice : MonetaryAmount + Consumable(name : String, retailPrice : MonetaryAmount, wholesalePrice : MonetaryAmount, promotionPrice : Optional, Set categories) : Consumable + getPrice() : MonetaryAmount + getRetailPrice() : MonetaryAmount + setRetailPrice(price : MonetaryAmount) : void + getPromotionPrice(): Optional + setPromotionPrice(price : Optional) + getWholesalePrice() : MonetaryAmount + setWholesalePrice(price : MonetaryAmount) } Consumable --|> Product Consumable ..> MonetaryAmount Consumable ..> java.util.Optional Consumable ..> java.util.Set Consumable ..> catering.order.OrderType class Rentable { - wholesalePrice : MonetaryAmount + Rentable(name : String, pricePerHour : MonetaryAmount, wholesalePrice : MonetaryAmount, Set categories) : Rentable + getWholesalePrice() : MonetaryAmount + setWholesalePrice(price : MonetaryAmount) } Rentable --|> Product Rentable ..> java.util.Set Rentable ..> catering.order.OrderType class CatalogDataInitializer { - rentableCatalog : RentableCatalog - consumableCatalog : ConsumableCatalog + initialize() } CatalogDataInitializer ..|> 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