/*
 * (C) Copyright 2012 Nuxeo SA (http://nuxeo.com/) and contributors.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser General Public License
 * (LGPL) version 2.1 which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/lgpl.html
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * Contributors:
 *     Antoine Taillefer <ataillefer@nuxeo.com>
 */
package org.nuxeo.drive.service.impl;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.nuxeo.ecm.core.api.DocumentModel;

/**
 * Summary of document changes, including:
 * <ul>
 * <li>A list of document changes</li>
 * <li>A map of document models that have changed</li>
 * <li>A status code</li>
 * </ul>
 * A document change is implemented by {@link AuditDocumentChange}.
 *
 * @author Antoine Taillefer
 */
public class DocumentChangeSummary implements Serializable {

    private static final long serialVersionUID = -5719579884697229867L;

    public static final String STATUS_FOUND_CHANGES = "found_changes";

    public static final String STATUS_TOO_MANY_CHANGES = "too_many_changes";

    public static final String STATUS_NO_CHANGES = "no_changes";

    protected List<AuditDocumentChange> documentChanges;

    protected Map<String, DocumentModel> changedDocModels;

    protected String statusCode;

    public DocumentChangeSummary(List<AuditDocumentChange> documentChanges,
            Map<String, DocumentModel> changedDocModels, String statusCode) {
        this.documentChanges = documentChanges;
        this.changedDocModels = changedDocModels;
        this.statusCode = statusCode;
    }

    public List<AuditDocumentChange> getDocumentChanges() {
        return documentChanges;
    }

    public Map<String, DocumentModel> getChangedDocModels() {
        return changedDocModels;
    }

    public String getStatusCode() {
        return statusCode;
    }

}

@@ -730,16 +730,43 @@
 izable;%0A
+import java.util.Calendar;%0A
 import j
@@ -1640,16 +1640,50 @@
 sCode;%0A%0A
+    protected Calendar syncDate;%0A%0A
     publ
@@ -1824,16 +1824,47 @@
 atusCode
+,%0A            Calendar syncDate
 ) %7B%0A    
@@ -1991,24 +1991,58 @@
 statusCode;%0A
+        this.syncDate = syncDate;%0A
     %7D%0A%0A    p
@@ -2269,24 +2269,24 @@
 tusCode() %7B%0A
-
         retu
@@ -2307,10 +2307,78 @@
 %0A    %7D%0A%0A
+    public Calendar getSyncDate() %7B%0A        return syncDate;%0A    %7D%0A%0A
 %7D%0A

Fix 'Add synchronization date in document change summary'