diff options
author | Orangerot <purple@orangerot.dev> | 2024-05-24 17:42:08 +0200 |
---|---|---|
committer | Orangerot <purple@orangerot.dev> | 2024-05-24 17:47:22 +0200 |
commit | 7fcdc1c788725f866de71fc9dfd8c4d1cb132b57 (patch) | |
tree | 89931c85ae3f149884ba02c69862558e93f01531 /11-entwurfsheft-kolloquium/assets/diagrams/classdiagram-subscriptions.puml |
Diffstat (limited to '11-entwurfsheft-kolloquium/assets/diagrams/classdiagram-subscriptions.puml')
-rw-r--r-- | 11-entwurfsheft-kolloquium/assets/diagrams/classdiagram-subscriptions.puml | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/11-entwurfsheft-kolloquium/assets/diagrams/classdiagram-subscriptions.puml b/11-entwurfsheft-kolloquium/assets/diagrams/classdiagram-subscriptions.puml new file mode 100644 index 0000000..432f185 --- /dev/null +++ b/11-entwurfsheft-kolloquium/assets/diagrams/classdiagram-subscriptions.puml @@ -0,0 +1,75 @@ +@startuml + +package subscriptionsAPI <<Frame>> { + package subscriptionDataAccessLayer <<Frame>> { + class SubscriptionDataAccessService <<@Repository>> { + <<create>> SubscriptionDataAccessService(JpaTemplate jpaTemplate) + int uploadSubscriptions(String username, List<SubscriptionAction> subscriptions) + List<String> getSubscriptions(String username) + List<String> getSubscriptionsSince(String username, LocalDateTime time) + int addSubscriptions(String username, List<SubscriptionAction> addedSubscriptions) + int removeSubscriptions(String username, List<SubscriptionAction> removedSubscriptions) + List<SubscriptionTitles> getTitles(String username) + } + + interface SubscriptionDao { + int uploadSubscriptions(String username, List<SubscriptionAction> subscriptions) + List<String> getSubscriptions(String username) + List<String> getSubscriptionsSince(String username, LocalDateTime time) + int addSubscriptions(String username, List<SubscriptionAction> addedSubscriptions) + int removeSubscriptions(String username, List<SubscriptionAction> removedSubscriptions) + List<SubscriptionTitles> getTitles(String username) + } + } + + package subscriptionService <<Frame>> { + class SubscriptionService <<@Service>> { + <<create>> SubscriptionService(SubscriptionDao subscriptionDao) + int uploadSubscriptions(String username, List<SubscriptionAction> subscriptions) + List<String> getSubscriptions(String username) + List<String> getSubscriptionsSince(String username, LocalDateTime time) + int addSubscriptions(String username, List<SubscriptionAction> addedSubscriptions) + int removeSubscriptions(String username, List<SubscriptionAction> removedSubscriptions) + List<SubscriptionTitles> getTitles(String username) + } + } + + package subscriptionController <<Frame>> { + class SubscriptionController <<@Controller>>{ + ' @Autowired + <<create>> SubscriptionController(SubscriptionService subscriptionService) + ' @GetMapping + ResponseEntity<List<String>> getSubscriptions(String username, String deviceID, String functionJSONP) + ' @PutMapping + ResponseEntity<String> uploadSubscriptions(String username, String deviceID, List<String> subscriptions) + ' @PostMapping + ResponseEntity<SubscriptionDelta> applySubscriptionDelta(String username, String deviceID, SubscriptionDelta delta) + ' @GetMapping + ResponseEntity<SubscriptionDelta> getSubscriptionDelta(String username, String deviceID, long since) + ResponseEntity<List<SubscriptionTitles>> getTitles(String username, String deviceID) + } + + class SubscriptionTitles { + <<create>> SubscriptionTitles(Subscription subscription, List<EpisodeActionPost> episodeTitles) + Subscription getSubscription() + List<EpisodeActionPost> getEpisodesTitles() + } + + class SubscriptionDelta { + <<create>> SubscriptionDelta(List<String> add, List<String> remove) + List<String> getRemove() + LocalDate getTimestamp() + List<List<String>> getUpdate_urls() + } + } + +} + +' Subscription <.. SubscriptionDataAccessService: DB +' SubscriptionAction <.. SubscriptionDataAccessService: DB +SubscriptionService --o SubscriptionController +SubscriptionDao <.. SubscriptionService: <<use>> +SubscriptionDao <|. SubscriptionDataAccessService: <<realize>> + +@enduml + |