summaryrefslogtreecommitdiff
path: root/21-implementierungsheft-kolloquium/assets/diagrams/sequencediagram-getEpisodeActions.puml
blob: 47497d505224330a21e7ff174606d3bb90707403 (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 Episode Actions**

participant EpisodeActionController << (C, #ADD1B2) @Controller >>
-> EpisodeActionController: ""GET /api/2/episodes/{username}.json"" \n//@RequestParam("device") String deviceID// \n//@RequestParam("aggregated") boolean aggregated// \n\n-> getEpisodeActions(""username"", //deviceID//, //aggregated//)
note right
    Die Parameter //deviceID// und //aggregated// werden ignoriert, 
    da nicht zwischen Geräten unterschieden und für jede 
    Episode sowieso nur die letzte Play-Action gespeichert 
    wird. Dies gilt für alle GET-Anfragen der Episode Actions API. 
end note
activate EpisodeActionController
participant EpisodeActionService << (C, #ADD1B2) @Service >>
EpisodeActionController -> EpisodeActionService: getEpisodeActions(""username"")
activate EpisodeActionService
participant EpisodeActionDataAccessService << (C, #ADD1B2) @Repository >>
EpisodeActionService -> EpisodeActionDataAccessService: getEpisodeActions(""username"")
activate EpisodeActionDataAccessService
EpisodeActionDataAccessService -> EpisodeActionDataAccessService: getEpisodeActionsSince(""username"", \nLocalDateTime.MIN.toEpochSecond(ZoneOffset.UTC))
database Database
activate EpisodeActionDataAccessService
EpisodeActionDataAccessService -> Database: get all EpisodeActions for all subscribed podcasts
activate Database
Database --> EpisodeActionDataAccessService: List<EpisodeAction> selectedEpisodeActions \n-> then remove all older than LocalDateTime.MIN (none)
EpisodeActionDataAccessService -> Database: join EpisodeActions in selectedEpisodeActions with episodeURL of Episode
Database --> EpisodeActionDataAccessService
deactivate Database
EpisodeActionDataAccessService --> EpisodeActionDataAccessService: List<EpisodeActionPost> episodeActionPosts
deactivate EpisodeActionDataAccessService
EpisodeActionDataAccessService --> EpisodeActionService: List<EpisodeActionPost> episodeActionPosts
deactivate EpisodeActionDataAccessService
EpisodeActionService --> EpisodeActionController: List<EpisodeActionPost> episodeActionPosts
deactivate EpisodeActionService
<-- EpisodeActionController: ResponseEntity<EpisodeActionGetResponse> response \n\n-> ""HTTP status code"" \n-> ""JSON""
deactivate EpisodeActionController

@enduml