Remote Systems
v6.4.1

com.ibm.etools.systems.core
Class SystemFileTransferModeRegistry

java.lang.Object
  extended bycom.ibm.etools.systems.core.SystemFileTransferModeRegistry
All Implemented Interfaces:
ISystemFileTransferModeRegistry, ISystemFileTypes

public class SystemFileTransferModeRegistry
extends Object
implements ISystemFileTransferModeRegistry

An internal class. Clients must not instantiate or subclass it.


Field Summary
static String Copyright
           
 
Fields inherited from interface com.ibm.etools.systems.core.ISystemFileTransferModeRegistry
DEFAULT_BINARY_FILE_EXTENSIONS, DEFAULT_ISERIES_LPEX_TEXT_FILE_EXTENSIONS, DEFAULT_LPEX_TEXT_FILE_EXTENSIONS, DEFAULT_TEXT_FILE_EXTENSIONS, DEFAULT_TEXT_FILE_NAMES, DEFAULT_UNIX_LPEX_TEXT_FILE_EXTENSIONS
 
Method Summary
static SystemFileTransferModeRegistry getDefault()
          Get the singleton instance
static int getFileTransferModeDefaultPreference()
          Return whether to automatically detect, use binary or text during file transfer for unspecified file types
 SystemFileTransferModeMapping getMapping(IFileEditorMapping editorMapping)
          Get a mode mapping given a file editor mapping
 ISystemFileTransferModeMapping[] getModeMappings()
           
 boolean isBinary(File file)
           
 boolean isBinary(IRemoteFile remoteFile)
           
 boolean isBinary(String fileName)
           
 boolean isText(File file)
           
 boolean isText(IRemoteFile remoteFile)
           
 boolean isText(String fileName)
           
 boolean loadAssociations()
          Load the saved associations to the registry
 void propertyChanged(Object source, int propId)
          Listen for changes to the Editor Registry content.
 void saveAssociations()
          Save the contents of the registry
 void setModeMappings(SystemFileTransferModeMapping[] newMappings)
          Sets new mode mappings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.etools.systems.core.ISystemFileTransferModeRegistry
isBinary, isText
 

Field Detail

Copyright

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

getDefault

public static SystemFileTransferModeRegistry getDefault()
Get the singleton instance


propertyChanged

public void propertyChanged(Object source,
                            int propId)
Listen for changes to the Editor Registry content. Update our registry by changing the hashmap and saving the new mappings on disk.

See Also:
IPropertyListener

getModeMappings

public ISystemFileTransferModeMapping[] getModeMappings()
Specified by:
getModeMappings in interface ISystemFileTransferModeRegistry
See Also:
ISystemFileTransferModeRegistry.getModeMappings()

setModeMappings

public void setModeMappings(SystemFileTransferModeMapping[] newMappings)
Sets new mode mappings


isBinary

public boolean isBinary(String fileName)
Specified by:
isBinary in interface ISystemFileTypes
See Also:
ISystemFileTypes.isBinary(String)

isBinary

public boolean isBinary(File file)
Specified by:
isBinary in interface ISystemFileTypes
See Also:
ISystemFileTypes.isBinary(File)

isBinary

public boolean isBinary(IRemoteFile remoteFile)
See Also:
ISystemFileTransferModeRegistry#isBinary(IRemoteFile)

isText

public boolean isText(String fileName)
Specified by:
isText in interface ISystemFileTypes
See Also:
ISystemFileTypes.isText(String)

isText

public boolean isText(File file)
Specified by:
isText in interface ISystemFileTypes
See Also:
ISystemFileTypes.isText(File)

isText

public boolean isText(IRemoteFile remoteFile)
See Also:
ISystemFileTransferModeRegistry#isText(IRemoteFile)

getMapping

public SystemFileTransferModeMapping getMapping(IFileEditorMapping editorMapping)
Get a mode mapping given a file editor mapping


getFileTransferModeDefaultPreference

public static int getFileTransferModeDefaultPreference()
Return whether to automatically detect, use binary or text during file transfer for unspecified file types


loadAssociations

public boolean loadAssociations()
Load the saved associations to the registry

Returns:
true if operation successful, false otherwise

saveAssociations

public void saveAssociations()
Save the contents of the registry


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.