summaryrefslogtreecommitdiff
path: root/21-implementierungsheft-kolloquium/assets/diagrams/sequencediagram-uploadSubscriptions.puml
blob: 1edc8cfd29cc68752ee726abec6d7e0fe919cc96 (plain)
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
@startuml

' title =**Upload Subscriptions**

participant SubscriptionController << (C, #ADD1B2) @Controller >>
-> SubscriptionController: ""PUT /subscriptions/{username}/{deviceid}.json"" \n//@RequestBody List<String> subscriptions// \n\n-> uploadSubscriptions(""username"", ""deviceid"", //subscriptions//)
activate SubscriptionController
participant SubscriptionService << (C, #ADD1B2) @Service >>
SubscriptionController -> SubscriptionService: uploadSubscriptions(""username"", //subscriptions//)
activate SubscriptionService
participant SubscriptionDataAccessService << (C, #ADD1B2) @Repository >>
SubscriptionService -> SubscriptionDataAccessService: uploadSubscriptions(""username"", //subscriptions//)
activate SubscriptionDataAccessService
database Database
SubscriptionDataAccessService -> Database: delete all subsciptions of ""username""
activate Database
Database --> SubscriptionDataAccessService
SubscriptionDataAccessService -> SubscriptionDataAccessService: addSubscriptions(""username"", //subscriptions//)
activate SubscriptionDataAccessService
SubscriptionDataAccessService -> Database: upload all subscriptions (//subscriptions//) for ""username""
Database --> SubscriptionDataAccessService
deactivate Database
SubscriptionDataAccessService --> SubscriptionDataAccessService: int indicating status
deactivate SubscriptionDataAccessService
SubscriptionDataAccessService --> SubscriptionService: int indicating status
deactivate SubscriptionDataAccessService
SubscriptionService --> SubscriptionController: int indicating status
deactivate SubscriptionService
<-- SubscriptionController: ResponseEntity<String> with empty String for success \n\n-> ""HTTP status code"" \n-> ""JSON""
deactivate SubscriptionController

@enduml