Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 2d3770bd1189714affd5f603f66916912b8c2e14 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/****************************************************************************
 * Copyright (c) 2008 Composent, Inc. and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Composent, Inc. - initial API and implementation
 *****************************************************************************/

package org.eclipse.ecf.sync.doc;

import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.sync.IModelSynchronizationStrategy;

/**
 * Factory for creating {@link IModelSynchronizationStrategy} instances for 
 * a uniquely identified entity.  This interface is exposed as a service and
 * provides an entry point for clients.
 */
public interface IDocumentSynchronizationStrategyFactory {

	public static final String SYNCHSTRATEGY_TYPE = "org.eclipse.ecf.sync.doc";

	/**
	 * Get an IModelSynchronizationStrategy for a unique ID.  Should not be <code>null</code>.
	 * @param uniqueID the uniqueID to identify the client of the {@link IModelSynchronizationStrategy}.
	 * @param isInitiator whether the client is the initiator of the
	 * shared editing, or the receiver.
	 * @return IModelSynchronizationStrategy for the given uniqueID.
	 */
	public IModelSynchronizationStrategy createDocumentSynchronizationStrategy(ID uniqueID, boolean isInitiator);

	/**
	 * Clean up the synchronization strategy caching for a given uniqueID. Should not be <code>null</code>.
	 * @param uniqueID the ID of the 
	 */
	public void disposeSynchronizationStrategy(ID uniqueID);
	
	public void dispose();
}

Back to the top