mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Update Customer and Staff design model and class descriptions
Co-authored-by: Simon Bruder <simon.bruder@mailbox.tu-dresden.de>
This commit is contained in:
parent
ca38efaf1c
commit
7a769f2976
|
@ -268,6 +268,11 @@ image:models/design/user.svg[class design diagram - User]
|
||||||
[options="header"]
|
[options="header"]
|
||||||
|===
|
|===
|
||||||
|Class/Enumeration |Description
|
|Class/Enumeration |Description
|
||||||
|
|Usercontroller |A Spring MVC Controller to handle profile management.
|
||||||
|
|UserDataInitalizer |An Initializer with primary purpose to add the admin.
|
||||||
|
|UserManagement |A class that manages the UserRepository.
|
||||||
|
|UserRepository |An extension of 'CrudRepository' to save Users.
|
||||||
|
|User |A class that allows a person to associate system data with themselves.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
=== Staff
|
=== Staff
|
||||||
|
@ -277,11 +282,24 @@ image:models/design/staff.svg[class design diagram - Staff]
|
||||||
[options="header"]
|
[options="header"]
|
||||||
|===
|
|===
|
||||||
|Class/Enumeration |Description
|
|Class/Enumeration |Description
|
||||||
|Usercontroller |A Spring MVC Controller to handle profile management.
|
|Staff |A class that represents staff members. It includes personal details and job information.
|
||||||
|UserDataInitalizer |An Initalizer with primary purpose to add the admin.
|
|StaffController |A Spring MVC Controller for managing staff-related operations such as adding, removing, and updating staff data.
|
||||||
|UserManagement |A class that manages the UserRepository.
|
|StaffDataInitializer |An Initalizer with primary purpose to create dummy data on application startup.
|
||||||
|UserRepository |An exntension of 'CrudRepository' to save Users.
|
|StaffRepository |An extension of 'CrudRepository' to perform add, save, count, remove, and find by id operations specific to staff objects.
|
||||||
|User |A class that allows a person to associate system data with themself.
|
|===
|
||||||
|
|
||||||
|
=== Customer
|
||||||
|
|
||||||
|
image:models/design/customer.svg[class design diagram - Customer]
|
||||||
|
|
||||||
|
[options="header"]
|
||||||
|
|===
|
||||||
|
|Class/Enumeration |Description
|
||||||
|
|Customer |A class that represents the customer's information. It includes the customer names and surnames.
|
||||||
|
|CustomerController |A Spring MVC Controller for managing customer-related operations such as removing, and updating customer data.
|
||||||
|
|CustomerDataInitializer |An Initalizer with primary purpose to create dummy data on application startup.
|
||||||
|
|CustomerRepository |An extension of 'CrudRepository' to perform add, save, count, remove, and find by id operations specific to customer objects.
|
||||||
|
|RegistrationForm |A class to handle the data input for new customer registration. It provides methods to retrieve the information and validate the data provided through forms.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,17 +16,19 @@ package customer {
|
||||||
|
|
||||||
class Customer {
|
class Customer {
|
||||||
- id: int
|
- id: int
|
||||||
+ Customer()
|
- surname: String
|
||||||
+ addCustomer(customer: Customer): boolean
|
- name: String
|
||||||
+ save(customer: Customer): void
|
+ Customer(name: String, surname: String)
|
||||||
+ count(): long
|
+ getId(): int
|
||||||
+ removeCustomer(customerID: int): boolean
|
+ getSurname(): String
|
||||||
+ getCustomers(): Collection<Customer>
|
+ getName(): String
|
||||||
+ findById(id: int): Optional<Customer>
|
+ setId(): void
|
||||||
|
+ setSurname(): void
|
||||||
|
+ setName(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
class CustomerController {
|
class CustomerController {
|
||||||
+ CustomerController(staffRepository: StaffRepository)
|
+ CustomerController(customerRepository: CustomerRepository)
|
||||||
+ getCustomer(model Model): String
|
+ getCustomer(model Model): String
|
||||||
+ removeCustomer(customerID: int, model Model): String
|
+ removeCustomer(customerID: int, model Model): String
|
||||||
+ editCustomer(id: int, model Model): String
|
+ editCustomer(id: int, model Model): String
|
||||||
|
@ -34,7 +36,7 @@ package customer {
|
||||||
}
|
}
|
||||||
|
|
||||||
class CustomerDataInitializer {
|
class CustomerDataInitializer {
|
||||||
+ CustomerDataInitializer(customeRepository: CustomeRepository)
|
+ CustomerDataInitializer(customerRepository: CustomerRepository)
|
||||||
+ initialize(): void
|
+ initialize(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,17 +45,29 @@ package customer {
|
||||||
+ addCustomer(customer: Customer): boolean
|
+ addCustomer(customer: Customer): boolean
|
||||||
+ save(customer: Customer): void
|
+ save(customer: Customer): void
|
||||||
+ count(): long
|
+ count(): long
|
||||||
+ removeStaff(staffID: int) boolean
|
+ removeCustomer(customerID: int) boolean
|
||||||
+ getCustomer(): Collection<Customer>
|
+ getCustomers(): Collection<Customer>
|
||||||
+ findById(id: int): Optional<Customer>
|
+ findById(id: int): Optional<Customer>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class RegistrationForm {
|
||||||
|
- name: String
|
||||||
|
- password: String
|
||||||
|
- address: String
|
||||||
|
+ RegistrationForm(String name, String password, String address)
|
||||||
|
+ getName(): String
|
||||||
|
+ getPassword(): String
|
||||||
|
+ getAddress(): String
|
||||||
|
+ validate(errors Errors): void
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomerRepository *-- Customer : -customer
|
CustomerRepository *-- Customer : -customer
|
||||||
CustomerController --> CustomerRepository : -customerRepository
|
CustomerController --> CustomerRepository : -customerRepository
|
||||||
CustomerDataInitializer --> CustomerRepository : -customerRepository
|
CustomerDataInitializer --> CustomerRepository : -customerRepository
|
||||||
|
RegistrationForm <-- CustomerController : use
|
||||||
CustomerRepository --> Set : -customers
|
CustomerRepository --> Set : -customers
|
||||||
CustomerRepository --> HashSet : use
|
CustomerRepository --> HashSet : use
|
||||||
CustomerRepository --> Collection : use
|
CustomerRepository --> Collection : use
|
||||||
|
|
BIN
src/main/asciidoc/models/design/customer.svg
(Stored with Git LFS)
BIN
src/main/asciidoc/models/design/customer.svg
(Stored with Git LFS)
Binary file not shown.
|
@ -34,7 +34,7 @@ package staff {
|
||||||
+ StaffController(staffRepository: StaffRepository)
|
+ StaffController(staffRepository: StaffRepository)
|
||||||
+ getStaff(model Model): String
|
+ getStaff(model Model): String
|
||||||
+ removeStaff(staffID: int, model Model): String
|
+ removeStaff(staffID: int, model Model): String
|
||||||
+ addStaff(name: String, surname: String, job: String): String
|
+ addStaff(name: String, surname: String, job: String, model Model): String
|
||||||
+ editStaff(id: int, model Model): String
|
+ editStaff(id: int, model Model): String
|
||||||
+ updateStaff(staff: Staff): String
|
+ updateStaff(staff: Staff): String
|
||||||
}
|
}
|
||||||
|
|
BIN
src/main/asciidoc/models/design/staff.svg
(Stored with Git LFS)
BIN
src/main/asciidoc/models/design/staff.svg
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in a new issue