Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 35accde32aeefc101914788c4866b7df3b01ef18 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
/*******************************************************************************
 * Copyright (c) 2009 Remy Chi Jian Suen 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:
 *    Remy Chi Jian Suen <remy.suen@gmail.com> - initial API and implementation
 ******************************************************************************/
package org.eclipse.ecf.sync.resources.core;

import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.ecf.sync.IModelChange;

/**
 * Interface representing a change to a resource within the Eclipse workspace.
 */
public interface IResourceChange extends IModelChange {

	/**
	 * Returns the path of the modified resource, relative to the workspace.
	 * 
	 * @return the workspace relative path of the modified resource
	 */
	public String getPath();

	/**
	 * Returns the type of resource that has been modified.
	 * 
	 * @return the modified resource's type
	 * @see IResource#getType()
	 */
	public int getType();

	/**
	 * Retrieves the kind of modification that has occurred.
	 * 
	 * @return the kind of modification on the resource
	 * @see IResourceDelta#getKind()
	 */
	public int getKind();

	/**
	 * Retrieves the contents of the resource that has been modified. May be
	 * <code>null</code> if the resource itself represents no content such as
	 * the case for folders. While the folder itself holds files with contains
	 * contents, the folder itself has no content representation.
	 * 
	 * @return the contents of the resource that has been changed, or
	 *         <code>null</code> if not applicable
	 */
	public byte[] getContents();
}

Back to the top