Class CalendarTool

java.lang.Object
com.logicaldoc.calendar.automation.CalendarTool

public class CalendarTool extends Object
  • Constructor Details

    • CalendarTool

      public CalendarTool()
  • Method Details

    • saveEvent

      public void saveEvent(Event event, String username) throws com.logicaldoc.core.PersistenceException
      Stores into the database the given calendar envent
      Parameters:
      event - the event to save / update
      username - the user in whose name the method is run
      Throws:
      com.logicaldoc.core.PersistenceException - error at data layer
    • initializeEvent

      public void initializeEvent(Event event)
      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 delete
      alertCancelation - alerts the attendees about the cancelation
      username - 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 tenant
      title - the title of the event
      start - when the event starts
      attendees - optional collection of attendees
      documents - optional collection of documents
      username - the user in whose name the method is run
      Returns:
      the created event
      Throws:
      com.logicaldoc.core.PersistenceException - error at data layer