001/* 002 * (C) Copyright 2013 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Antoine Taillefer <[email protected]> 018 */ 019package org.nuxeo.drive.service; 020 021import java.util.List; 022 023/** 024 * Summary of file system changes, including: 025 * <ul> 026 * <li>A list of file system item changes</li> 027 * <li>A global status code</li> 028 * </ul> 029 * A document change is implemented by {@link FileSystemItemChange}. 030 * 031 * @author Antoine Taillefer 032 */ 033public interface FileSystemChangeSummary { 034 035 List<FileSystemItemChange> getFileSystemChanges(); 036 037 void setFileSystemChanges(List<FileSystemItemChange> changes); 038 039 /** 040 * @return the time code of current sync operation in milliseconds since 1970-01-01 UTC rounded to the second as 041 * measured on the server clock. 042 */ 043 Long getSyncDate(); 044 045 /** 046 * @return the upper bound of the range clause in the change query. Changes from the current summary instance all 047 * happen "strictly before" this bound. This value is expected to be passed to the next call to 048 * {@link NuxeoDriveManager#getChangeSummary(org.nuxeo.ecm.core.api.NuxeoPrincipal, java.util.Map, long)} to 049 * get strictly monotonic change summaries (without overlap). 050 */ 051 Long getUpperBound(); 052 053 String getActiveSynchronizationRootDefinitions(); 054 055 void setActiveSynchronizationRootDefinitions(String activeSynchronizationRootDefinitions); 056 057 void setSyncDate(Long syncDate); 058 059 void setUpperBound(Long upperBound); 060 061 void setHasTooManyChanges(Boolean hasTooManyChanges); 062 063 Boolean getHasTooManyChanges(); 064 065}