fssa-batch3 / fssa-batch3/sec_b_inbalokesh.esakkipandi__corejava_project_2
Update product
- Dominant language
- Java
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Module: Products
- [ ] Create Product table
- [ ] Create Product Price table
- [ ] Create Product model
- [ ] Create Product Price model
### Feature 3: Update Product
#### Pre-requisites:
- [ ] Product DAO (update)
- [ ] Product Service (update)
- [ ] Product Price Service (update)
#### Validations:
- [ ] Form Validation
- product null
- id <= 0
- name (null, empty, pattern)
- food_type (null, empty, pattern)
- quantity_type (null, empty, pattern)
- price <= 0 and price >= 1000
- quantity<= 0 and quantity>= 1000
- [ ] Business Validation
- Check product Id is present
#### Messages:
- [ ] Product cannot be null
- [ ] Food type cannot be null or empty
- [ ] Quantity type cannot be null or empty
- [ ] Product Id cannot be zero or below zero
- [ ] Price cannot be zero or below zero
- [ ] Quantity cannot be zero or below zero
- [ ] Set Price range between 1 and 1000
- [ ] Set Quantity range between 1 and 1000
- [ ] Invalid String Pattern
- [ ] Product already exist
#### Flow:
```mermaid
graph TD;
A["Product Service: Update Existing Product"] --> B["Form Validation"]-- YES --> C{Business Validation}
B -- NO --> G["Validation Exception"]
C -- Yes --> D["Update Product"]
C -- No --> F["Validation Exception"]
D --> E[Product Price Service: Update Price]
E --> H[Form Validation] -- Valid --> I{Business Validation}
H -- Invalid --> J[Validation Exception]
I -- Valid --> K[Update Price and date]
I -- Invalid --> L[Validation Exception]
K --> M[Product Updated Successfully]
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.