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
-
-
Field Summary
-
Fields inherited from class org.alfresco.repo.admin.patch.AbstractPatch
applicationEventPublisher, authenticationContext, ERR_PROPERTY_NOT_SET, namespaceService, nodeService, patchService, searchService, tenantAdminService, transactionHelper, transactionService
-
-
Constructor Summary
Constructors Constructor Description CalendarAllDayEventDatesCorrectingPatch()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringapplyInternal()This method does the work.static booleanisAllDay(CalendarEntry entry)Does the givenCalendarEntrydefine an all-day event? An All Day Event is defined as one starting at midnight on a day, and ending at midnight.voidsetBatchEnabled(boolean batchEnabled)voidsetBatchSize(int batchSize)voidsetCalendarService(CalendarService calendarService)voidsetSiteService(SiteService siteService)-
Methods inherited from class org.alfresco.repo.admin.patch.AbstractPatch
applies, apply, applyAsync, checkProperties, checkPropertyNotNull, getAlternatives, getDependsOn, getDescription, getFixesFromSchema, getFixesToSchema, getId, getTargetSchema, init, isDeferred, isForce, isIgnored, reportProgress, requiresTransaction, setAlternatives, setApplicationEventPublisher, setApplyToTenants, setAuthenticationContext, setDeferred, setDependsOn, setDescription, setFixesFromSchema, setFixesToSchema, setForce, setId, setIgnored, setNamespaceService, setNodeService, setPatchService, setRequiresTransaction, setSearchService, setTargetSchema, setTenantAdminService, setTransactionService, toString
-
-
-
-
Method Detail
-
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 java.lang.String applyInternal() throws java.lang.ExceptionDescription copied from class:AbstractPatchThis 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:
applyInternalin classAbstractPatch- Returns:
- Returns the report (only success messages).
- Throws:
java.lang.Exception- anything can be thrown. This must be used for all failures.- See Also:
AbstractPatch.apply()
-
isAllDay
public static boolean isAllDay(CalendarEntry entry)
Does the givenCalendarEntrydefine 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.
-
-