mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Update Developerdocumentation
This commit is contained in:
parent
f808c2497d
commit
41edcf5bf7
|
@ -49,8 +49,11 @@ package catering.catalog {
|
||||||
interface CateringCatalog {
|
interface CateringCatalog {
|
||||||
+ DEFAULT_SORT : Sort
|
+ DEFAULT_SORT : Sort
|
||||||
+ findByCategories()
|
+ findByCategories()
|
||||||
+ findRentablesByCategories()
|
+ findByCategories(category : OrderType)
|
||||||
+ findConsumablesByCategories()
|
+ findRentables() : Streamable<Rentable>
|
||||||
|
+ findConsumables() : Streamable<Consumable>
|
||||||
|
+ findRentablesByCategoriesContains(category : String) : Streamable<Rentable>
|
||||||
|
+ findConsumablesByCategoriesContains(category : String) : Streamable<Consumable>
|
||||||
}
|
}
|
||||||
CateringCatalog --|> Catalog
|
CateringCatalog --|> Catalog
|
||||||
|
|
||||||
|
@ -60,7 +63,6 @@ package catering.catalog {
|
||||||
+ Consumable(name : String, retailPrice : MonetaryAmount, wholesalePrice : MonetaryAmount, promotionPrice : Optional<MonetaryAmount>, Set<OrderType> categories, metric : Metric) : Consumable
|
+ Consumable(name : String, retailPrice : MonetaryAmount, wholesalePrice : MonetaryAmount, promotionPrice : Optional<MonetaryAmount>, Set<OrderType> categories, metric : Metric) : Consumable
|
||||||
+ getPrice() : MonetaryAmount
|
+ getPrice() : MonetaryAmount
|
||||||
+ getRetailPrice() : MonetaryAmount
|
+ getRetailPrice() : MonetaryAmount
|
||||||
+ setRetailPrice(price : MonetaryAmount) : void
|
|
||||||
+ getPromotionPrice(): Optional<MonetaryAmount>
|
+ getPromotionPrice(): Optional<MonetaryAmount>
|
||||||
+ setPromotionPrice(price : Optional<MonetaryAmount>)
|
+ setPromotionPrice(price : Optional<MonetaryAmount>)
|
||||||
+ getWholesalePrice() : MonetaryAmount
|
+ getWholesalePrice() : MonetaryAmount
|
||||||
|
@ -74,17 +76,22 @@ package catering.catalog {
|
||||||
|
|
||||||
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
|
||||||
|
+ getPriceForTime(hours : int) : MonetaryAmount
|
||||||
|
+ hashCode() : int
|
||||||
|
+ equals(obj Object) : boolean
|
||||||
}
|
}
|
||||||
Rentable --|> Product
|
Rentable --|> Product
|
||||||
Rentable ..> java.util.Set
|
Rentable ..> java.util.Set
|
||||||
Rentable ..> catering.order.OrderType
|
Rentable ..> catering.order.OrderType
|
||||||
|
|
||||||
class CatalogDataInitializer {
|
class CatalogDataInitializer {
|
||||||
- rentableCatalog : RentableCatalog
|
- cateringCatalog : CateringCatalog
|
||||||
- consumableCatalog : ConsumableCatalog
|
+ CatalogDataInitializer(cateringCatalog : CateringCatalog)
|
||||||
+ initialize()
|
+ initialize()
|
||||||
}
|
}
|
||||||
CatalogDataInitializer ..|> DataInitializer
|
CatalogDataInitializer ..|> DataInitializer
|
||||||
|
|
|
@ -25,7 +25,9 @@ package catering {
|
||||||
|
|
||||||
package inventory {
|
package inventory {
|
||||||
class InventoryController {
|
class InventoryController {
|
||||||
+ InventoryController(inventory : UniqueInventory)
|
- inventory : UniqueInventory<UniqueInventoryItem>
|
||||||
|
- cateringCatalog : CateringCatalog
|
||||||
|
+ InventoryController(inventory : UniqueInventory, cateringCatalog : CateringCatalog)
|
||||||
+ list(model : Model) : String
|
+ list(model : Model) : String
|
||||||
+ edit(model : Model, pid : Product) : String
|
+ edit(model : Model, pid : Product) : String
|
||||||
+ edit(model : Model, pid : Product, form : InventoryMutateForm) : String
|
+ edit(model : Model, pid : Product, form : InventoryMutateForm) : String
|
||||||
|
@ -51,6 +53,8 @@ package catering {
|
||||||
InventoryController .u.> Spring.Model
|
InventoryController .u.> Spring.Model
|
||||||
|
|
||||||
class InventoryInitializer {
|
class InventoryInitializer {
|
||||||
|
- inventory : UniqueInventory<UniqueInventoryItem>
|
||||||
|
- cateringCatalog : CateringCatalog
|
||||||
+ InventoryInitializer(inventory : UniqueInventory, catalog : CateringCatalog)
|
+ InventoryInitializer(inventory : UniqueInventory, catalog : CateringCatalog)
|
||||||
+ initialize() : void
|
+ initialize() : void
|
||||||
}
|
}
|
||||||
|
@ -61,9 +65,53 @@ package catering {
|
||||||
InventoryInitializer .u.> Salespoint.UniqueInventoryItem
|
InventoryInitializer .u.> Salespoint.UniqueInventoryItem
|
||||||
InventoryInitializer .u.> Spring.Assert
|
InventoryInitializer .u.> Spring.Assert
|
||||||
|
|
||||||
class InventoryMutateForm
|
class InventoryMutateForm {
|
||||||
class ConsumableMutateForm
|
- name : String
|
||||||
class RentableMutateForm
|
- quantity : long
|
||||||
|
- retailPrice : double
|
||||||
|
- orderTypes : Set<OrderType>
|
||||||
|
- metric : Metric
|
||||||
|
+ InventoryMutateForm()
|
||||||
|
+ getName() : String
|
||||||
|
+ getquantity() : long
|
||||||
|
+ getRetailPrice() : double
|
||||||
|
+ getMetric() : Metric
|
||||||
|
+ setName(name : String) : void
|
||||||
|
+ getOrderTypes() : Set<OrderType>
|
||||||
|
+ setQuantity(quantity : long) : void
|
||||||
|
+ setRetailPrice(retailPrice Double) : void
|
||||||
|
+ setOrderTypes(orderTypes : Set<OrderType>) : void
|
||||||
|
+ setMetric(metric : Metric) : void
|
||||||
|
+ InventoryMutateForm forProductType(type : Class<T>) : static
|
||||||
|
+ InventoryMutateForm of(item UniqueInventoryItem ) : static
|
||||||
|
+ toProduct() : Product
|
||||||
|
+ modifyProduct(product : Product) : void
|
||||||
|
+ modifyProductPrimitive(product : Product) : void
|
||||||
|
+ orderTypesFromCategories(categories : Streamable<String>) : Set<OrderType>
|
||||||
|
+ supportedMetrics() : Collection<Metric>
|
||||||
|
}
|
||||||
|
|
||||||
|
class ConsumableMutateForm {
|
||||||
|
- wholesalePrice : double
|
||||||
|
- promotionPrice : double
|
||||||
|
+ getWholeSalePrice() : double
|
||||||
|
+ getPromotionPrice() : Optional<Double>
|
||||||
|
+ setWholesalePrice(wholesalePrice : double) : void
|
||||||
|
+ setPromotionPrice(promotionPrice: Optional<Double>) : void
|
||||||
|
+ toProduct() : Product
|
||||||
|
+ ConsumableMutateForm(item : UniqueInventoryItem) : static
|
||||||
|
+ modifyProductPrimitive(product : Product) : void
|
||||||
|
}
|
||||||
|
|
||||||
|
class RentableMutateForm{
|
||||||
|
- wholesalePrice : double
|
||||||
|
+ getWholesalePrice() : double
|
||||||
|
+ setWholesalePrice(wholesalePrice : double) : void
|
||||||
|
+ RentableMutateForm of(item : UniqueInventoryItem) : static
|
||||||
|
+ toProduct() : Product
|
||||||
|
+ modifyProductPrimitive(product : Product) : void
|
||||||
|
}
|
||||||
|
|
||||||
ConsumableMutateForm <|-- InventoryMutateForm
|
ConsumableMutateForm <|-- InventoryMutateForm
|
||||||
RentableMutateForm <|-- InventoryMutateForm
|
RentableMutateForm <|-- InventoryMutateForm
|
||||||
|
|
||||||
|
|
|
@ -30,21 +30,26 @@ package catalog {
|
||||||
|
|
||||||
package order {
|
package order {
|
||||||
class OrderController {
|
class OrderController {
|
||||||
+OrderController(oM: OrderManagement<CustomOrder>, cOR: CustomOrderRepository, inv: UniqueInventory<UniqueInventoryItem>, cat: CateringCatalog, stM: StaffManagement)
|
-orderManagement : OrderManagement<CustomOrder>
|
||||||
|
-customOrderRepository : CustomOrderRepository
|
||||||
|
-inventory : UniqueInventory<UniqueInventoryItem>
|
||||||
|
-catalog : CateringCatalog
|
||||||
|
-staffManagement : StaffManagement
|
||||||
|
+OrderController(orderManagement: OrderManagement<CustomOrder>, customOrderRepository: CustomOrderRepository, inventory: UniqueInventory<UniqueInventoryItem>, catalog: CateringCatalog, staffManagement: StaffManagement)
|
||||||
+orders(model: Model, userAccount: Optional<UserAccount>): String
|
+orders(model: Model, userAccount: Optional<UserAccount>): String
|
||||||
+orders(model: Model): String
|
+ordersForAdmin(model: Model, form: OrderQueryForm): String
|
||||||
+orders(model: Model, String day): String
|
+ordersForAdmin(model: Model, String day): String
|
||||||
~initializeCart(): CustomCart
|
+initializeCart(): CustomCart
|
||||||
+event(model: Model, cart: CustomCart): String
|
+event(model: Model, cart: CustomCart): String
|
||||||
+addEmployeeToCart(empId: long, cart: CustomCart): String
|
+addEmployeeToCart(employeeId: long, cart: CustomCart): String
|
||||||
+removeEmployeeFromCart(empId: long, cart: CustomCart): String
|
+removeEmployeeFromCart(employeeId: long, cart: CustomCart): String
|
||||||
+removeOrder(orderId: Order.OrderIdentifier, userAccount: Optional<UserAccount>): String
|
+removeOrder(orderId: Order.OrderIdentifier, userAccount: Optional<UserAccount>): String
|
||||||
+addProduct(product: Product, number: int, cart: CustomCart): String
|
+addProduct(product: Product, number: int, cart: CustomCart): String
|
||||||
+removeProduct(itemId: String, cart: CustomCart): String
|
+removeProduct(itemId: String, cart: CustomCart): String
|
||||||
+changeDate(start: LocalDate, startHour: Optional<Integer>, finish: LocalDate, finishHour: Optional<Integer>, cart: CustomCart): String
|
+changeDate(start: LocalDate, startHour: Optional<Integer>, finish: LocalDate, finishHour: Optional<Integer>, cart: CustomCart): String
|
||||||
+checkout(cart: CustomCart, userAccount: Optional<UserAccount>): String
|
+checkout(cart: CustomCart, userAccount: Optional<UserAccount>): String
|
||||||
+changeOrderType(orderType: String, cart: CustomCart): String
|
+changeOrderType(orderType: String, cart: CustomCart): String
|
||||||
+{static}findFreeAmountInInterval(product: Rentable, start: LocalDatetime, finish: LocalDatetime, inv: UniqueInventory<UniqueInventoryItem>, cOR: CustomOrderRepository): Quantity
|
+{static}findFreeAmountInInterval(product: Rentable, start: LocalDatetime, finish: LocalDatetime, inventory: UniqueInventory<UniqueInventoryItem>, customOrderRepository: CustomOrderRepository): Quantity
|
||||||
+calender(model: Model): String
|
+calender(model: Model): String
|
||||||
+invoice(model: Model, userAccount: UserAccount, order: Order): String
|
+invoice(model: Model, userAccount: UserAccount, order: Order): String
|
||||||
}
|
}
|
||||||
|
@ -54,31 +59,70 @@ package order {
|
||||||
}
|
}
|
||||||
|
|
||||||
class CustomCart {
|
class CustomCart {
|
||||||
|
-staff : Set<Employee>
|
||||||
|
-orderType : OrderType
|
||||||
|
-start : LocalDateTime
|
||||||
|
-finish : LocalDateTime
|
||||||
-formatterPattern: String
|
-formatterPattern: String
|
||||||
+CustomCart(orderType: OrderType, start: LocalDateTime, finish: LocalDateTime)
|
+CustomCart(orderType: OrderType, start: LocalDateTime, finish: LocalDateTime)
|
||||||
+addEmployee(employee: Employee): boolean
|
+addEmployee(employee: Employee): boolean
|
||||||
|
+getStaff() : Set<Employee>
|
||||||
+removeEmployee(employee: Employee): boolean
|
+removeEmployee(employee: Employee): boolean
|
||||||
+addStaffTo(order: CustomOrder): CustomOrder
|
+addStaffTo(order: CustomOrder): CustomOrder
|
||||||
+addRentablesTo(order: CustomOrder, inv: UniqueInventory<UniqueInventoryItem>): CustomOrder
|
+addRentablesToOrder(order: CustomOrder, inventory: UniqueInventory<UniqueInventoryItem>): CustomOrder
|
||||||
|
+getOrderType() : OrderType
|
||||||
|
+setOrderType(orderType : OrderType) : void
|
||||||
|
+getStart() : LocalDateTime
|
||||||
|
+setStart(start: LocalDateTime ) : void
|
||||||
+getDurationInHours(): int
|
+getDurationInHours(): int
|
||||||
|
+getFinish() : LocalDateTime
|
||||||
|
+setFinish(finish : LocalDateTime) : void
|
||||||
|
+getFormatterPattern() : String
|
||||||
+getPrice(): MonetaryAmount
|
+getPrice(): MonetaryAmount
|
||||||
+clear()
|
+clear() : void
|
||||||
}
|
}
|
||||||
|
|
||||||
class CustomOrder {
|
class CustomOrder {
|
||||||
-id: Long
|
-id: Long
|
||||||
|
-staff: Set<Employee>
|
||||||
|
-orderType: OrderType
|
||||||
|
-start: LocalDateTime
|
||||||
|
-finish: LocalDateTime
|
||||||
|
-invoiceAvailable: boolean
|
||||||
-formatterPattern: String
|
-formatterPattern: String
|
||||||
+CustomOrder()
|
|
||||||
+CustomOrder(identifier: UserAccount.UserAccountIdentifier, cart: CustomCart)
|
+CustomOrder(identifier: UserAccount.UserAccountIdentifier, cart: CustomCart)
|
||||||
+getDurationInSeconds(): long
|
+CustomOrder()
|
||||||
|
-getDurationInSeconds(start: LocalDateTime, finish: LocalDateTime): long
|
||||||
-getDurationInHours(start: LocalDateTime, finish: LocalDateTime): long
|
-getDurationInHours(start: LocalDateTime, finish: LocalDateTime): long
|
||||||
|
+getDurationInHours() : long
|
||||||
-{static}min(a: LocalDateTime, b: LocalDateTime): LocalDateTime
|
-{static}min(a: LocalDateTime, b: LocalDateTime): LocalDateTime
|
||||||
-{static}max(a: LocalDateTime, b: LocalDateTime): LocalDateTime
|
-{static}max(a: LocalDateTime, b: LocalDateTime): LocalDateTime
|
||||||
+getDurationInSecondsDuringMonth(month: YearMonth): long
|
+getDurationInSecondsDuringMonth(month: YearMonth): long
|
||||||
+addEmployee(employee: Employee): boolean
|
+addEmployee(employee: Employee): boolean
|
||||||
|
+getStaff() : Set<Employee>
|
||||||
|
+getOrderType() : OrderType
|
||||||
|
+getStart() : LocalDateTime
|
||||||
|
+getFormattedStart() : String
|
||||||
|
+getFinish() : LocalDateTime
|
||||||
|
+getFormattedFinish() : String
|
||||||
|
+isInvoiceAvailable() : boolean
|
||||||
|
+setInvoiceAvailable() : void
|
||||||
|
+hashCode() : int
|
||||||
|
+equals(obj: Object) : boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
class OrderQueryForm{
|
||||||
|
- orderStatus : Optional<OrderStatus>
|
||||||
|
+ getOrderStatus() : Optional<OrderStatus>
|
||||||
|
+ setOrderStatus(orderStatus : Optional<OrderStatus>) : void
|
||||||
|
+ OrderQueryForm of(order: CustomOrder)) : static
|
||||||
}
|
}
|
||||||
|
|
||||||
enum OrderType {
|
enum OrderType {
|
||||||
|
RENT_A_COOK
|
||||||
|
EVENT_CATERING
|
||||||
|
MOBILE_BREAKFAST
|
||||||
|
PARTY_SERVICE
|
||||||
+toHumanReadable(): String
|
+toHumanReadable(): String
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,47 +20,67 @@ package catering.order {
|
||||||
}
|
}
|
||||||
|
|
||||||
package catering.orderCatalog {
|
package catering.orderCatalog {
|
||||||
class OrderCatalogController {
|
class CatalogController {
|
||||||
+ OrderCatalogController()
|
- catalogEntryRepository : CustomCatalogEntryRepository
|
||||||
|
- productMap : Map<Product, Quantity>
|
||||||
|
- formCatalogEntry : CustomCatalogEntry
|
||||||
|
- inventory : UniqueInventory<UniqueInventoryItem>
|
||||||
|
+ CatalogController(catalogEntryRepository : CustomCatalogEntryRepository, inventory : UniqueInventory<UniqueInventoryItem>)
|
||||||
+ catalog(model : Model) : String
|
+ catalog(model : Model) : String
|
||||||
+ configureCatalog(model : Model) : String
|
+ editCatalog(model : Model) : String
|
||||||
+ catalogAdd(eventType : OrderCatalogEntry.EventType, minimumTimePeriod : int, totalCost : int, model : Model) : String
|
+ addCatalogEntry(eventType : OrderCatalogEntry.EventType, minimumTimePeriod : int, totalCost : int, model : Model) : String
|
||||||
+ removeEntry(catalogEntryID : int) : String
|
+ removeEntry(catalogEntryID : int) : String
|
||||||
+ addProduct(name : String, amount : int, cost : double) : String
|
+ addProduct(product : Product, number : int) : String
|
||||||
+ removeProduct(id : String, model : Model) : String
|
+ removeProduct(id : String, model : Model) : String
|
||||||
+ addTime(minimumTimePeriod : int, eventType : OrderCatalogEntry.EventType, products : Collection<Salespoint.Product>, model : Model) : String
|
+ addTime(minimumTimePeriod : int, eventType : eventType, products : Map<String, Integer>, model : Model) : String
|
||||||
+ chooseEvent(events : String) : String
|
+ chooseEvent(events : String) : String
|
||||||
}
|
}
|
||||||
|
|
||||||
class OrderCatalogEntry {
|
class CustomCatalogEntry {
|
||||||
+ OrderCatalogEntry()
|
- id : long
|
||||||
|
- eventType : OrderType
|
||||||
|
- products : Map<String, Quantity>
|
||||||
|
- minimumTimePeriod : int
|
||||||
|
- totalCost : int
|
||||||
|
+ CustomCatalogEntry(eventType : OrderType, products : Map<String, Quantity>, minimumTimePeriod : int, totalCost : int)
|
||||||
|
+ CustomCatalogEntry()
|
||||||
+ getId() : int
|
+ getId() : int
|
||||||
+ getEventType() : EventType
|
+ getEventType() : OrderType
|
||||||
+ getProducts() : Collection<Salespoint.Product>
|
+ getProducts() : Map<String, Quantity>
|
||||||
+ getMinimumTimePeriod() : int
|
+ getMinimumTimePeriod() : int
|
||||||
+ getTotalCost() : int
|
+ getTotalCost() : int
|
||||||
+ setEventType(eventType : EventType) : void
|
+ setEventType(eventType : OrderType) : void
|
||||||
|
+ addProduct(name : String, count : Quantity) : void
|
||||||
|
+ setProducts(products Map<String, Quantity>) : void
|
||||||
+ setMinimumTimePeriod(timePeriod : int) : void
|
+ setMinimumTimePeriod(timePeriod : int) : void
|
||||||
+ setTotalCost(totalCost : int) : void
|
+ setTotalCost(totalCost : int) : void
|
||||||
+ addProduct(name : String, count : Integer) : void
|
+ hashCode() : int
|
||||||
|
+ equals(obj : Object) : boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
class OrderCatalogEntryRepository {
|
interface CustomCatalogEntryRepository {
|
||||||
+ OrderCatalogEntryRepository()
|
+ findAll() : Streamable<CustomCatalogEntry>
|
||||||
+ addCatalogEntry(catalogEntry : OrderCatalogEntry) : boolean
|
}
|
||||||
+ removeCatalogEntry(catalogEntryID : int) : boolean
|
|
||||||
+ getCatalogEntries() : Set<OrderCatalogEntries>
|
class CustomCatalogEntryDataInitializer {
|
||||||
|
- catalogEntryRepository : CustomCatalogEntryRepository
|
||||||
|
+ CustomCatalogEntryDataInitializer(catalogEntryRepository : CustomCatalogEntryRepository)
|
||||||
|
+ initialize() : void
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OrderCatalogEntryRepository o---> OrderCatalogEntry
|
CustomCatalogEntryRepository --|> Spring.CrudRepository
|
||||||
OrderCatalogController ...> OrderCatalogEntryRepository
|
CatalogController ...> Salespoint.Product
|
||||||
OrderCatalogEntryRepository --|> Spring.CrudRepository
|
CatalogController ..> Spring.Model
|
||||||
OrderCatalogController ...> Salespoint.Product
|
CatalogController ...> Salespoint.Cash
|
||||||
OrderCatalogController ..> Spring.Model
|
CatalogController ...> Salespoint.Quantity
|
||||||
OrderCatalogController ...> Salespoint.Cash
|
CatalogController ...> Salespoint.UserAccount
|
||||||
OrderCatalogController ...> Salespoint.Quantity
|
CustomCatalogEntry ...> catering.order.EventType
|
||||||
OrderCatalogController ...> Salespoint.UserAccount
|
CustomCatalogEntryDataInitializer --> "1" catering.catalog.CateringCatalog : "-cateringCatalog"
|
||||||
OrderCatalogEntry ...> catering.order.EventType
|
CustomCatalogEntryDataInitializer .u.|> Salespoint.DataInitializer
|
||||||
|
CustomCatalogEntryDataInitializer .u.> Salespoint.Quantity
|
||||||
|
CustomCatalogEntryDataInitializer -u-> "1" Salespoint.UniqueInventory : "-inventory"
|
||||||
|
CustomCatalogEntryDataInitializer .u.> Salespoint.UniqueInventoryItem
|
||||||
|
CustomCatalogEntryDataInitializer .u.> Spring.Assert
|
||||||
|
|
||||||
@enduml
|
@enduml
|
||||||
|
|
|
@ -27,8 +27,10 @@ package catering.staff {
|
||||||
|
|
||||||
class Employee {
|
class Employee {
|
||||||
- name: String
|
- name: String
|
||||||
|
- job : JobType
|
||||||
- id: Long
|
- id: Long
|
||||||
+ Employee()
|
- wage : MonetaryAmount
|
||||||
|
# Employee()
|
||||||
+ Employee(name: String, job: JobType, wage: MonetaryAmount)
|
+ Employee(name: String, job: JobType, wage: MonetaryAmount)
|
||||||
+ getId(): Long
|
+ getId(): Long
|
||||||
+ getName(): String
|
+ getName(): String
|
||||||
|
@ -37,6 +39,8 @@ package catering.staff {
|
||||||
+ setName(name: String): void
|
+ setName(name: String): void
|
||||||
+ setJob(job: JobType): void
|
+ setJob(job: JobType): void
|
||||||
+ setWage(wage: Double): void
|
+ setWage(wage: Double): void
|
||||||
|
+ hashCode() : int
|
||||||
|
+ equals(obj : Objects) : boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
Employee --> JobType : -job
|
Employee --> JobType : -job
|
||||||
|
@ -48,11 +52,12 @@ package catering.staff {
|
||||||
}
|
}
|
||||||
|
|
||||||
class StaffController {
|
class StaffController {
|
||||||
+ StaffController(staffRepository: StaffRepository)
|
- staffManagement : StaffManagement
|
||||||
|
+ StaffController(staffManagement : StaffManagement)
|
||||||
+ getStaff(model: Model, month:Optional<YearMonth>): String
|
+ getStaff(model: Model, month:Optional<YearMonth>): String
|
||||||
+ getStaff(model: Model, form: StaffForm, month:Optional<YearMonth>): String
|
+ getStaff(model: Model, form: StaffForm, month:Optional<YearMonth>): String
|
||||||
+ removeEmployee(employee: Employee, model: Model): String
|
|
||||||
+ addEmployee(form:StaffForm, result:Errors, model: Model): String
|
+ addEmployee(form:StaffForm, result:Errors, model: Model): String
|
||||||
|
+ removeEmployee(employee: Employee, model: Model): String
|
||||||
+ editEmployee(employee: Employee, model Model): String
|
+ editEmployee(employee: Employee, model Model): String
|
||||||
+ editEmployee(model Model, form:StaffForm): String
|
+ editEmployee(model Model, form:StaffForm): String
|
||||||
+ updateEmployee(employee: Employee, form:StaffForm): String
|
+ updateEmployee(employee: Employee, form:StaffForm): String
|
||||||
|
@ -66,7 +71,9 @@ package catering.staff {
|
||||||
StaffController ..> EURO
|
StaffController ..> EURO
|
||||||
|
|
||||||
class StaffManagement {
|
class StaffManagement {
|
||||||
+ StaffManagement(staffRepository: StaffRepository, orderManagement:OrderManagement<CustomOrder>)
|
- staffManagement : StaffRepository
|
||||||
|
- orderManagement : OrderManagement<CustomOrder>
|
||||||
|
+ StaffManagement(staffRepository: StaffRepository, orderManagement:OrderManagement<CustomOrder>)
|
||||||
+ findById(id: Long): Optional<Employee>
|
+ findById(id: Long): Optional<Employee>
|
||||||
+ save(employee: Employee): Employee
|
+ save(employee: Employee): Employee
|
||||||
+ findAll(): Streamable<Employee>
|
+ findAll(): Streamable<Employee>
|
||||||
|
@ -87,7 +94,9 @@ package catering.staff {
|
||||||
|
|
||||||
class StaffForm {
|
class StaffForm {
|
||||||
- name: String
|
- name: String
|
||||||
+ StaffForm(): void
|
- job : JobType
|
||||||
|
- wage : double
|
||||||
|
+ StaffForm()
|
||||||
+ getName(): String
|
+ getName(): String
|
||||||
+ getJob(): JobType
|
+ getJob(): JobType
|
||||||
+ getWage(): Double
|
+ getWage(): Double
|
||||||
|
|
|
@ -26,31 +26,34 @@ package catering.users {
|
||||||
class User {
|
class User {
|
||||||
- address : String
|
- address : String
|
||||||
- fullName : String
|
- fullName : String
|
||||||
|
- userAccount : UserAccount
|
||||||
|
- User()
|
||||||
+ User(userAccount : UserAccount, address : String, fullName : String)
|
+ User(userAccount : UserAccount, address : String, fullName : String)
|
||||||
+ User()
|
|
||||||
+ getAddress() : String
|
+ getAddress() : String
|
||||||
+ setAddress(address:String) : String
|
+ setAddress(address:String) : String
|
||||||
+ getFullName() : String
|
|
||||||
+ setFullName(fullName:String) : String
|
|
||||||
+ getUsername() : String
|
+ getUsername() : String
|
||||||
+ setUsername(username:String) : boolean
|
+ setUsername(username:String) : boolean
|
||||||
|
+ getFullName() : String
|
||||||
|
+ setFullName(fullName:String) : String
|
||||||
+ getUserAccount() : UserAccount
|
+ getUserAccount() : UserAccount
|
||||||
+ getId() : UserIdentifier
|
+ getId() : UserIdentifier
|
||||||
+ isEnabled() : boolean
|
+ isEnabled() : boolean
|
||||||
+ hasRole(role:String) : boolean
|
+ hasRole(role:String) : boolean
|
||||||
+ equals(obj:Object) : boolean
|
|
||||||
+ hashCode() : int
|
+ hashCode() : int
|
||||||
|
+ equals(obj:Object) : boolean
|
||||||
}
|
}
|
||||||
User ..> WebDataBinder
|
User ..> WebDataBinder
|
||||||
User --> UserAccount : "-userAccount"
|
User --> UserAccount : "-userAccount"
|
||||||
User --|> AbstractAggregateRoot : <<extends>>
|
User --|> AbstractAggregateRoot : <<extends>>
|
||||||
|
|
||||||
class UserController {
|
class UserController {
|
||||||
|
- userManagement : UserManagement
|
||||||
+ UserController(userManagement: UserManagement)
|
+ UserController(userManagement: UserManagement)
|
||||||
- initProfileBinder(binder : WebDataBinder) : void
|
- initProfileBinder(binder : WebDataBinder) : void
|
||||||
- initRegistrationBinder(binder : WebDataBinder) : void
|
- initRegistrationBinder(binder : WebDataBinder) : void
|
||||||
|
- initAdminBinder(binder : WebDataBinder) : void
|
||||||
+ unauthorized() : String
|
+ unauthorized() : String
|
||||||
+ register() : String
|
+ register(model:Model)) : String
|
||||||
+ register(form:RegistrationForm,result:Errors) : String
|
+ register(form:RegistrationForm,result:Errors) : String
|
||||||
+ loginPage() : String
|
+ loginPage() : String
|
||||||
+ viewProfile(model:Model,userAccount:UserAccount) : String
|
+ viewProfile(model:Model,userAccount:UserAccount) : String
|
||||||
|
@ -70,41 +73,53 @@ package catering.users {
|
||||||
UserController ..> WebDataBinder
|
UserController ..> WebDataBinder
|
||||||
|
|
||||||
class UserManagement {
|
class UserManagement {
|
||||||
|
- user : UserRepository
|
||||||
|
- userAccounts : UserAccountManagement
|
||||||
+ UserManagement(users:UserRepository,userAccounts:UserAccountManagement)
|
+ UserManagement(users:UserRepository,userAccounts:UserAccountManagement)
|
||||||
+ createCustomer(name:String, password:String, address:String) : User
|
+ createCustomer(name:String, password:String, address:String, fullName : String) : User
|
||||||
+ createAdmin(name:String, password:String, address:String,fullName:String) : User
|
+ createAdmin(name:String, password:String, address:String) : User
|
||||||
+ save(user:User) : User
|
+ save(user:User) : User
|
||||||
|
+ setPassword(password : String, userAccount : UserAccount) : boolean
|
||||||
+ getUsers() : UserRepository
|
+ getUsers() : UserRepository
|
||||||
+ disableUserAccount(userAccount:UserAccount) : void
|
+ disableUserAccount(userAccount:UserAccount) : void
|
||||||
+ getUserByAccount(userAccount:UserAccount) : Optional<User>
|
+ getUserByAccount(userAccount:UserAccount) : Optional<User>
|
||||||
|
+ getUserByName(username : String) : Optional<User>
|
||||||
}
|
}
|
||||||
UserManagement --> UserAccountManagement : "-userAccounts"
|
UserManagement --> UserAccountManagement : "-userAccounts"
|
||||||
UserManagement --> UserRepository : "-users"
|
UserManagement --> UserRepository : "-users"
|
||||||
UserManagement ..> User
|
UserManagement ..> User
|
||||||
|
|
||||||
class UserDataInitalizer {
|
class UserDataInitalizer {
|
||||||
|
- LOG : Logger
|
||||||
- userManagement : UserManagement
|
- userManagement : UserManagement
|
||||||
+ UserDataInitalizer(userManagement : UserManagement)
|
- userAccountManagement : UserAccountManagement
|
||||||
|
+ UserDataInitalizer(userManagement : UserManagement, userAccountManagement : UserAccountManagement)
|
||||||
+ initalize() : void
|
+ initalize() : void
|
||||||
}
|
}
|
||||||
UserDataInitalizer --> UserManagement : "-userManagement"
|
UserDataInitalizer --> UserManagement : "-userManagement"
|
||||||
UserDataInitalizer ..|> DataInitalizer
|
UserDataInitalizer ..|> DataInitalizer
|
||||||
|
|
||||||
class UserRepository {
|
class UserRepository {
|
||||||
+ findAll() : Streamable<User>
|
+ findAll() : Streamable<User>
|
||||||
}
|
}
|
||||||
|
|
||||||
UserRepository --|> CrudRepository : <<extends>>
|
UserRepository --|> CrudRepository : <<extends>>
|
||||||
UserRepository ..|> Streamable
|
UserRepository ..|> Streamable
|
||||||
UserRepository o-- User
|
UserRepository o-- User
|
||||||
|
|
||||||
class UserForm {
|
class UserForm {
|
||||||
- username: String
|
- username: String
|
||||||
- password: String
|
- password: String
|
||||||
- address: String
|
- address: String
|
||||||
- password: String
|
|
||||||
+ UserForm(username:String,address:String,fullName:String,password:String)
|
+ UserForm(username:String,address:String,fullName:String,password:String)
|
||||||
+ getUsername() : String
|
+ getUsername() : String
|
||||||
+ getAddress() : String
|
+ getAddress() : String
|
||||||
+ getFullName() : String
|
+ getFullName() : String
|
||||||
+ getPassword() : String
|
+ abstract class UserFormWithPassword()
|
||||||
|
+ abstract class RegistrationForm()
|
||||||
|
+ abstract class ProfileForm()
|
||||||
}
|
}
|
||||||
|
|
||||||
class FormValidator {
|
class FormValidator {
|
||||||
supports(c:Class<?>) : boolean
|
supports(c:Class<?>) : boolean
|
||||||
validate(o:Object,e:Errors) : void
|
validate(o:Object,e:Errors) : void
|
||||||
|
|
Loading…
Reference in a new issue