Remote Systems
v6.4.1

com.ibm.etools.systems.core.resources
Class SystemRemoteEditManager

java.lang.Object
  extended bycom.ibm.etools.systems.core.resources.SystemRemoteEditManager

public class SystemRemoteEditManager
extends Object

This is a singleton class that manages the remote editing


Nested Class Summary
 class SystemRemoteEditManager.DeleteFileRunnable
           
 
Field Summary
static String Copyright
           
static String REMOTE_EDIT_PROJECT_BUILDER_ID
           
static String REMOTE_EDIT_PROJECT_NAME
           
static String REMOTE_EDIT_PROJECT_NATURE_ID
           
 
Method Summary
 void addJavaSupport(IProject editProject)
           
protected  int caculateCacheSize()
           
protected  void cleanupCache()
           
 boolean doesRemoteEditProjectExist()
          Check if a remote edit project exists
 String getActualHostFor(String hostname, String remotePath)
          Return the hostname that corresponds to the resource specified on the host specified.
static SystemRemoteEditManager getDefault()
          Get the singleton instance
 ISystemEditableRemoteObject getEditableFor(IFile fileToDelete, boolean quickCheck)
           
protected  IFile getLeastRecentlyChangedFile(List deletedList)
           
 String getMountPathFor(String hostname, String remotePath)
          Return the path to use on the system (i.e.
 ISystemMountPathMapper getMountPathMapperFor(String hostname, String remotePath)
          Return the appropriate registered mapper for a host & path
 IProject getRemoteEditProject()
          Get the project that in which all folders and files are held temporarily for remote editing.
 String getRemoteEditProjectAbsolutePath()
          Get the absolute path of the project used for remote editing
 IPath getRemoteEditProjectLocation()
          Get the location of the project used for remote editing
 String getWorkspacePathFor(String hostname, String remotePath)
          Return the path to use relative to the hostname in the RemoteSystemsTempFiles project for saving a local replica
 boolean isFileInUse(IFile fileToDelete, boolean quickCheck)
           
 void refreshRemoteEditContainer(IContainer parent)
          Refresh the remote edit project
 void refreshRemoteEditProject()
          Refresh the remote edit project
protected  void registerMountPathMappers()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

REMOTE_EDIT_PROJECT_NAME

public static final String REMOTE_EDIT_PROJECT_NAME
See Also:
Constant Field Values

REMOTE_EDIT_PROJECT_NATURE_ID

public static final String REMOTE_EDIT_PROJECT_NATURE_ID
See Also:
Constant Field Values

REMOTE_EDIT_PROJECT_BUILDER_ID

public static final String REMOTE_EDIT_PROJECT_BUILDER_ID
See Also:
Constant Field Values
Method Detail

getDefault

public static SystemRemoteEditManager getDefault()
Get the singleton instance


getActualHostFor

public String getActualHostFor(String hostname,
                               String remotePath)
Return the hostname that corresponds to the resource specified on the host specified. If the resource is actually on the specified host, then the result will be the same as hostname. If the resource is mounted then a mount path mapper has the opportunity to return the actual host.

Parameters:
hostname - the system on which a resource is obtained (may contain the file via a mount)
remotePath - the path on the host where the resource is obtained
Returns:
the actual host where the resource exists

getMountPathFor

public String getMountPathFor(String hostname,
                              String remotePath)
Return the path to use on the system (i.e. Windows) for saving from the workspace to remote

Parameters:
hostname - the remote host
remotePath - the file path on the remote host
Returns:
the system path

getWorkspacePathFor

public String getWorkspacePathFor(String hostname,
                                  String remotePath)
Return the path to use relative to the hostname in the RemoteSystemsTempFiles project for saving a local replica

Parameters:
hostname - the originating remote host
remotePath - the file path on the system (i.e. Windows)
Returns:
the relative replica path

getMountPathMapperFor

public ISystemMountPathMapper getMountPathMapperFor(String hostname,
                                                    String remotePath)
Return the appropriate registered mapper for a host & path

Parameters:
hostname -
remotePath -
Returns:
appropriate mapper

registerMountPathMappers

protected void registerMountPathMappers()

doesRemoteEditProjectExist

public boolean doesRemoteEditProjectExist()
Check if a remote edit project exists

Returns:
true if it does

getRemoteEditProject

public IProject getRemoteEditProject()
Get the project that in which all folders and files are held temporarily for remote editing. Create the project if it doesn't exist already, and opens it if it is not already open.

Returns:
the project where all files should be stored during remote edit.

addJavaSupport

public void addJavaSupport(IProject editProject)

getRemoteEditProjectLocation

public IPath getRemoteEditProjectLocation()
Get the location of the project used for remote editing


getRemoteEditProjectAbsolutePath

public String getRemoteEditProjectAbsolutePath()
Get the absolute path of the project used for remote editing


caculateCacheSize

protected int caculateCacheSize()

getLeastRecentlyChangedFile

protected IFile getLeastRecentlyChangedFile(List deletedList)

getEditableFor

public ISystemEditableRemoteObject getEditableFor(IFile fileToDelete,
                                                  boolean quickCheck)

isFileInUse

public boolean isFileInUse(IFile fileToDelete,
                           boolean quickCheck)

cleanupCache

protected void cleanupCache()

refreshRemoteEditProject

public void refreshRemoteEditProject()
Refresh the remote edit project


refreshRemoteEditContainer

public void refreshRemoteEditContainer(IContainer parent)
Refresh the remote edit project


Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.