Class CalendarTool


  • public class CalendarTool
    extends Object
    Class to deal with the calendar from inside the Automation
    Since:
    8.7.4
    Author:
    Marco Meschieri - LogicalDOC
    • Constructor Detail

      • CalendarTool

        public CalendarTool()
    • Method Detail

      • save

        public void save​(Event event)
                  throws com.logicaldoc.core.PersistenceException
        Stores into the database the given calendar envent
        Parameters:
        event - the event to save / update
        Throws:
        com.logicaldoc.core.PersistenceException - error in the database
      • remove

        public void remove​(long eventId)
                    throws com.logicaldoc.core.PersistenceException
        Deletes an event
        Parameters:
        eventId - identifier of the event to delete
        Throws:
        com.logicaldoc.core.PersistenceException - error in the database
      • newEvent

        public Event newEvent​(long tenantId,
                              String title,
                              Date startDate,
                              Collection<com.logicaldoc.core.security.User> participants,
                              Collection<com.logicaldoc.core.document.Document> documents)
                       throws com.logicaldoc.core.PersistenceException
        Creates a new calendar event
        Parameters:
        tenantId - the current tenant
        title - the title of the event
        startDate - when the event starts
        participants - optional collection of participants
        documents - optional collection of documents
        Returns:
        the created event
        Throws:
        com.logicaldoc.core.PersistenceException - error in the database