From 7fcdc1c788725f866de71fc9dfd8c4d1cb132b57 Mon Sep 17 00:00:00 2001 From: Orangerot Date: Fri, 24 May 2024 17:42:08 +0200 Subject: Initial commit --- .../diagrams/classdiagram-subscriptions.puml | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 21-implementierungsheft-kolloquium/assets/diagrams/classdiagram-subscriptions.puml (limited to '21-implementierungsheft-kolloquium/assets/diagrams/classdiagram-subscriptions.puml') diff --git a/21-implementierungsheft-kolloquium/assets/diagrams/classdiagram-subscriptions.puml b/21-implementierungsheft-kolloquium/assets/diagrams/classdiagram-subscriptions.puml new file mode 100644 index 0000000..432f185 --- /dev/null +++ b/21-implementierungsheft-kolloquium/assets/diagrams/classdiagram-subscriptions.puml @@ -0,0 +1,75 @@ +@startuml + +package subscriptionsAPI <> { + package subscriptionDataAccessLayer <> { + class SubscriptionDataAccessService <<@Repository>> { + <> SubscriptionDataAccessService(JpaTemplate jpaTemplate) + int uploadSubscriptions(String username, List subscriptions) + List getSubscriptions(String username) + List getSubscriptionsSince(String username, LocalDateTime time) + int addSubscriptions(String username, List addedSubscriptions) + int removeSubscriptions(String username, List removedSubscriptions) + List getTitles(String username) + } + + interface SubscriptionDao { + int uploadSubscriptions(String username, List subscriptions) + List getSubscriptions(String username) + List getSubscriptionsSince(String username, LocalDateTime time) + int addSubscriptions(String username, List addedSubscriptions) + int removeSubscriptions(String username, List removedSubscriptions) + List getTitles(String username) + } + } + + package subscriptionService <> { + class SubscriptionService <<@Service>> { + <> SubscriptionService(SubscriptionDao subscriptionDao) + int uploadSubscriptions(String username, List subscriptions) + List getSubscriptions(String username) + List getSubscriptionsSince(String username, LocalDateTime time) + int addSubscriptions(String username, List addedSubscriptions) + int removeSubscriptions(String username, List removedSubscriptions) + List getTitles(String username) + } + } + + package subscriptionController <> { + class SubscriptionController <<@Controller>>{ + ' @Autowired + <> SubscriptionController(SubscriptionService subscriptionService) + ' @GetMapping + ResponseEntity> getSubscriptions(String username, String deviceID, String functionJSONP) + ' @PutMapping + ResponseEntity uploadSubscriptions(String username, String deviceID, List subscriptions) + ' @PostMapping + ResponseEntity applySubscriptionDelta(String username, String deviceID, SubscriptionDelta delta) + ' @GetMapping + ResponseEntity getSubscriptionDelta(String username, String deviceID, long since) + ResponseEntity> getTitles(String username, String deviceID) + } + + class SubscriptionTitles { + <> SubscriptionTitles(Subscription subscription, List episodeTitles) + Subscription getSubscription() + List getEpisodesTitles() + } + + class SubscriptionDelta { + <> SubscriptionDelta(List add, List remove) + List getRemove() + LocalDate getTimestamp() + List> getUpdate_urls() + } + } + +} + +' Subscription <.. SubscriptionDataAccessService: DB +' SubscriptionAction <.. SubscriptionDataAccessService: DB +SubscriptionService --o SubscriptionController +SubscriptionDao <.. SubscriptionService: <> +SubscriptionDao <|. SubscriptionDataAccessService: <> + +@enduml + -- cgit v1.2.3