Class CalendarAllDayEventDatesCorrectingPatch

java.lang.Object
org.alfresco.repo.admin.patch.AbstractPatch
org.alfresco.repo.admin.patch.impl.CalendarAllDayEventDatesCorrectingPatch
All Implemented Interfaces:
Patch, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationEventPublisherAware

public class CalendarAllDayEventDatesCorrectingPatch extends AbstractPatch
This patch adjusts dates for Calendar Events. Share application in 3.4.x versions doesn't adjust specified in form dates with time zone offset value to. Web Script which saves a new event always performs correction of the dates in accordance with time zone for 'All Day' events. Date becomes on a day before, if time for date is set to '00:00' in this case. Share in 4.x does this adjustment automatically before sending request to the Web Script.

See "CMIS (OpenCMIS version) is sharing security context with other functionality in Alfresco" for more details
Since:
4.1.5
Author:
Dmitry Velichkevich
  • Constructor Details

    • CalendarAllDayEventDatesCorrectingPatch

      public CalendarAllDayEventDatesCorrectingPatch()
  • Method Details

    • setBatchSize

      public void setBatchSize(int batchSize)
    • setBatchEnabled

      public void setBatchEnabled(boolean batchEnabled)
    • setSiteService

      public void setSiteService(SiteService siteService)
    • setCalendarService

      public void setCalendarService(CalendarService calendarService)
    • applyInternal

      protected String applyInternal() throws Exception
      Description copied from class: AbstractPatch
      This method does the work. All transactions and thread-safety will be taken care of by this class. Any exception will result in the transaction being rolled back. Integrity checks are downgraded for the duration of the transaction.
      Specified by:
      applyInternal in class AbstractPatch
      Returns:
      Returns the report (only success messages).
      Throws:
      Exception - anything can be thrown. This must be used for all failures.
      See Also:
    • isAllDay

      public static boolean isAllDay(CalendarEntry entry)
      Does the given CalendarEntry define an all-day event? An All Day Event is defined as one starting at midnight on a day, and ending at midnight. For a single day event, the start and end dates should be the same, and the times for both are UTC midnight. For a multi day event, the start and end times are UTC midnight, for the first and last days respectively.