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 { package Salespoint {
'https://st.inf.tu-dresden.de/SalesPoint/api//org/salespointframework/catalog/Catalog.html' 'https://st.inf.tu-dresden.de/SalesPoint/api//org/salespointframework/catalog/Catalog.html'
interface Catalog<T extends Product> { interface Catalog<T extends Product> {
findByAnyCategory(categories : String) : Streamable<Product> + findByAnyCategory(categories : String) : Streamable<Product>
findByAllCategories(categories : String) : Streamable<Product> + findByAllCategories(categories : String) : Streamable<Product>
} }
interface DataInitializer interface DataInitializer
class Product { class Product {
@ -27,17 +26,10 @@ package Salespoint {
+ Product(name : String, price : MonetaryAmount, [Metric : metric]) + Product(name : String, price : MonetaryAmount, [Metric : metric])
+ getID() : Product.Identifier + getID() : Product.Identifier
+ getCategories() : Streamable<String> + getCategories() : Streamable<String>
'+ addCategory(category : String) : boolean
'+ removeCategory(category : String) : boolean
+ getName() : String + getName() : String
+ getPrice() : MonetaryAmount + getPrice() : MonetaryAmount
+ setPrice(MonetaryAmount) : void + setPrice(MonetaryAmount) : void
'+ supports(quantity : Quantity) : boolean
} }
' class Quantity {
' + getAmount() : @NotNull BigDecimal
' }
} }
package catering.order { package catering.order {
@ -46,14 +38,6 @@ package catering.order {
package catering.catalog { package catering.catalog {
interface CateringCatalog {
+ DEFAULT_SORT : Sort
+ findByCategories()
+ findRentablesByCategories()
+ findConsumablesByCategories()
}
CateringCatalog --|> Catalog
class Consumable { class Consumable {
- promotionPrice : MonetaryAmount - promotionPrice : MonetaryAmount
- wholesalePrice : MonetaryAmount - wholesalePrice : MonetaryAmount
@ -66,30 +50,46 @@ package catering.catalog {
+ getWholesalePrice() : MonetaryAmount + getWholesalePrice() : MonetaryAmount
+ setWholesalePrice(price : MonetaryAmount) + setWholesalePrice(price : MonetaryAmount)
} }
Consumable --|> Product
Consumable ..> MonetaryAmount Consumable ---|> Product
Consumable ..> java.util.Optional Consumable .L.> MonetaryAmount
Consumable ..> java.util.Set Consumable .L.> java.util.Optional
Consumable ..> catering.order.OrderType Consumable .L.> java.util.Set
Consumable .U.> catering.order.OrderType
class Rentable { class Rentable {
- wholesalePrice : MonetaryAmount - wholesalePrice : MonetaryAmount
- pricePerHour : MonetaryAmount
+ Rentable(name : String, pricePerHour : MonetaryAmount, wholesalePrice : MonetaryAmount, Set<OrderType> categories, metric : Metric) : Rentable + Rentable(name : String, pricePerHour : MonetaryAmount, wholesalePrice : MonetaryAmount, Set<OrderType> categories, metric : Metric) : Rentable
+ getWholesalePrice() : MonetaryAmount + getWholesalePrice() : MonetaryAmount
+ setWholesalePrice(price : MonetaryAmount) + setWholesalePrice(price : MonetaryAmount)
+ getRetailPrice() : MonetaryAmount
+ setRetailPrice(price : MonetaryAmount)
} }
Rentable --|> Product
Rentable ..> java.util.Set Rentable -U-|> Product
Rentable ..> catering.order.OrderType 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 { class CatalogDataInitializer {
- rentableCatalog : RentableCatalog - rentableCatalog : RentableCatalog
- consumableCatalog : ConsumableCatalog - consumableCatalog : ConsumableCatalog
+ initialize() + 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 @enduml

Binary file not shown.