mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Update catalog diagram
This commit is contained in:
parent
d77f1aaa9e
commit
0adbd71d84
|
@ -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
|
||||
|
|
BIN
src/main/asciidoc/models/design/catalog.svg
(Stored with Git LFS)
BIN
src/main/asciidoc/models/design/catalog.svg
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in a new issue