mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
57078: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3) 56565: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1) 56238: Merged DEV to V4.1-BUG-FIX (4.1.7) 50368: MNT-9500: After editing one occurrence of recurrent event the recurrence disappears - Implemented the new functionality that allow update occurrences in a recurrence event. Now we have ability to update the following properties through outlook: start, end, subject, location. Calendar web script was updated to display event\events information correctly. Also appropriate unit tests were added. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61709 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -22,9 +22,12 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.model.ForumModel;
|
||||
import org.alfresco.query.CannedQuery;
|
||||
import org.alfresco.query.CannedQueryParameters;
|
||||
import org.alfresco.query.CannedQuerySortDetails.SortOrder;
|
||||
@@ -37,6 +40,8 @@ import org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityBean;
|
||||
import org.alfresco.service.cmr.calendar.CalendarEntry;
|
||||
import org.alfresco.service.cmr.calendar.CalendarRecurrenceHelper;
|
||||
import org.alfresco.service.cmr.calendar.CalendarService;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.alfresco.service.cmr.tagging.TaggingService;
|
||||
@@ -142,9 +147,21 @@ public class GetCalendarEntriesCannedQuery extends AbstractCannedQueryPermission
|
||||
searchTo = recurringLastDate;
|
||||
}
|
||||
|
||||
Set<QName> childNodeTypeQNames = new HashSet<QName>();
|
||||
childNodeTypeQNames.add(CalendarModel.TYPE_IGNORE_EVENT);
|
||||
List<ChildAssociationRef> ignoreEventList = nodeService.getChildAssocs(result.getNodeRef(), childNodeTypeQNames);
|
||||
Set<Date> ignoredDates = new HashSet<Date>();
|
||||
for (ChildAssociationRef ignoreEvent : ignoreEventList)
|
||||
{
|
||||
NodeRef nodeRef = ignoreEvent.getChildRef();
|
||||
Date ignoredDate = (Date) nodeService.getProperty(nodeRef, CalendarModel.PROP_IGNORE_EVENT_DATE);
|
||||
ignoredDates.add(ignoredDate);
|
||||
}
|
||||
|
||||
|
||||
List<Date> dates = CalendarRecurrenceHelper.getRecurrencesOnOrAfter(
|
||||
recurringRule, fromDate, toDate, recurringLastDate,
|
||||
searchFrom, searchTo, false);
|
||||
searchFrom, searchTo, false, ignoredDates);
|
||||
if (dates != null && dates.size() > 0)
|
||||
{
|
||||
// Do any of these fit?
|
||||
|
Reference in New Issue
Block a user