|
Lines 11-24
Link Here
|
| 11 |
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. |
11 |
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. |
| 12 |
* |
12 |
* |
| 13 |
* Contributors: |
13 |
* Contributors: |
| 14 |
* {Name} (company) - description of contribution. |
14 |
* David McKnight (IBM) - [195285] mount path mapper changes |
| 15 |
********************************************************************************/ |
15 |
********************************************************************************/ |
| 16 |
|
16 |
|
| 17 |
package org.eclipse.rse.files.ui.resources; |
17 |
package org.eclipse.rse.files.ui.resources; |
| 18 |
|
18 |
|
|
|
19 |
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; |
| 20 |
|
| 19 |
/** |
21 |
/** |
| 20 |
* This interface is used to provide a common way of mapping mounted resources to the temp files project. |
22 |
* This interface is used to provide a common way of mapping mounted resources to the temp files project. |
| 21 |
* Since local mounts can change or be removed (i.e. disconnected) this provides a way for a vender to |
23 |
* Since local (or remote) mounts can change or be removed (i.e. disconnected) this provides a way for a vender to |
| 22 |
* remap a particular resource if the vender software is able to determine the new mount location. |
24 |
* remap a particular resource if the vender software is able to determine the new mount location. |
| 23 |
* Implementors of this interface should register their mappers via the mountPathMapper extension point. |
25 |
* Implementors of this interface should register their mappers via the mountPathMapper extension point. |
| 24 |
*/ |
26 |
*/ |
|
Lines 28-54
Link Here
|
| 28 |
/** |
30 |
/** |
| 29 |
* Indicates whether this mapper handles remapping of the specified resource |
31 |
* Indicates whether this mapper handles remapping of the specified resource |
| 30 |
* @param hostname the remote host |
32 |
* @param hostname the remote host |
| 31 |
* @param remotePath the remote path as seen by the local file subsystem |
33 |
* @param remotePath the remote path as seen by the file subsystem |
| 32 |
* @return whether this mapper handles remapping of the specified remote resource |
34 |
* @return whether this mapper handles remapping of the specified remote resource |
| 33 |
*/ |
35 |
*/ |
| 34 |
public boolean handlesMappingFor(String hostname, String remotePath); |
36 |
public boolean handlesMappingFor(String hostname, String remotePath); |
| 35 |
|
37 |
|
| 36 |
/** |
38 |
/** |
| 37 |
* Returns the qualified workspace path for a replica of this mounted file. Since the local |
39 |
* Returns the qualified workspace path for a replica of this mounted file. Since the |
| 38 |
* system path is not unique for mounted files, this allows a vender to make sure it is unique. |
40 |
* system path is not unique for mounted files, this allows a vender to make sure it is unique. |
| 39 |
* The workspace mapping should always be the remote path on the originating host. |
41 |
* The workspace mapping should always be the remote path on the originating host. |
| 40 |
* |
42 |
* |
| 41 |
* @param hostname the remote host |
43 |
* @param hostname the remote host |
| 42 |
* @param remotePath the remote path as seen by the local file subsystem |
44 |
* @param remotePath the remote path as seen by the file subsystem |
|
|
45 |
* @param the remote file subsystem. User the subsystem to customize how the temp file is located. If null |
| 46 |
* is specified, then the subsystem is not used in determining the mapping |
| 43 |
* @return the corresponding workspace replica mapping |
47 |
* @return the corresponding workspace replica mapping |
| 44 |
*/ |
48 |
*/ |
| 45 |
public String getWorkspaceMappingFor(String hostname, String remotePath); |
49 |
public String getWorkspaceMappingFor(String hostname, String remotePath, IRemoteFileSubSystem subsystem); |
|
|
50 |
|
| 46 |
|
51 |
|
| 47 |
|
52 |
|
| 48 |
/** |
53 |
/** |
| 49 |
* Returns the corresponding hostname for the specified path on the specified host. If a file is mounted |
54 |
* Returns the corresponding hostname for the specified path on the specified host. If a file is mounted |
| 50 |
* via local, then the actual host containing the file will not be local. If there is no mapping, then |
55 |
* then the actual host containing the file will not be local. If there is no mapping, then |
| 51 |
* the hostname will be the same as the argument. |
56 |
* the hostname will be the same as the argument. If the file is remote (i.e. not locally mounted) then |
|
|
57 |
* this will retrun the same as the hostname argument. |
| 58 |
* |
| 52 |
* @param hostname the system host |
59 |
* @param hostname the system host |
| 53 |
* @param remotePath the path on the system host |
60 |
* @param remotePath the path on the system host |
| 54 |
* @return the actual host that contains the specified remote path |
61 |
* @return the actual host that contains the specified remote path |
|
Lines 56-63
Link Here
|
| 56 |
public String getActualHostFor(String hostname, String remotePath); |
63 |
public String getActualHostFor(String hostname, String remotePath); |
| 57 |
|
64 |
|
| 58 |
/** |
65 |
/** |
| 59 |
* Returns the local system path that can be used for copying the replica back to remote. When null |
66 |
* Returns the system path that can be used for copying the replica back to remote. When null |
| 60 |
* is returned RSE the file is treated as no longer available and thus remote uploads do not occur. Venders |
67 |
* is returned RSE the file is treated as no longer available and thus remote uploads do not occur. Vendors |
| 61 |
* who would like to disable uploads for some period can implement this to return null during that period. |
68 |
* who would like to disable uploads for some period can implement this to return null during that period. |
| 62 |
* |
69 |
* |
| 63 |
* @param hostname the remote host |
70 |
* @param hostname the remote host |