@startuml package episodeActionsAPI <> { package episodeActionDataAccessLayer <> { class EpisodeActionDataAccessService <<@Repository>> { <> EpisodeActionDataAccessService (JpaTemplate jpaTemplate) long addEpisodeActions(String username, List episodeActionPosts) List getEpisodeActions(String username) List getEpisodeActionsOfPodcast(String username, String podcastURL) List getEpisodeActionsSince(String username, LocalDateTime since) List getEpisodeActionsOfPodcastSince(String username, String podcastURL, LocalDateTime since) } interface EpisodeActionDao { long addEpisodeActions(String username, List episodeActionPosts) List getEpisodeActions(String username) List getEpisodeActionsOfPodcast(String username, String podcastURL) List getEpisodeActionsSince(String username, LocalDateTime since) List getEpisodeActionsOfPodcastSince(String username, String podcastURL, LocalDateTime since) } } package episodeActionService <> { class EpisodeActionService <<@Service>> { <> EpisodeActionService (EpisodeActionDao episodeActionDao) LocalDateTime addEpisodeActions(String username, List episodeActionPosts) List getEpisodeActions(String username) List getEpisodeActionsOfPodcast(String username, String podcastURL) List getEpisodeActionsSince(String username, LocalDateTime since) List getEpisodeActionsOfPodcastSince(String username, String podcastURL, LocalDateTime since) } } package episodeActionController <> { class EpisodeActionController <<@Controller>>{ <> EpisodeActionController (EpisodeActionService episodeActionService) ResponseEntity addEpisodeActions(String username, EpisodeActionPostRequest episodeActionPostRequest) ResponseEntity getEpisodeActions(String username, String deviceID, boolean aggregated) ResponseEntity getEpisodeActionsOfPodcast(String username, String podcastURL, String deviceID, boolean aggregated) ResponseEntity getEpisodeActionsSince(String username, String deviceID, long since, boolean aggregated) ResponseEntity getEpisodeActionsOfPodcastSince(String username, String podcastURL, String deviceID, long since, boolean aggregated) } class EpisodeActionPostResponse { <> EpisodeActionPostResponse(List> updateURLs) long getTimestamp() List> getUpdatedURLs() } class EpisodeActionPost { <> 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 { <> EpisodeActionPostRequest(List episodeActionPosts) List getEpisodeActionPosts() } class EpisodeActionGetResponse { <> EpisodeActionGetResponse(List episodeActionPosts) List getEpisodeActionPosts() long getTimestamp() } } } EpisodeActionPost -o EpisodeActionGetResponse EpisodeActionPost -o EpisodeActionPostRequest ' EpisodeAction <.. EpisodeActionDataAccessService: DB ' Episode <.. EpisodeActionDataAccessService: DB EpisodeActionDao <.. EpisodeActionService: <> EpisodeActionService --o EpisodeActionController EpisodeActionDao <|. EpisodeActionDataAccessService: <> @enduml