summaryrefslogtreecommitdiff
path: root/20-implementierungsheft/assets/diagrams/sequencediagram-getSubscriptions.puml
blob: 4d8ab909efb76e18584f43bf939764086a5da57f (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
33
34
35
36
37
38
@startuml

' title =**Get All Subscriptions**

participant SubscriptionController << (C, #ADD1B2) @Controller >>
-> SubscriptionController: ""GET /subscriptions/{username}.json"" \n""    /subscriptions/{username}/{deviceid}.json"" \n//@RequestParam("jsonp") String functionJSONP// \n\n-> getSubscriptions(""username"", ""deviceid"", //functionJSONP//)
activate SubscriptionController
note right
    Die Parameter ""deviceid"" und 
    //functionJSONP// werden ignoriert, 
    da nicht zwischen Geräten unterschieden 
    und JSONP nicht unterstützt wird.
end note
participant SubscriptionService << (C, #ADD1B2) @Service >>
SubscriptionController -> SubscriptionService: getSubscriptions(""username"")
activate SubscriptionService
participant SubscriptionDataAccessService << (C, #ADD1B2) @Repository >>
SubscriptionService -> SubscriptionDataAccessService: getSubscriptions(""username"")
activate SubscriptionDataAccessService
SubscriptionDataAccessService -> SubscriptionDataAccessService: getSubscriptionsSince(""username"", LocalDateTime.MIN)
database Database
activate SubscriptionDataAccessService
SubscriptionDataAccessService -> Database: get all Subscriptions for ""username""
activate Database
Database --> SubscriptionDataAccessService: List<Subscription> subscriptions
SubscriptionDataAccessService -> Database: get Podcasts from Subscriptions
Database --> SubscriptionDataAccessService: List<Podcast> subscribedPodcasts
deactivate Database
SubscriptionDataAccessService --> SubscriptionDataAccessService: List<String> podcastURLs
deactivate SubscriptionDataAccessService
SubscriptionDataAccessService --> SubscriptionService: List<String> podcastURLs
deactivate SubscriptionDataAccessService
SubscriptionService --> SubscriptionController: List<String> podcastURLs
deactivate SubscriptionService
<-- SubscriptionController: ResponseEntity<List<String>> podcastURLs \n \n-> ""HTTP status code"" \n-> ""JSON""
deactivate SubscriptionController

@enduml