RSE
Release 3.3

org.eclipse.rse.subsystems.files.core.subsystems
Class RemoteFileSubSystemConfiguration

java.lang.Object
  extended by org.eclipse.rse.core.subsystems.SubSystemConfiguration
      extended by org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration
All Implemented Interfaces:
IAdaptable, ISystemFilterPoolManagerProvider, IRSEPersistableContainer, ISubSystemConfiguration, IRemoteFileSubSystemConfiguration
Direct Known Subclasses:
FileServiceSubSystemConfiguration

public abstract class RemoteFileSubSystemConfiguration
extends SubSystemConfiguration
implements IRemoteFileSubSystemConfiguration

Specialization for file subsystem configurations. It is best used by subclassing FileServiceSubSystemConfiguration.

See Also:
RemoteFileSubSystem

Field Summary
protected  String translatedType
           
protected  boolean unixStyle
           
 
Fields inherited from class org.eclipse.rse.core.subsystems.SubSystemConfiguration
currentlyProcessingConnection, currentlyProcessingSubSystemConfiguration, currentlySelected, currentlySelectedConnection, filterPoolManagerList, filterPoolManagers, filterPoolManagersPerProfile, subSystemList
 
Fields inherited from interface org.eclipse.rse.core.subsystems.ISubSystemConfiguration
FORCE_INTO_MEMORY, LAZILY
 
Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer
NO_CHILDREN
 
Constructor Summary
RemoteFileSubSystemConfiguration()
          Constructor
 
Method Summary
protected  ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
          Override from parent.
 ISubSystem createSubSystemInternal(IHost conn)
          Instantiate and return an instance of OUR subystem.
 String getEditorProfileID()
          Return the default remote systems editor profile ID for files on this subsystem
 ISystemValidator getFileFilterStringValidator()
          Return validator used in filter string dialog for the file part of the filter string By default, returns ValidatorFileFilterString.
 ValidatorFileName getFileNameValidator()
          Return validator used when creating or renaming files
 ValidatorFolderName getFolderNameValidator()
          Return validator used when creating or renaming folders
 String getLineSeparator()
          Return as a string the line separator.
 String getPathSeparator()
          Return in string format the character used to separate paths.
 char getPathSeparatorChar()
          Return in char format the character used to separate paths.
 ISystemValidator getPathValidator()
          Return validator used in filter string dialog for the path part of the filter string.
 String getSeparator()
          Return in string format the character used to separate folders.
 char getSeparatorChar()
          Return in character format the character used to separate folders.
 String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
          Return the translated string to show in the property sheet for the type property.
protected  void initializeSubSystem(ISubSystem ss, ISubSystemConfigurator[] configurators)
          Populate a new subsystem with our unique attributes, and/or create default filter references.
 boolean isCaseSensitive()
          Tell us if this file system is case sensitive.
 boolean isFactoryFor(Class subSystemType)
          Determines whether this factory is responsible for the creation of subsytems of the specified type Subsystem factories should override this to indicate which subsystems they support.
 boolean isUnixStyle()
          Tell us if this is a unix-style file system or a windows-style file system.
 boolean providesCustomDropInFilters()
          Indicates that a drop on a filter will be handled as a copy by the file subsystem rather than having a filter update.
protected  void recursivelyUpdateIFileProperties(String newName, IFolder container)
           
 void renameSubSystemProfile(String oldProfileName, String newProfileName)
          Callback method called after renaming a subsystem profile.
protected  void setIsUnixStyle(boolean isUnixStyle)
          Tell us if this is a unix-style file system or a windows-style file system.
 boolean supportsDropInFilters()
          Return true if filters of this subsystem factory support dropping into.
 boolean supportsEnvironmentVariablesPropertyPage()
          Return true if subsystems of this factory support the environment variables property.
 boolean supportsFileTypes()
          Return true if you support user-defined/managed named file types We return true
 boolean supportsSearch()
          By default this returns true.
 boolean supportsTargets()
          Tell us if this subsystem factory supports targets, which are destinations for pushes and builds.
 
Methods inherited from class org.eclipse.rse.core.subsystems.SubSystemConfiguration
addFilterPoolManager, addSubSystem, beginRestore, changingSystemProfileActiveStatus, cloneEvent, cloneSubSystem, commit, copyFilterPoolManager, copySubSystemData, createEvent, createEvent, createEvent, createServerLauncher, createSubSystem, createSubSystemAfterTheFact, deleteFilterPoolManager, deleteSubSystem, deleteSubSystemsByConnection, deletingSystemProfile, disconnectAllSubSystems, doPostRestoreProcessing, endRestore, filterEventFilterCreated, filterEventFilterDeleted, filterEventFilterPoolCreated, filterEventFilterPoolDeleted, filterEventFilterPoolRenamed, filterEventFilterPoolsRePositioned, filterEventFilterRenamed, filterEventFiltersRePositioned, filterEventFilterStringCreated, filterEventFilterStringDeleted, filterEventFilterStringsRePositioned, filterEventFilterStringUpdated, filterEventFilterUpdated, fireEvent, fireEvent, fireEvent, fireSubSystemEvent, fireSubSystemEvent, fireSubSystemEvent, fireSubSystemFilterEvent, fireSubSystemFilterEvent, fireSubSystemFilterEvent, fireSubSystemFilterEvent, fireSubSystemFilterEvent, fireSubSystemFilterEvent, getActiveFilterPoolManagers, getAdapter, getAllSystemFilterPoolManagers, getCategory, getConnectingMessage, getConnectorService, getDefaultFilterPool, getDefaultFilterPoolName, getDefaultSystemFilterPool, getDefaultSystemFilterPool, getDescription, getDisconnectingMessage, getFilterPool, getFilterPoolManager, getFilterPoolManager, getFilterPoolManager, getFilterPoolManager, getFilterPoolManager, getFilterPoolManager, getFilterPoolManagerList, getFilterPoolManagerName, getFilterPoolManagers, getFilterPools, getId, getName, getNewFilterWizardPoolWrapperInformation, getPersistableChildren, getPersistableParent, getReferencableSystemFilterPoolManagers, getService, getServiceImplType, getServiceType, getSubSystemConfigurationProxy, getSubSystemList, getSubSystems, getSubSystems, getSubSystems, getSubSystems, getSystemFilterPoolForBrokenReference, getSystemFilterPoolManager, getSystemFilterPoolManagers, getSystemProfile, getSystemProfile, getSystemProfile, getSystemProfile, getSystemProfileName, getSystemTypes, getVendor, handleException, internalGetSubSystemName, internalGetSubSystems, invalidateFilterCache, invalidateSubSystemCache, isDirty, isPortEditable, isSubSystemsDeletable, isTainted, isUserPrivateProfile, needsUpdate, preTestRenameSubSystemProfile, removeSubSystem, renameFilterPoolManager, renameSubSystem, renameSubSystemProfile, renameSubSystemsByConnection, reset, saveFilterPools, saveFilterPools, saveSubSystem, saveSubSystems, saveSubSystems, setConnection, setConnectorService, setCurrentSelection, setDirty, setShowFilterPools, setSubSystemConfigurationProxy, setSubSystemPort, setSubSystemUserId, setTainted, setWasRestored, showChangeFilterStringsPropertyPage, showFilterPools, showGenericShowInTableOnFilter, showRefreshOnFilter, subSystemsHaveBeenRestored, supportsCommands, supportsDeferredQueries, supportsDuplicateFilterStrings, supportsEncoding, supportsFilterCaching, supportsFilterChildren, supportsFilters, supportsFilterStringExport, supportsMultipleFilterStrings, supportsMultiStringFilters, supportsNestedFilters, supportsProperties, supportsQuickFilters, supportsServerLaunchProperties, supportsServerLaunchType, supportsSubSystemConnect, testForActiveReferences, toString, updateSubSystem, wasRestored
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration
supportsArchiveManagement
 
Methods inherited from interface org.eclipse.rse.core.subsystems.ISubSystemConfiguration
changingSystemProfileActiveStatus, cloneSubSystem, commit, copyFilterPoolManager, createServerLauncher, createSubSystem, createSubSystemAfterTheFact, deleteSubSystem, deleteSubSystemsByConnection, deletingSystemProfile, disconnectAllSubSystems, getAllSystemFilterPoolManagers, getCategory, getConnectorService, getDefaultFilterPool, getDefaultSystemFilterPool, getDescription, getFilterPoolManager, getFilterPoolManager, getFilterPoolManagerList, getId, getName, getService, getServiceImplType, getServiceType, getSubSystemConfigurationProxy, getSubSystemList, getSubSystems, getSubSystems, getSystemProfile, getSystemProfile, getSystemTypes, getVendor, isPortEditable, isSubSystemsDeletable, preTestRenameSubSystemProfile, renameFilterPoolManager, renameSubSystem, renameSubSystemProfile, renameSubSystemsByConnection, reset, saveSubSystem, setConnection, setConnectorService, setCurrentSelection, setShowFilterPools, setSubSystemConfigurationProxy, setSubSystemPort, setSubSystemUserId, showChangeFilterStringsPropertyPage, showFilterPools, showGenericShowInTableOnFilter, showRefreshOnFilter, supportsCommands, supportsDeferredQueries, supportsEncoding, supportsFilterCaching, supportsFilterChildren, supportsFilters, supportsFilterStringExport, supportsMultipleFilterStrings, supportsMultiStringFilters, supportsNestedFilters, supportsProperties, supportsQuickFilters, supportsServerLaunchProperties, supportsServerLaunchType, supportsSubSystemConnect, testForActiveReferences, updateSubSystem
 
Methods inherited from interface org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider
filterEventFilterCreated, filterEventFilterDeleted, filterEventFilterPoolCreated, filterEventFilterPoolDeleted, filterEventFilterPoolRenamed, filterEventFilterPoolsRePositioned, filterEventFilterRenamed, filterEventFiltersRePositioned, filterEventFilterStringCreated, filterEventFilterStringDeleted, filterEventFilterStringsRePositioned, filterEventFilterStringUpdated, filterEventFilterUpdated, getReferencableSystemFilterPoolManagers, getSystemFilterPoolForBrokenReference, getSystemFilterPoolManager, getSystemFilterPoolManagers
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer
getPersistableChildren, getPersistableParent, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored
 

Field Detail

unixStyle

protected boolean unixStyle

translatedType

protected String translatedType
Constructor Detail

RemoteFileSubSystemConfiguration

public RemoteFileSubSystemConfiguration()
Constructor

Method Detail

setIsUnixStyle

protected void setIsUnixStyle(boolean isUnixStyle)
Tell us if this is a unix-style file system or a windows-style file system. The default is windows. Child classes must call this, so we know how to respond to separator and path-separator requests.


isUnixStyle

public boolean isUnixStyle()
Tell us if this is a unix-style file system or a windows-style file system. The default is windows. Child classes must call this, so we know how to respond to separator and path-separator requests.

Specified by:
isUnixStyle in interface IRemoteFileSubSystemConfiguration

isCaseSensitive

public boolean isCaseSensitive()
Tell us if this file system is case sensitive. The default is isUnixStyle(), and so should rarely need to be overridden.

Specified by:
isCaseSensitive in interface ISubSystemConfiguration
Specified by:
isCaseSensitive in interface IRemoteFileSubSystemConfiguration
Overrides:
isCaseSensitive in class SubSystemConfiguration

supportsTargets

public boolean supportsTargets()
Tell us if this subsystem factory supports targets, which are destinations for pushes and builds. Normally only true for file system factories.

We return true.

Specified by:
supportsTargets in interface ISubSystemConfiguration
Overrides:
supportsTargets in class SubSystemConfiguration

supportsEnvironmentVariablesPropertyPage

public boolean supportsEnvironmentVariablesPropertyPage()
Return true if subsystems of this factory support the environment variables property. Return true to show it, return false to hide it. We return true.

Specified by:
supportsEnvironmentVariablesPropertyPage in interface IRemoteFileSubSystemConfiguration

supportsSearch

public boolean supportsSearch()
By default this returns true. Override if the file subsystem does not support search.

Specified by:
supportsSearch in interface IRemoteFileSubSystemConfiguration
Returns:
true if search is supported

getPathValidator

public ISystemValidator getPathValidator()
Return validator used in filter string dialog for the path part of the filter string. By default, returns ValidatorPathName which does very limited checking. Override as appropriate.

Specified by:
getPathValidator in interface IRemoteFileSubSystemConfiguration

getFileFilterStringValidator

public ISystemValidator getFileFilterStringValidator()
Return validator used in filter string dialog for the file part of the filter string By default, returns ValidatorFileFilterString. Override as appropriate.

Specified by:
getFileFilterStringValidator in interface IRemoteFileSubSystemConfiguration

getFileNameValidator

public ValidatorFileName getFileNameValidator()
Return validator used when creating or renaming files

Specified by:
getFileNameValidator in interface IRemoteFileSubSystemConfiguration

getFolderNameValidator

public ValidatorFolderName getFolderNameValidator()
Return validator used when creating or renaming folders

Specified by:
getFolderNameValidator in interface IRemoteFileSubSystemConfiguration

getSeparator

public String getSeparator()
Return in string format the character used to separate folders. Eg, "\" or "/"

Specified by:
getSeparator in interface IRemoteFileSubSystemConfiguration

getSeparatorChar

public char getSeparatorChar()
Return in character format the character used to separate folders. Eg, "\" or "/"

Specified by:
getSeparatorChar in interface IRemoteFileSubSystemConfiguration

getPathSeparator

public String getPathSeparator()
Return in string format the character used to separate paths. Eg, ";" or ":"

Specified by:
getPathSeparator in interface IRemoteFileSubSystemConfiguration

getPathSeparatorChar

public char getPathSeparatorChar()
Return in char format the character used to separate paths. Eg, ";" or ":"

Specified by:
getPathSeparatorChar in interface IRemoteFileSubSystemConfiguration

getLineSeparator

public String getLineSeparator()
Return as a string the line separator.

Specified by:
getLineSeparator in interface IRemoteFileSubSystemConfiguration

supportsDropInFilters

public boolean supportsDropInFilters()
Return true if filters of this subsystem factory support dropping into.

Specified by:
supportsDropInFilters in interface ISubSystemConfiguration
Overrides:
supportsDropInFilters in class SubSystemConfiguration

providesCustomDropInFilters

public boolean providesCustomDropInFilters()
Indicates that a drop on a filter will be handled as a copy by the file subsystem rather than having a filter update.

Specified by:
providesCustomDropInFilters in interface ISubSystemConfiguration
Overrides:
providesCustomDropInFilters in class SubSystemConfiguration

supportsFileTypes

public boolean supportsFileTypes()
Return true if you support user-defined/managed named file types

We return true

Specified by:
supportsFileTypes in interface ISubSystemConfiguration
Overrides:
supportsFileTypes in class SubSystemConfiguration

renameSubSystemProfile

public void renameSubSystemProfile(String oldProfileName,
                                   String newProfileName)
Description copied from interface: ISubSystemConfiguration
Callback method called after renaming a subsystem profile.

This is called by SystemRegistry's renameSystemProfile method after it is complete, , in order to allow the subsystem configuration perform any required cleanup. For instance, subsystem configurations must ensure that they update their filter pool manager names (and their folders).

Must be called AFTER changing the profile's name!!

Specified by:
renameSubSystemProfile in interface ISubSystemConfiguration
Overrides:
renameSubSystemProfile in class SubSystemConfiguration
Parameters:
oldProfileName - the old profile name.
newProfileName - the new profile name.

recursivelyUpdateIFileProperties

protected void recursivelyUpdateIFileProperties(String newName,
                                                IFolder container)

createDefaultFilterPool

protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
Override from parent.

Here we create the default filter pool for this subsystem factory, and populate it with default filters.

This is overridden for local, windows and ifs file subsystem factories, so what we default here applies to Unix and Linux only.

Overrides:
createDefaultFilterPool in class SubSystemConfiguration

getTranslatedFilterTypeProperty

public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
Return the translated string to show in the property sheet for the type property.

Specified by:
getTranslatedFilterTypeProperty in interface ISubSystemConfiguration
Overrides:
getTranslatedFilterTypeProperty in class SubSystemConfiguration

createSubSystemInternal

public ISubSystem createSubSystemInternal(IHost conn)
Instantiate and return an instance of OUR subystem. Do not populate it yet though! Eg:

        SubSystem subsys = ((AcmesubsysFactoryImpl)factory).createAcmeSubSystem();
        return subsys;
 
noteThis method should be abstract but MOF doesn't allow abstract impl classes at this point

Specified by:
createSubSystemInternal in interface ISubSystemConfiguration
Specified by:
createSubSystemInternal in class SubSystemConfiguration
See Also:
SubSystemConfiguration.createSubSystemInternal(IHost)

initializeSubSystem

protected void initializeSubSystem(ISubSystem ss,
                                   ISubSystemConfigurator[] configurators)
Populate a new subsystem with our unique attributes, and/or create default filter references.

Overrides:
initializeSubSystem in class SubSystemConfiguration
Parameters:
ss - - The subsystem that was created via createSubSystemInternal
configurators - an array of ISubSystemConfigurator used to inject values into this subsystem or null if there are none. Used to take ISystemNewConnectionWizardPage[] before RSE 3.0

getEditorProfileID

public String getEditorProfileID()
Return the default remote systems editor profile ID for files on this subsystem

Specified by:
getEditorProfileID in interface IRemoteFileSubSystemConfiguration

isFactoryFor

public boolean isFactoryFor(Class subSystemType)
Determines whether this factory is responsible for the creation of subsytems of the specified type Subsystem factories should override this to indicate which subsystems they support.

Specified by:
isFactoryFor in interface ISubSystemConfiguration
Overrides:
isFactoryFor in class SubSystemConfiguration
Parameters:
subSystemType - type of subsystem
Returns:
whether this factory is for the specified subsystemtype

RSE
Release 3.3

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