PTP
Release 7.0

org.eclipse.ptp.remote.core
Class RemoteServicesUtils

java.lang.Object
  extended by org.eclipse.ptp.remote.core.RemoteServicesUtils

public class RemoteServicesUtils
extends Object

Remote services utility methods.

Since:
7.0

Constructor Summary
RemoteServicesUtils()
           
 
Method Summary
static IRemoteConnection getConnectionWithProgress(String remoteServicesId, String connectionName, IProgressMonitor monitor)
          Utility method to get a remote connection given a remote services ID and a connection name.
static IFileStore getRemoteFileWithProgress(String remoteServicesId, String connectionName, String path, IProgressMonitor monitor)
          Utility method to get a file store corresponding to the given path.
static URI toURI(IPath path)
          Convert a UNC path to a URI Maps the UNC server component to a connection known by one of the remote service implementations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteServicesUtils

public RemoteServicesUtils()
Method Detail

getConnectionWithProgress

public static IRemoteConnection getConnectionWithProgress(String remoteServicesId,
                                                          String connectionName,
                                                          IProgressMonitor monitor)
Utility method to get a remote connection given a remote services ID and a connection name.

Parameters:
remoteServicesId - ID of remote services providing the connection
connectionName - name of the connection to find
monitor - progress monitor
Returns:
remote connection or null if the ID or connection name are invalid

getRemoteFileWithProgress

public static IFileStore getRemoteFileWithProgress(String remoteServicesId,
                                                   String connectionName,
                                                   String path,
                                                   IProgressMonitor monitor)
Utility method to get a file store corresponding to the given path.

Parameters:
remoteServicesId - ID of remote services providing the connection
connectionName - name of the remote connection to use
path - path of file on remote system
monitor - progress monitor
Returns:
file store corresponding to the remote file or null if the ID or connection name are invalid

toURI

public static URI toURI(IPath path)
Convert a UNC path to a URI Maps the UNC server component to a connection known by one of the remote service implementations. It is assumed that the server component is of the form "[service_id:]connection_name". If the "service_id:" part is omitted then the current remote services preference is used by default. If no preference is set, then each implementation is tried until a matching connection name is found.

Parameters:
path - UNC path
Returns:
corresponding URI or null if not a valid path

PTP
Release 7.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.