public class CalendarService extends java.lang.Object implements IInternalCalendar
Modifier and Type | Field and Description |
---|---|
static int |
SYNC_ERRORS_LIMIT
When this limit is reached, sync on demand stops.
|
Constructor and Description |
---|
CalendarService(javax.sql.DataSource pool,
org.elasticsearch.client.Client esearchClient,
Container container,
BmContext context,
CalendarAuditor auditor) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
all()
Returns all the items uid from the container
|
ContainerChangeset<java.lang.String> |
changeset(java.lang.Long since) |
ContainerChangeset<java.lang.Long> |
changesetById(java.lang.Long since) |
ContainerChangelog |
containerChangelog(java.lang.Long since) |
void |
create(java.lang.String uid,
VEventSeries event,
java.lang.Boolean sendNotifications)
Creates a
VEvent |
void |
createById(long id,
VEventSeries event,
java.lang.Boolean sendNotifications) |
void |
delete(java.lang.String uid,
java.lang.Boolean sendNotifications)
Deletes a
VEvent |
void |
emitNotification() |
java.util.List<ItemValue<VEventSeries>> |
getByIcsUid(java.lang.String uid)
Returns
VEventSeries |
ItemValue<VEventSeries> |
getComplete(java.lang.String uid)
Returns a
VEvent |
long |
getVersion() |
boolean |
isAutoSyncActivated()
Check the automatic synchronization is activated for this calendar.
|
ItemChangelog |
itemChangelog(java.lang.String itemUid,
java.lang.Long since) |
ListResult<ItemValue<VEventSeries>> |
list() |
java.util.List<ItemValue<VEventSeries>> |
multipleGet(java.util.List<java.lang.String> uids)
Fetch multiple
VEvent s from theirs uniques uids |
TaskRef |
reset()
Remove all events from this calendar.
|
ListResult<ItemValue<VEventSeries>> |
search(VEventQuery query)
|
ContainerChangeset<java.lang.String> |
sync(java.lang.Long since,
VEventChanges changes)
CLIENT_WIN style
|
void |
touch(java.lang.String uid)
Touch an
VEvent |
void |
update(java.lang.String uid,
VEventSeries event,
java.lang.Boolean sendNotifications)
Updates a
VEvent |
ContainerUpdatesResult |
updates(VEventChanges changes)
Applies changes (create, update, delete) to a calendar specified by its
containerUid . |
ContainerUpdatesResult |
updates(VEventChanges changes,
boolean notify) |
public static final int SYNC_ERRORS_LIMIT
public CalendarService(javax.sql.DataSource pool, org.elasticsearch.client.Client esearchClient, Container container, BmContext context, CalendarAuditor auditor) throws ServerFault
ServerFault
public void create(java.lang.String uid, VEventSeries event, java.lang.Boolean sendNotifications) throws ServerFault
ICalendar
VEvent
create
in interface ICalendar
ServerFault
public void createById(long id, VEventSeries event, java.lang.Boolean sendNotifications) throws ServerFault
createById
in interface ICalendar
ServerFault
public void update(java.lang.String uid, VEventSeries event, java.lang.Boolean sendNotifications) throws ServerFault
ICalendar
VEvent
update
in interface ICalendar
ServerFault
public ItemValue<VEventSeries> getComplete(java.lang.String uid) throws ServerFault
ICalendar
VEvent
getComplete
in interface ICalendar
VEvent
ServerFault
public java.util.List<ItemValue<VEventSeries>> getByIcsUid(java.lang.String uid) throws ServerFault
ICalendar
VEventSeries
getByIcsUid
in interface ICalendar
uid
- VEventSeries.icsUid
VEvent
ServerFault
public java.util.List<ItemValue<VEventSeries>> multipleGet(java.util.List<java.lang.String> uids) throws ServerFault
ICalendar
VEvent
s from theirs uniques uidsmultipleGet
in interface ICalendar
List>
ServerFault
public void delete(java.lang.String uid, java.lang.Boolean sendNotifications) throws ServerFault
ICalendar
VEvent
delete
in interface ICalendar
ServerFault
public void touch(java.lang.String uid) throws ServerFault
ICalendar
VEvent
touch
in interface ICalendar
ServerFault
public ContainerChangelog containerChangelog(java.lang.Long since) throws ServerFault
containerChangelog
in interface IChangelogSupport
ContainerChangelog
ServerFault
public ItemChangelog itemChangelog(java.lang.String itemUid, java.lang.Long since) throws ServerFault
itemChangelog
in interface IChangelogSupport
ContainerChangelog
ServerFault
public ContainerUpdatesResult updates(VEventChanges changes, boolean notify)
updates
in interface IInternalCalendar
public ContainerUpdatesResult updates(VEventChanges changes) throws ServerFault
ICalendar
containerUid
.updates
in interface ICalendar
ServerFault
public ListResult<ItemValue<VEventSeries>> search(VEventQuery query) throws ServerFault
ICalendar
search
in interface ICalendar
ServerFault
public ContainerChangeset<java.lang.String> changeset(java.lang.Long since) throws ServerFault
changeset
in interface IChangelogSupport
ContainerChangeset
ServerFault
public ContainerChangeset<java.lang.Long> changesetById(java.lang.Long since) throws ServerFault
changesetById
in interface IChangelogSupport
ContainerChangeset
with internal
numeric idsServerFault
public ContainerChangeset<java.lang.String> sync(java.lang.Long since, VEventChanges changes) throws ServerFault
ICalendar
sync
in interface ICalendar
ServerFault
public ListResult<ItemValue<VEventSeries>> list() throws ServerFault
list
in interface ICalendar
ServerFault
public java.util.List<java.lang.String> all() throws ServerFault
ICalendar
all
in interface ICalendar
ServerFault
public TaskRef reset() throws ServerFault
ICalendar
reset
in interface ICalendar
ServerFault
public boolean isAutoSyncActivated() throws ServerFault
ICalendar
isAutoSyncActivated
in interface ICalendar
true
if this calendar is automatically synchronized,
false
otherwiseServerFault
public void emitNotification()
emitNotification
in interface IInternalCalendar
public long getVersion() throws ServerFault
getVersion
in interface IChangelogSupport
ServerFault
Copyright © 2021. All Rights Reserved.