Update catalog diagram

This commit is contained in:
Theo Reichert 2024-01-19 16:39:57 +01:00 committed by Theo Reichert
parent d77f1aaa9e
commit 9cf8308e8d
2 changed files with 32 additions and 32 deletions

View file

@ -16,9 +16,8 @@ package java.util {
package Salespoint {
'https://st.inf.tu-dresden.de/SalesPoint/api//org/salespointframework/catalog/Catalog.html'
interface Catalog<T extends Product> {
findByAnyCategory(categories : String) : Streamable<Product>
findByAllCategories(categories : String) : Streamable<Product>
+ findByAnyCategory(categories : String) : Streamable<Product>
+ findByAllCategories(categories : String) : Streamable<Product>
}
interface DataInitializer
class Product {
@ -27,17 +26,10 @@ package Salespoint {
+ Product(name : String, price : MonetaryAmount, [Metric : metric])
+ getID() : Product.Identifier
+ getCategories() : Streamable<String>
'+ 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<OrderType> 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<Product>
+ findRentables(categories : String) : Streamable<Product>
+ findConsumables(categories : String) : Streamable<Product>
+ findRentablesByCategoriesContains(categories : String) : Streamable<Rentable>
+ findConsumablesByCategoriesContains(categories : String) : Streamable<Consumable>
}
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 <<use>>rs or Rentables from the Inventory'
@enduml

Binary file not shown.