owncloud / calendar

Calendar app for ownCloud
GNU Affero General Public License v3.0
121 stars 43 forks source link

Move some caldav calls into Calendar Model #646

Open georgehrke opened 8 years ago

georgehrke commented 8 years ago

Whats about moving some of the caldav calls into the Calendar model itself. The CalendarService would keep get, getAll and create. but: calendar.update() instead of CalendarService.update(calendar) calendar.delete() instead of CalendarService.delete(calendar) calendar.share(...) instead of CalendarService.share(calendar, ...) calendar.unshare(...) instead of CalendarService.unshare(calendar, ...)

georgehrke commented 8 years ago

@tcitworld @DeepDiver1975 your opinion?

georgehrke commented 8 years ago

also calendar.publish() and calendar.unpublish() for public sharing

tcitworld commented 8 years ago

I don't see why not except that the Calendar model is going to be quite huge. Also, only the Calendar model (and subscriptions at some point) would make use of the remaining methods inside CalendarService, so that doesn't changes much.