RSE
Release 1.0

org.eclipse.rse.files.ui.resources
Class DefaultMountPathMapper

java.lang.Object
  extended byorg.eclipse.rse.files.ui.resources.DefaultMountPathMapper
All Implemented Interfaces:
ISystemMountPathMapper

public class DefaultMountPathMapper
extends Object
implements ISystemMountPathMapper


Constructor Summary
DefaultMountPathMapper()
           
 
Method Summary
 String getActualHostFor(String hostname, String remotePath)
          Returns the corresponding hostname for the specified path on the specified host.
 String getMountedMappingFor(String hostname, String remotePath)
          Returns the remote path.
 String getWorkspaceMappingFor(String hostname, String remotePath)
          Returns the qualified workspace path for a replica of this mounted file.
 boolean handlesMappingFor(String hostname, String remotePath)
          Indicates whether this mapper handles remapping of the specified resource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMountPathMapper

public DefaultMountPathMapper()
Method Detail

handlesMappingFor

public boolean handlesMappingFor(String hostname,
                                 String remotePath)
Description copied from interface: ISystemMountPathMapper
Indicates whether this mapper handles remapping of the specified resource

Specified by:
handlesMappingFor in interface ISystemMountPathMapper
Parameters:
hostname - the remote host
remotePath - the remote path as seen by the local file subsystem
Returns:
whether this mapper handles remapping of the specified remote resource

getActualHostFor

public String getActualHostFor(String hostname,
                               String remotePath)
Description copied from interface: ISystemMountPathMapper
Returns the corresponding hostname for the specified path on the specified host. If a file is mounted via local, then the actual host containing the file will not be local. If there is no mapping, then the hostname will be the same as the argument.

Specified by:
getActualHostFor in interface ISystemMountPathMapper
Parameters:
hostname - the system host
remotePath - the path on the system host
Returns:
the actual host that contains the specified remote path

getWorkspaceMappingFor

public String getWorkspaceMappingFor(String hostname,
                                     String remotePath)
Description copied from interface: ISystemMountPathMapper
Returns the qualified workspace path for a replica of this mounted file. Since the local system path is not unique for mounted files, this allows a vender to make sure it is unique. The workspace mapping should always be the remote path on the originating host.

Specified by:
getWorkspaceMappingFor in interface ISystemMountPathMapper
Parameters:
hostname - the remote host
remotePath - the remote path as seen by the local file subsystem
Returns:
the corresponding workspace replica mapping

getMountedMappingFor

public String getMountedMappingFor(String hostname,
                                   String remotePath)
Returns the remote path.

Specified by:
getMountedMappingFor in interface ISystemMountPathMapper
Parameters:
hostname - the remote host
remotePath - the remote path as seen by the local file subsystem
Returns:
the local system path that represents the mounted file

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.