Remote Systems
v6.4.1

com.ibm.etools.systems.files.importexport.files
Class Utilities

java.lang.Object
  extended bycom.ibm.etools.systems.files.importexport.files.Utilities
All Implemented Interfaces:
IRemoteImportExportConstants

public class Utilities
extends Object
implements IRemoteImportExportConstants

Contains several helper methods. A lot of these should really be provided by comm. layer, but for many reasons they were not. oh well ....


Field Summary
static String EXPORT_DESCRIPTION_EXTENSION
           
static String IMPORT_DESCRIPTION_EXTENSION
           
 
Fields inherited from interface com.ibm.etools.systems.files.importexport.IRemoteImportExportConstants
REMOTE_EXPORT_DESCRIPTION_FILE_EXTENSIONS, REMOTE_FILE_EXPORT_DESCRIPTION_FILE_EXTENSION, REMOTE_FILE_IMPORT_DESCRIPTION_FILE_EXTENSION, REMOTE_IMPORT_DESCRIPTION_FILE_EXTENSIONS, REMOTE_JAR_EXPORT_DESCRIPTION_FILE_EXTENSION
 
Constructor Summary
Utilities()
           
 
Method Summary
static void error(Exception e)
           
static String getAsString(IRemoteFile selectedDirectory)
          Use this method to get selected string from an IRemoteFile object.
static String getAsString(UniFilePlus selectedDirectory)
          Use this method to get selected string from an UniFilePlus object.
static SystemConnection getConnection(String profileName, String connectionName)
          Use this method to retrieve a SystemConnection from profile and a connectionName string.
static IRemoteFile getIRemoteFile(SystemConnection c, String path)
          Use this method to get IRemoteFile object from SystemConnection, and path
static Shell getShell()
           
static boolean isConnectionValid(String name, Shell s)
          Validate remote connection, and issue error if required.
static void logExceptionError(String msgId, Object[] subs, Throwable exception)
           
static void logExceptionError(String msgId, Throwable exception)
           
static IRemoteFile parseForIRemoteFile(String sel)
          Use this method to retrieve an IRemoteFile object from a selection string.
static String parseForPath(String sel)
          Use this method to retrieve the file path from a selection string.
static SystemConnection parseForSystemConnection(String sel)
          Use this method to retrieve a SystemConnection from a selection string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMPORT_DESCRIPTION_EXTENSION

public static final String IMPORT_DESCRIPTION_EXTENSION
See Also:
Constant Field Values

EXPORT_DESCRIPTION_EXTENSION

public static final String EXPORT_DESCRIPTION_EXTENSION
See Also:
Constant Field Values
Constructor Detail

Utilities

public Utilities()
Method Detail

getIRemoteFile

public static IRemoteFile getIRemoteFile(SystemConnection c,
                                         String path)
Use this method to get IRemoteFile object from SystemConnection, and path


getAsString

public static String getAsString(IRemoteFile selectedDirectory)
Use this method to get selected string from an IRemoteFile object.


getAsString

public static String getAsString(UniFilePlus selectedDirectory)
Use this method to get selected string from an UniFilePlus object.


isConnectionValid

public static boolean isConnectionValid(String name,
                                        Shell s)
Validate remote connection, and issue error if required.


parseForIRemoteFile

public static IRemoteFile parseForIRemoteFile(String sel)
Use this method to retrieve an IRemoteFile object from a selection string.


parseForPath

public static String parseForPath(String sel)
Use this method to retrieve the file path from a selection string.


getConnection

public static SystemConnection getConnection(String profileName,
                                             String connectionName)
Use this method to retrieve a SystemConnection from profile and a connectionName string.


parseForSystemConnection

public static SystemConnection parseForSystemConnection(String sel)
Use this method to retrieve a SystemConnection from a selection string. Should really be a part of RSE. If multiple separators ('.') are encountered will try profile names with 0,1,2,...n separators in order until a valid connection is found, or we run out of options. Not perfect, for example will never return connection C for profile one.two.three, if connection three.C for profile one.two exists. But this scheme should work fine for most practical cases. Wish RSE had chosen a separator that could not be part of valid connection name.


error

public static void error(Exception e)

getShell

public static Shell getShell()

logExceptionError

public static void logExceptionError(String msgId,
                                     Throwable exception)

logExceptionError

public static void logExceptionError(String msgId,
                                     Object[] subs,
                                     Throwable exception)

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.