blob: b477c02bb1915a2a5e9c14584fb9a7c60220dba2 (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.team.core.subscribers;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.TeamException;
/**
* This interface provides access to a remote resource that is controlled
* by a particular subscriber. It is used by <code>SyncInfo</code> instances
* to provide access to the base and remote resources that correspond to
* a locla resource.
*
* @see SyncInfo
* @since 3.0
*/
public interface ISubscriberResource {
/**
* Answers the name of the subscriber resource. The name may be
* displayed to the user.
*
* @return name of the subscriber resource.
*/
public String getName();
/**
* Answers if the remote element may have children.
*
* @return <code>true</code> if the remote element may have children and
* <code>false</code> otherwise.
*/
public boolean isContainer();
/**
* Return an instance of IStorage or <code>null</code> if the subscriber resource
* does not have contents (i.e. is a folder). Since the <code>ISorage#getContents()</code>
* method does not accept an IProgressMonitor, this method must ensure that the contents
* access by the resulting IStorage is cached locally (hence the IProgressMonitor
* argument to this method). Implementations of this method should
* ensure that the resulting IStorage is accessing locally cached contents and is not
* contacting the server.
* @return
*/
public IStorage getStorage(IProgressMonitor monitor) throws TeamException;
/**
* Return a content identifier that is used to differentiate versions
* or revisions of the same resource.
*
* @return a String that identifies the version of the subscriber resource
* @throws TeamException
*/
public String getContentIdentifier() throws TeamException;
/**
* Returns whether the subscriber resource is equal to the provided object.
* @param object
* @return
*/
public boolean equals(Object object);
}
|