-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
/
Copy pathcart-service.urm.puml
70 lines (60 loc) · 1.62 KB
/
cart-service.urm.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@startuml
skinparam dpi 300
scale 0.3
package com.iluwatar.rpc.cart.model {
class ProductInCart {
- id : Long
- name : String
- price : double
- quantityToReduce : int
- type : String
}
}
package com.iluwatar.rpc.cart.service {
interface CartService {
+ getAllProducts() {abstract}
+ getRandomProductFromCart() : ProductInCart {abstract}
+ reduceCartQuantityFromProduct(ProductInCart) {abstract}
}
class CartServiceImpl {
- log : Logger {static}
- productsInCart : List<ProductInCart>
- shoppingServiceBlockingStub : ShoppingServiceBlockingStub
+ CartServiceImpl(shoppingStub : ShoppingServiceBlockingStub)
+ getAllProducts()
+ getRandomProductFromCart() : ProductInCart
+ reduceCartQuantityFromProduct(product : ProductInCart)
}
}
package com.iluwatar.rpc.proto {
class Empty {}
class ProductResponse {
- id : long
- name : String
- price : double
- type : String
}
class ReduceProductRequest {
- productId : long
- quantity : int
}
class ReduceProductResponse {
- message : String
- status : boolean
}
class ShoppingServiceImplBase {
- getAllProducts(request: Empty, responseStreamObserver: StreamObserver<ProductResponse>)
- reduceProductQuantity(request: ReduceProductRequest, responseStreamObserver : StreamObserver<ReduceProductResponse>)
}
}
package com.iluwatar.rpc.cart {
class Main {
- HOST : String {static}
- SERVER_PORT : int {static}
- log : Logger {static}
+ main(args : String[]) {static}
}
}
CartServiceImpl --> "-productsInCart" ProductInCart
CartServiceImpl ..|> CartService
@enduml