Class CalendarTool
java.lang.Object
com.logicaldoc.calendar.automation.CalendarTool
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteEvent
(long eventId, boolean alertCancelation, String username) Deletes an eventvoid
initializeEvent
(Event event) Initializes lazy loaded collections of an eventnewEvent
(long tenantId, String title, Date start, Collection<Attendee> attendees, Collection<com.logicaldoc.core.document.Document> documents, String username) Creates a new calendar eventvoid
Stores into the database the given calendar envent
-
Constructor Details
-
CalendarTool
public CalendarTool()
-
-
Method Details
-
saveEvent
Stores into the database the given calendar envent- Parameters:
event
- the event to save / updateusername
- the user in whose name the method is run- Throws:
com.logicaldoc.core.PersistenceException
- error at data layer
-
initializeEvent
Initializes lazy loaded collections of an event- Parameters:
event
- the event to initialize
-
deleteEvent
public void deleteEvent(long eventId, boolean alertCancelation, String username) throws com.logicaldoc.core.PersistenceException Deletes an event- Parameters:
eventId
- identifier of the event to deletealertCancelation
- alerts the attendees about the cancelationusername
- the user in whose name the method is run- Throws:
com.logicaldoc.core.PersistenceException
- error at data layer
-
newEvent
public Event newEvent(long tenantId, String title, Date start, Collection<Attendee> attendees, Collection<com.logicaldoc.core.document.Document> documents, String username) throws com.logicaldoc.core.PersistenceException Creates a new calendar event- Parameters:
tenantId
- the current tenanttitle
- the title of the eventstart
- when the event startsattendees
- optional collection of attendeesdocuments
- optional collection of documentsusername
- the user in whose name the method is run- Returns:
- the created event
- Throws:
com.logicaldoc.core.PersistenceException
- error at data layer
-