85 lines
4.3 KiB
Plaintext
85 lines
4.3 KiB
Plaintext
@startuml
|
|
|
|
package episodeActionsAPI <<Frame>> {
|
|
package episodeActionDataAccessLayer <<Frame>> {
|
|
class EpisodeActionDataAccessService <<@Repository>> {
|
|
<<create>> EpisodeActionDataAccessService (JpaTemplate jpaTemplate)
|
|
long addEpisodeActions(String username, List<EpisodeActionPost> episodeActionPosts)
|
|
List<EpisodeActionPost> getEpisodeActions(String username)
|
|
List<EpisodeActionPost> getEpisodeActionsOfPodcast(String username, String podcastURL)
|
|
List<EpisodeActionPost> getEpisodeActionsSince(String username, LocalDateTime since)
|
|
List<EpisodeActionPost> getEpisodeActionsOfPodcastSince(String username, String podcastURL, LocalDateTime since)
|
|
}
|
|
|
|
interface EpisodeActionDao {
|
|
long addEpisodeActions(String username, List<EpisodeActionPost> episodeActionPosts)
|
|
List<EpisodeActionPost> getEpisodeActions(String username)
|
|
List<EpisodeActionPost> getEpisodeActionsOfPodcast(String username, String podcastURL)
|
|
List<EpisodeActionPost> getEpisodeActionsSince(String username, LocalDateTime since)
|
|
List<EpisodeActionPost> getEpisodeActionsOfPodcastSince(String username, String podcastURL, LocalDateTime since)
|
|
}
|
|
}
|
|
|
|
package episodeActionService <<Frame>> {
|
|
class EpisodeActionService <<@Service>> {
|
|
<<create>> EpisodeActionService (EpisodeActionDao episodeActionDao)
|
|
LocalDateTime addEpisodeActions(String username, List<EpisodeActionPosts> episodeActionPosts)
|
|
List<EpisodeActionPost> getEpisodeActions(String username)
|
|
List<EpisodeActionPost> getEpisodeActionsOfPodcast(String username, String podcastURL)
|
|
List<EpisodeActionPost> getEpisodeActionsSince(String username, LocalDateTime since)
|
|
List<EpisodeActionPost> getEpisodeActionsOfPodcastSince(String username, String podcastURL, LocalDateTime since)
|
|
}
|
|
}
|
|
|
|
package episodeActionController <<Frame>> {
|
|
class EpisodeActionController <<@Controller>>{
|
|
<<create>> EpisodeActionController (EpisodeActionService episodeActionService)
|
|
ResponseEntity<EpisodeActionPostResponse> addEpisodeActions(String username, EpisodeActionPostRequest episodeActionPostRequest)
|
|
ResponseEntity<EpisodeActionGetResponse> getEpisodeActions(String username, String deviceID, boolean aggregated)
|
|
ResponseEntity<EpisodeActionGetResponse> getEpisodeActionsOfPodcast(String username, String podcastURL, String deviceID, boolean aggregated)
|
|
ResponseEntity<EpisodeActionGetResponse> getEpisodeActionsSince(String username, String deviceID, long since, boolean aggregated)
|
|
ResponseEntity<EpisodeActionGetResponse> getEpisodeActionsOfPodcastSince(String username, String podcastURL, String deviceID, long since, boolean aggregated)
|
|
}
|
|
|
|
class EpisodeActionPostResponse {
|
|
<<create>> EpisodeActionPostResponse(List<Pair<String, String>> updateURLs)
|
|
long getTimestamp()
|
|
List<Pair<String, String>> getUpdatedURLs()
|
|
}
|
|
|
|
class EpisodeActionPost {
|
|
<<create>> EpisodeActionPost(String podcastURL, String episodeURL, Action action, LocalDateTime timestamp, int started, int position)
|
|
String getPodcastURL()
|
|
String getEpisodeURL()
|
|
int getGUID()
|
|
Action getAction()
|
|
LocalDateTime getTimestamp()
|
|
int getStarted()
|
|
int getPosition()
|
|
EpisodeAction getEpisodeAction()
|
|
}
|
|
|
|
class EpisodeActionPostRequest {
|
|
<<create>> EpisodeActionPostRequest(List<EpisodeActionPost> episodeActionPosts)
|
|
List<EpisodeActionPost> getEpisodeActionPosts()
|
|
}
|
|
|
|
class EpisodeActionGetResponse {
|
|
<<create>> EpisodeActionGetResponse(List<EpisodeActionPost> episodeActionPosts)
|
|
List<EpisodeActionPost> getEpisodeActionPosts()
|
|
long getTimestamp()
|
|
}
|
|
}
|
|
}
|
|
|
|
EpisodeActionPost -o EpisodeActionGetResponse
|
|
EpisodeActionPost -o EpisodeActionPostRequest
|
|
' EpisodeAction <.. EpisodeActionDataAccessService: DB
|
|
' Episode <.. EpisodeActionDataAccessService: DB
|
|
EpisodeActionDao <.. EpisodeActionService: <<use>>
|
|
EpisodeActionService --o EpisodeActionController
|
|
EpisodeActionDao <|. EpisodeActionDataAccessService: <<realize>>
|
|
|
|
@enduml
|
|
|