76 lines
3.6 KiB
Plaintext
76 lines
3.6 KiB
Plaintext
@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
|
|
|