@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: <