RSE
Release 1.0

org.eclipse.rse.subsystems.files.core.model
Class SystemFileTransferModeRegistry

java.lang.Object
  extended byorg.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistry
All Implemented Interfaces:
IPropertyListener, ISystemFileTransferModeRegistry, ISystemFileTypes

public class SystemFileTransferModeRegistry
extends Object
implements ISystemFileTransferModeRegistry, IPropertyListener

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


Field Summary
 
Fields inherited from interface org.eclipse.rse.subsystems.files.core.model.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(IFile file)
           
 boolean isBinary(IRemoteFile remoteFile)
           
 boolean isBinary(String fileName)
           
 boolean isText(File file)
           
 boolean isText(IFile 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
 

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.

Specified by:
propertyChanged in interface IPropertyListener
See Also:
IPropertyListener.propertyChanged(Object, int)

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(IFile file)
Specified by:
isBinary in interface ISystemFileTransferModeRegistry
See Also:
ISystemFileTransferModeRegistry.isBinary(IFile)

isBinary

public boolean isBinary(IRemoteFile remoteFile)
Specified by:
isBinary in interface ISystemFileTransferModeRegistry
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(IFile file)
Specified by:
isText in interface ISystemFileTransferModeRegistry
See Also:
ISystemFileTransferModeRegistry.isText(IFile)

isText

public boolean isText(IRemoteFile remoteFile)
Specified by:
isText in interface ISystemFileTransferModeRegistry
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


RSE
Release 1.0

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