Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.core.subsystems
Class SubSystemConfiguration

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

public abstract class SubSystemConfiguration
extends Object
implements ISubSystemConfiguration

Abstract base class for subsystem configuration extension points. Child classes must implement the methods:

  • #createSubSystemInternal(SystemConnection conn)
Child classes can optionally override:
  • SubSystemConfiguration#supportsFilters() to indicate if filters are to be enabled for this subsystem configuration
  • SubSystemConfiguration#supportsNestedFilters() to indicate if filters can exist inside filters.
  • SubSystemConfiguration#supportsDuplicateFilterStrings() to indicate if filter strings can be duplicated within a filter
  • SubSystemConfiguration#isCaseSensitive() to indicate if filter strings are case sensitive or not
  • SubSystemConfiguration#supportsQuickFilters() to indicate if filters can be specified at contain expansion time.
  • SubSystemConfiguration#supportsUserActions() to indicate if users can define their own actions for your subsystems' child objects.
  • SubSystemConfiguration#supportsFileTypes() to indicate if users can define their own named file types.
  • SubSystemConfiguration#isSubSystemsDeletable() if they support user-deleting of subsystems. Default is false.
  • SubSystemConfiguration#supportsSubSystemConnect() to return false if the connect() action is not supported
  • SubSystemConfiguration#supportsTargets() to return true if this subsystem configuration supports the notions of targets. Normally, this is only for file system factories.
  • SubSystemConfiguration#getSubSystemActions() if they wish to supply actions for the right-click menu when the user right clicks on a subsystem object created by this subsystem configuration.
  • CreateDefaultFilterPool() to create any default filter pool when a new profile is created.
  • #initializeSubSystem(SubSystem ss, configurarators[])

A subsystem configuration will maintain in memory a list of all subsystem objects it has. This list should be initialized from disk at restore time, and maintained as the subsystems are created and deleted throughout the session. At save time, each subsystem in the list is asked to save itself. The getSubSystems method should return this list.

To help with maintaining this list, this base class contains a List instance variable named subsystems. It is returned by the getSubSystems method in this base class. For this to be accurate you though, you should:

  • Not implement createSubSystem directly, but rather let this class handle it. Instead implement the method createSubSystemInternal. This is called by createSubSystem in this class.
Should you prefer to maintain your own list, simply override getSubSystems.


Field Summary
protected static  IHost currentlyProcessingConnection
           
protected static  SubSystemConfiguration currentlyProcessingSubSystemConfiguration
           
protected   Object[] currentlySelected
           
protected   IHost currentlySelectedConnection
           
protected   List filterPoolManagerList
          Internal list of filter pool managers.
protected   ISystemFilterPoolManager[] filterPoolManagers
           
protected   Hashtable filterPoolManagersPerProfile
           
protected   List subSystemList
          Internal list of subsystems.
 
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
SubSystemConfiguration ()
          Constructor
 
Method Summary
protected  void addFilterPoolManager ( ISystemProfile profile, ISystemFilterPoolManager mgr)
          Add the given filter pool manager object to internal lists
protected  void addSubSystem ( ISubSystem subsys)
          Helper method to allow child classes to add a subsystem object to the in-memory list maintained and returned by this base class.
 void beginRestore ()
           
 void changingSystemProfileActiveStatus ( ISystemProfile profile, boolean newStatus)
          Called by SystemRegistry when we have toggled the active-status of a profile
protected   SystemResourceChangeEvent cloneEvent ( SystemResourceChangeEvent event, Object parent)
           
  ISubSystem cloneSubSystem ( ISubSystem oldSubsystem, IHost newConnection, boolean copyProfileOperation)
          Clone a given subsystem into the given connection.
 boolean commit ()
          Saves absolutely everything to disk.
  ISystemFilterPoolManager copyFilterPoolManager ( ISystemProfile oldProfile, ISystemProfile newProfile)
          Copy the filter pool manager and return a new one.
protected  void copySubSystemData ( ISubSystem oldSubSystem, ISubSystem newSubSystem)
          Copy unique subsystem data after a copy operation.
protected   ISystemFilterPool createDefaultFilterPool ( ISystemFilterPoolManager mgr)
          Overridable lifecycle method.
protected   SystemResourceChangeEvent createEvent ( Object[] src, int eventId, Object parent)
          Helper method to create a multi-source event
protected   SystemResourceChangeEvent createEvent ( Object[] src, int eventId, Object parent, int delta)
          Helper method to create a multi-source event
protected   SystemResourceChangeEvent createEvent ( Object src, int eventId, Object parent)
          Helper method to create a single-source event
  IServerLauncherProperties createServerLauncher ( IConnectorService connectorService)
          Overridable entry for child classes to contribute a server launcher instance for a given subsystem.
  ISubSystem createSubSystem ( IHost conn, boolean creatingConnection, ISubSystemConfigurator[] configurators)
          Creates a new subsystem instance that is associated with the given connection object.
  ISubSystem createSubSystemAfterTheFact ( IHost conn)
           
abstract   ISubSystem createSubSystemInternal ( IHost conn)
          Method called by default implementation of createSubSystem method in AbstractSubSystemConfiguration.
protected  void deleteFilterPoolManager ( ISystemProfile profile)
          Delete the filter pool manager associated with the given profile
 boolean deleteSubSystem ( ISubSystem subsystem)
          Deletes a given subsystem instance from the list maintained by this subsystem configuration.
 void deleteSubSystemsByConnection ( IHost conn)
          Called by SystemRegistry's deleteConnection method to ensure we delete all our subsystems for a given connection.
 void deletingSystemProfile ( ISystemProfile profile)
          Called by SystemRegistry when we are about to delete a profile.
 void disconnectAllSubSystems ()
          Disconnect all subsystems currently connected.
protected  boolean doPostRestoreProcessing ( ISystemFilterPoolManager restoredFilterPoolMgr)
          Do post-restore-processing of an existing filter pool manager.
 void endRestore ()
           
 void filterEventFilterCreated ( ISystemFilter newFilter)
          A new filter has been created
 void filterEventFilterDeleted ( ISystemFilter oldFilter)
          A filter has been deleted
 void filterEventFilterPoolCreated ( ISystemFilterPool newPool)
          A new filter pool has been created
 void filterEventFilterPoolDeleted ( ISystemFilterPool oldPool)
          A filter pool has been deleted
 void filterEventFilterPoolRenamed ( ISystemFilterPool pool, String oldName)
          A filter pool has been renamed
 void filterEventFilterPoolsRePositioned ( ISystemFilterPool[] pools, int delta)
          One or more filter pools have been re-ordered within their manager
 void filterEventFilterRenamed ( ISystemFilter filter, String oldName)
          A filter has been renamed
 void filterEventFiltersRePositioned ( ISystemFilter[] filters, int delta)
          One or more filters have been re-ordered within their pool or filter (if nested)
 void filterEventFilterStringCreated ( ISystemFilterString newFilterString)
          A new filter string has been created
 void filterEventFilterStringDeleted ( ISystemFilterString oldFilterString)
          A filter string has been deleted
 void filterEventFilterStringsRePositioned ( ISystemFilterString[] filterStrings, int delta)
          One or more filters have been re-ordered within their filter
 void filterEventFilterStringUpdated ( ISystemFilterString filterString)
          A filter string has been updated
 void filterEventFilterUpdated ( ISystemFilter filter)
          A filter's strings have been updated
protected  void fireEvent ( Object[] multiSrc, int eventId, Object parent, int delta)
          Helper method to create and then fire an event with a position or delta...
protected  void fireEvent ( Object src, int eventId, Object parent)
          Helper method to create and then fire an event...
protected  void fireEvent ( SystemResourceChangeEvent event)
          Helper method to fire an event...
protected  void fireSubSystemEvent ( SystemResourceChangeEvent event)
          Fire given event to all currently known subsystems
protected  void fireSubSystemEvent ( SystemResourceChangeEvent event, ISubSystem subsystem)
          Fire given event to the given subsystem
protected  void fireSubSystemEvent ( SystemResourceChangeEvent event, ISystemProfile profile)
          Fire given event to all subsystems in the given profile
protected  void fireSubSystemFilterEvent (int eventId, ISystemFilter filter)
          Fire an event of a given id to subsystems that hold a reference to the given filter
protected  void fireSubSystemFilterEvent (int eventId, ISystemFilter[] filters)
          Fire an event of a given id to subsystems that hold a reference to the given filter
protected  void fireSubSystemFilterEvent (int eventId, ISystemFilterString filterString)
           
protected  void fireSubSystemFilterEvent (int eventId, ISystemFilterString[] filterStrings, int delta)
           
protected  void fireSubSystemFilterEvent ( SystemResourceChangeEvent event, ISystemFilter filter)
          Fire an event of a given id to subsystems that hold a reference to the given filter
protected  void fireSubSystemFilterEvent ( SystemResourceChangeEvent event, ISystemFilterString filterString)
           
  ISystemFilterPoolManager[] getActiveFilterPoolManagers ()
          Get the filter pool managers for the active profiles.
  Object getAdapter ( Class adapterType)
           
  ISystemFilterPoolManager[] getAllSystemFilterPoolManagers ()
          Get all the filter pool managers for all the profiles, active or not.
  String getCategory ()
          Return the category this subsystem configuration subscribes to.
static  String getConnectingMessage ( String hostName, int port)
          Helper method to return the message "Connecting to &1..."
  IConnectorService getConnectorService ( IHost host)
          Get the connector service for a particular host. This default implementation returns null.
  ISystemFilterPool getDefaultFilterPool ( ISystemProfile profile, String oldProfileName)
          Return the default filter pool for the given profile...
static  String getDefaultFilterPoolName ( String profileName, String factoryId)
          Return the translated name of a default filter pool for a given profile
  ISystemFilterPool getDefaultSystemFilterPool ( ISubSystem subsys)
          Given a subsystem, return the first (hopefully only) default pool for this subsystem's profile.
  ISystemFilterPool getDefaultSystemFilterPool ( ISystemProfile profile)
          Given a profile, return the first (hopefully only) default pool for this profile.
  String getDescription ()
          Return name of this subsystem configuration.
static  String getDisconnectingMessage ( String hostName, int port)
          Helper method to return the message "Disconnecting from &1..."
  ISystemFilterPool getFilterPool ( ISystemProfile profile, String name)
          Returns a filter pool, given its profile and pool name
protected   ISystemFilterPoolManager getFilterPoolManager ( IHost conn)
          Get the filter pool manager for the given connection
protected   ISystemFilterPoolManager getFilterPoolManager ( ISystemFilterContainer poolOrFilter)
          Get the filter pool manager for the given filter pool or filter
protected   ISystemFilterPoolManager getFilterPoolManager ( ISystemFilterContainerReference poolOrFilterReference)
          Get the filter pool manager for the given reference to a filter pool or filter
protected   ISystemFilterPoolManager getFilterPoolManager ( ISystemFilterPool pool)
          Get the filter pool manager for the given filter pool
  ISystemFilterPoolManager getFilterPoolManager ( ISystemProfile profile)
          Get the filter pool manager for the given profile.
  ISystemFilterPoolManager getFilterPoolManager ( ISystemProfile profile, boolean force)
          Get the filter pool manager for the given profile.
  List getFilterPoolManagerList ()
          Return the internal list of filter pool managers associated with this configuration.
protected   String getFilterPoolManagerName ( ISystemProfile profile)
          Return the name of the filter pool manager, given the profile.
  ISystemFilterPoolManager[] getFilterPoolManagers ()
          Return an array of all filter pool managers owned by this subsystem configuration.
  ISystemFilterPool[] getFilterPools ( ISystemProfile profile)
          Returns an array of filter pool objects within a profile.
  String getId ()
          Return unique id of this subsystem configuration.
  String getName ()
          Return name of this subsystem configuration.
protected   ISystemFilterPoolWrapperInformation getNewFilterWizardPoolWrapperInformation ()
          Overridable entry for child classes to supply their own flavor of ISystemFilterPoolWrapperInformation for the new filter wizards.
  IRSEPersistableContainer[] getPersistableChildren ()
          Retrieves the children of this object in the persistence containment hierarchy.
  IRSEPersistableContainer getPersistableParent ()
          Subsystem configurations are not persisted.
  ISystemFilterPoolManager[] getReferencableSystemFilterPoolManagers ( ISystemFilterPoolReferenceManager refMgr)
          Return all the manager objects this provider owns, to which it wants to support referencing from the given filter reference manager.
  IService getService ( IHost host)
          Get the actual service associated with a particular host. This default implementation returns null.
  Class getServiceImplType ()
          Get the implementation type of the service associated with this subsystem configuration. This default implementation returns null.
  Class getServiceType ()
          Get the service type associated with this subsystem configuration. This default implementation returns null.
  ISubSystemConfigurationProxy getSubSystemConfigurationProxy ()
          The following is here for completeness but should never be needed.
  List getSubSystemList ()
          Return the internal list of subsystems instantiated for this configuration.
  ISubSystem[] getSubSystems (boolean force)
          Return list of all subsystems.
  ISubSystem[] getSubSystems ( IHost conn, boolean force)
          Returns a list of subsystem objects existing for the given connection.
  ISubSystem[] getSubSystems ( ISystemFilterPool pool)
          Returns a list of subsystem objects existing in memory, which contain a reference to the given filter pool.
  ISubSystem[] getSubSystems ( ISystemProfile profile)
          Returns a list of subsystem objects existing for all the connections in the given profile.
  ISystemFilterPool getSystemFilterPoolForBrokenReference ( ISystemFilterPoolReferenceManager callingRefMgr, String missingPoolMgrName, String missingPoolName)
          Last chance call, by a filter pool reference manager, when a reference to a filter pool is found but the referenced master filter pool is not found in those the reference manager by getSystemFilterPoolManagers().
  ISystemFilterPoolManager getSystemFilterPoolManager ( String mgrName)
          Get the filter pool manager for the given profile.
  ISystemFilterPoolManager[] getSystemFilterPoolManagers ()
          Get the filter pool manager for the given profile.
protected   ISystemProfile getSystemProfile ( ISystemFilter filter)
          Get a profile object given a filter object
  ISystemProfile getSystemProfile ( ISystemFilterPool pool)
          Get owning profile object given a filter pool object
protected   ISystemProfile getSystemProfile ( ISystemFilterPoolManager poolMgr)
          Get a profile object given a filter pool manager object
  ISystemProfile getSystemProfile ( String name)
          Get a profile object given its name
protected   String getSystemProfileName ( ISystemFilterPoolManager manager)
          Return the name of the profile, given the filter pool manager
  IRSESystemType[] getSystemTypes ()
          Return the system types this subsystem configuration supports.
  String getTranslatedFilterTypeProperty ( ISystemFilter selectedFilter)
          Return the translated string to show in the property sheet for the type property.
  String getVendor ()
          Return vendor of this subsystem configuration.
protected  void handleException ( String msg, Exception exc)
           
protected  void initializeSubSystem ( ISubSystem ss, ISubSystemConfigurator[] configurators)
          Initialize subsystems after creation (Overridable).
protected   String internalGetSubSystemName ( ISubSystem subsys)
          Overridable.
protected   ISubSystem[] internalGetSubSystems ( IHost conn)
          Private method to subset master list of all subsystems by a given connection
 void invalidateFilterCache ()
          Invalidate any internal caches related to filters
protected  void invalidateSubSystemCache ( IHost conn)
          Invalidate internal cached array of subsystems.
 boolean isCaseSensitive ()
          Tell us if filter strings are case sensitive.
 boolean isDirty ()
          Subsystem configurations are never persisted.
 boolean isFactoryFor ( Class subSystemType)
          Determines whether this subsystem configuration is responsible for the creation of subsystems of the specified type Subsystem factories should override this to indicate which subsystems they support.
 boolean isPortEditable ()
          Return true (default) or false to indicate if subsystems of this subsystem configuration support user-editable port numbers.
 boolean isSubSystemsDeletable ()
          Returns true if this subsystem configuration allows users to delete instances of subsystem objects.
 boolean isTainted ()
          Subsystem configurations are never persisted.
protected  boolean isUserPrivateProfile ( ISystemFilterPoolManager mgr)
          Return true if the given filter pool manager maps to the private profile for this user.
protected  boolean needsUpdate ( ISubSystem subsystem, boolean updateUserId, String userId, boolean updatePort, int port)
          Used by child classes that override updateSubSystem to establish if anything really needs to be changed.
 void preTestRenameSubSystemProfile ( String oldProfileName)
          Called by SystemRegistry's renameSystemProfile method to pre-test if we are going to run into errors on a profile rename, due to file or folder in use.
 boolean providesCustomDropInFilters ()
          Return true if filters of this subsystem configuration provide a custom implementation of drop support.
protected  void removeSubSystem ( ISubSystem subsys)
          Helper method to allow child classes to remove a subsystem object from the in-memory list maintained and returned by this base class.
 void renameFilterPoolManager ( ISystemProfile profile)
          Rename the filter pool manager associated with the given profile
 void renameSubSystem ( ISubSystem subsystem, String newName)
          Renames a subsystem.
 void renameSubSystemProfile ( ISubSystem subsystem, String oldProfileName, String newProfileName)
          Called by SystemRegistry's renameSystemProfile method to ensure we update our subsystem names within each subsystem.
 void renameSubSystemProfile ( String oldProfileName, String newProfileName)
          Callback method called after renaming a subsystem profile.
 void renameSubSystemsByConnection ( IHost conn, String newConnectionName)
          Called by SystemRegistry's renameConnection method to ensure we update our connection names within each subsystem.
 void reset ()
          Reset for a full refresh from disk, such as after a team synch.
 boolean saveFilterPools ()
          Saves all filter information to disk for all profiles.
 void saveFilterPools ( ISystemFilterPoolManager mgr)
          Saves all filter information to disk for the given profile.
 void saveSubSystem ( ISubSystem subsys)
          Attempt to save single subsystem to disk.
 void saveSubSystems ()
          Save all subsystems for all connections to disk.
 void saveSubSystems ( IHost conn)
          Save all subsystems for a given connection to disk.
 void setConnection ( IHost connection)
          Called by adapters prior to asking for actions, in case the connection of the currently selected object is required by the action.
 void setConnectorService ( IHost host, IConnectorService connectorService)
          Set the connector service for a particular host. This default implementation does nothing.
 void setCurrentSelection ( Object[] selection)
          Called by adapters prior to asking for actions.
 void setDirty (boolean flag)
          Subsystem configurations are never marked dirty.
 void setShowFilterPools (boolean show)
          If we support filters, should we show filter pools in the remote system explorer?
 void setSubSystemConfigurationProxy ( ISubSystemConfigurationProxy proxy)
          The following is called for you by the SubSystemConfigurationProxy, after starting this object via the extension point mechanism
 void setSubSystemPort ( ISubSystem subsystem, int port)
          Update the port for the given subsystem instance.
 void setSubSystemUserId ( ISubSystem subsystem, String userId)
          Update the user ID for the given subsystem instance.
 void setTainted (boolean flag)
          Subsystem configurations are never marked dirty.
 void setWasRestored (boolean flag)
          Subsystem configurations are never restored.
 boolean showChangeFilterStringsPropertyPage ( ISystemFilter filter)
          Given a filter, decide whether to show the Filter Strings property page for this filter.
 boolean showFilterPools ()
          If we support filters, should we show filter pools in the remote system explorer?
 boolean showGenericShowInTableOnFilter ()
          Return true if we should show the show in table action in the popup for the given element.
 boolean showRefreshOnFilter ()
          Return true if we should show the refresh action in the popup for the given element.
protected  boolean subSystemsHaveBeenRestored ( IHost connection)
          Return true if the subsystems for a given connection have been restored yet or not
 boolean supportsCommands ()
          Return true if subsystem instances from this subsystem configuration support remote command execution RETURNS FALSE BY DEFAULT.
 boolean supportsDeferredQueries ()
          Return true if deferred queries are supported.
 boolean supportsDropInFilters ()
          Return true if filters of this subsystem configuration support dropping into.
 boolean supportsDuplicateFilterStrings ()
          Tell us if duplicate filter strings are supported.
 boolean supportsEncoding ( IHost host)
          Test whether this subsystem configuration supports custom encodings.
 boolean supportsFileTypes ()
          Return true if you support user-defined/managed named file types RETURNS false BY DEFAULT
 boolean supportsFilterCaching ()
          Required method for subsystem configuration child classes.
 boolean supportsFilterChildren ()
          Indicates whether the subsystem supports displaying children under its filters.
 boolean supportsFilters ()
          Return true if you support filters, false otherwise.
 boolean supportsFilterStringExport ()
          Return true if the subsystem supports the exporting of filter strings from it's filters RETURNS true BY DEFAULT
 boolean supportsMultipleFilterStrings ()
          Required method for subsystem configuration child classes.
 boolean supportsMultiStringFilters ()
          Return true if the subsystem supports more than one filter string RETURNS true BY DEFAULT
 boolean supportsNestedFilters ()
          Required method for subsystem configuration child classes if returning true from supportsFilters.
 boolean supportsProperties ()
          Return true if subsystem instances from this subsystem configuration support getting and setting properties RETURNS FALSE BY DEFAULT.
 boolean supportsQuickFilters ()
          Return true if you support quick filters.
 boolean supportsServerLaunchProperties ( IHost host)
          Tell us if this subsystem configuration supports server launch properties, which allow the user to configure how the server-side code for these subsystems are started.
 boolean supportsServerLaunchType ( ServerLaunchType serverLaunchType)
          If supportsServerLaunchProperties(IHost) returns true, this method may be called by the server launcher to decide if a given remote server launch type is supported or not.
 boolean supportsSubSystemConnect ()
          Return true if instance of this subsystem configuration's subsystems support connect and disconnect actions.
 boolean supportsTargets ()
          Tell us if this subsystem configuration supports targets, which are destinations for pushes and builds.
  ISubSystem[] testForActiveReferences ( ISystemProfile profile)
          Test if any filter pools in the given profile are referenced by other profiles, which are active.
  String toString ()
          Return object as printable string.
 void updateSubSystem ( ISubSystem subsystem, boolean updateUserId, String userId, boolean updatePort, int port)
          Updates userid and/or port of an existing subsystem instance.
 boolean wasRestored ()
          Subsystem configurations are never restored since they are not persisted.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

filterPoolManagers

protected 
ISystemFilterPoolManager[] filterPoolManagers

filterPoolManagersPerProfile

protected 
Hashtable filterPoolManagersPerProfile

currentlySelectedConnection

protected 
IHost currentlySelectedConnection

currentlySelected

protected 
Object[] currentlySelected

currentlyProcessingConnection

protected static 
IHost currentlyProcessingConnection

currentlyProcessingSubSystemConfiguration

protected static 
SubSystemConfiguration currentlyProcessingSubSystemConfiguration

subSystemList

protected 
List subSystemList
Internal list of subsystems. Must always be accessed in synchronized blocks to protect against concurrent modification. For API compliance, clients should always call getSubSystemList() instead of accessing this field directly.


filterPoolManagerList

protected 
List filterPoolManagerList
Internal list of filter pool managers. Must always be accessed in synchronized blocks. For API compliance, clients should always call getFilterPoolManagerList() instead of accessing this field directly.

Constructor Detail

SubSystemConfiguration

public SubSystemConfiguration()
Constructor

Method Detail

reset

public void reset()
Reset for a full refresh from disk, such as after a team synch. Override this as required, but please call super.reset()!!

Specified by:
reset in interface ISubSystemConfiguration

supportsEncoding

public boolean supportsEncoding(
IHost host)
Test whether this subsystem configuration supports custom encodings. We fall back to the setting provided by the host, or its underlying system type by default.

Specified by:
supportsEncoding in interface ISubSystemConfiguration
Returns:
true if the RSE mechanisms for specifying custom encodings are observed and supported by the subsystems managed by this configuration for the given host.
Since:
org.eclipse.rse.core 3.0
See Also:
ISubSystemConfiguration.supportsEncoding(IHost)

supportsSubSystemConnect

public boolean supportsSubSystemConnect()
Return true if instance of this subsystem configuration's subsystems support connect and disconnect actions. By default, returns true. Override if this is not the case.

Specified by:
supportsSubSystemConnect in interface ISubSystemConfiguration

isPortEditable

public boolean isPortEditable()
Return true (default) or false to indicate if subsystems of this subsystem configuration support user-editable port numbers.

Specified by:
isPortEditable in interface ISubSystemConfiguration

supportsCommands

public boolean supportsCommands()
Return true if subsystem instances from this subsystem configuration support remote command execution

RETURNS FALSE BY DEFAULT.

Specified by:
supportsCommands in interface ISubSystemConfiguration

supportsProperties

public boolean supportsProperties()
Return true if subsystem instances from this subsystem configuration support getting and setting properties

RETURNS FALSE BY DEFAULT.

Specified by:
supportsProperties in interface ISubSystemConfiguration
Returns:
false to indicate that Properties are not supported by default.

supportsFilters

public boolean supportsFilters()
Return true if you support filters, false otherwise. If you support filters, then some housekeeping will be done for you automatically. Specifically, they will be saved and restored for you automatically. The default is to support filters.

Specified by:
supportsFilters in interface ISubSystemConfiguration
Returns:
true to indicate that Filters are supported by default.

supportsFilterChildren

public boolean supportsFilterChildren()
Indicates whether the subsystem supports displaying children under its filters. By default, this will return true, but if filters that can't be expanded are desired, this can be overridden to return false.

Specified by:
supportsFilterChildren in interface ISubSystemConfiguration

supportsFilterCaching

public boolean supportsFilterCaching()
Required method for subsystem configuration child classes. Return true if you filter caching. If you support filter caching, then the views will always check the in-memory cache for filter results before attempting a query.

Returns true in default implementation.

Specified by:
supportsFilterCaching in interface ISubSystemConfiguration

supportsMultipleFilterStrings

public boolean supportsMultipleFilterStrings()
Required method for subsystem configuration child classes. Return true if you support filters, and you support multiple filter strings per filter. Return false to restrict the user to one string per filter.

Returns TRUE by default.

Specified by:
supportsMultipleFilterStrings in interface ISubSystemConfiguration

supportsNestedFilters

public boolean supportsNestedFilters()
Required method for subsystem configuration child classes if returning true from supportsFilters. Return true if you support filters within filters, false otherwise.

RETURNS supportsFilters() BY DEFAULT.

Specified by:
supportsNestedFilters in interface ISubSystemConfiguration

supportsQuickFilters

public boolean supportsQuickFilters()
Return true if you support quick filters. These allow the user to subset a remote system object at the time they expand it in the remote system explorer tree view.

RETURNS supportsFilters() BY DEFAULT.

THIS IS NOT SUPPORTED BY THE FRAMEWORK YET

Specified by:
supportsQuickFilters in interface ISubSystemConfiguration

supportsDropInFilters

public boolean supportsDropInFilters()
Return true if filters of this subsystem configuration support dropping into. Override this method to provide drop support for filters.

Specified by:
supportsDropInFilters in interface ISubSystemConfiguration

providesCustomDropInFilters

public boolean providesCustomDropInFilters()
Return true if filters of this subsystem configuration provide a custom implementation of drop support. By default, the filter reference adapter treats a drop on a filter as an update to the list of filter strings for a filter. For things like files, it is more desirable to treat the drop as a physical resource copy, so in that case, custom drop makes sense. By default this returns false.

Specified by:
providesCustomDropInFilters in interface ISubSystemConfiguration

supportsFileTypes

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

RETURNS false BY DEFAULT

Specified by:
supportsFileTypes in interface ISubSystemConfiguration

supportsMultiStringFilters

public boolean supportsMultiStringFilters()
Return true if the subsystem supports more than one filter string

RETURNS true BY DEFAULT

Specified by:
supportsMultiStringFilters in interface ISubSystemConfiguration

supportsFilterStringExport

public boolean supportsFilterStringExport()
Return true if the subsystem supports the exporting of filter strings from it's filters

RETURNS true BY DEFAULT

Specified by:
supportsFilterStringExport in interface ISubSystemConfiguration

isCaseSensitive

public boolean isCaseSensitive()
Tell us if filter strings are case sensitive. The default is false.

Specified by:
isCaseSensitive in interface ISubSystemConfiguration

supportsDuplicateFilterStrings

public boolean supportsDuplicateFilterStrings()
Tell us if duplicate filter strings are supported. The default is false.


supportsTargets

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

Specified by:
supportsTargets in interface ISubSystemConfiguration

supportsServerLaunchProperties

public boolean supportsServerLaunchProperties(
IHost host)
Tell us if this subsystem configuration supports server launch properties, which allow the user to configure how the server-side code for these subsystems are started. There is a Server Launch Setting property page, with a pluggable composite, where users can configure these properties.

If you return true here, you may also want to override supportsServerLaunchType(ServerLaunchType).
By default we return false here. This is overridden in UniversalFileSubSystemConfiguration though.

Specified by:
supportsServerLaunchProperties in interface ISubSystemConfiguration

supportsServerLaunchType

public boolean supportsServerLaunchType(
ServerLaunchType serverLaunchType)
If supportsServerLaunchProperties(IHost) returns true, this method may be called by the server launcher to decide if a given remote server launch type is supported or not.
We return true by default.

Specified by:
supportsServerLaunchType in interface ISubSystemConfiguration
See Also:
ServerLaunchType

isFactoryFor

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

Specified by:
isFactoryFor in interface ISubSystemConfiguration
Parameters:
subSystemType - type of subsystem
Returns:
whether this subsystem configuration is for the specified subsystem type

showFilterPools

public boolean showFilterPools()
If we support filters, should we show filter pools in the remote system explorer? By default, this retrieves the setting from user preferences.

Specified by:
showFilterPools in interface ISubSystemConfiguration

setShowFilterPools

public void setShowFilterPools(boolean show)
If we support filters, should we show filter pools in the remote system explorer? This is to set it after the user changes it in the user preferences. It may require refreshing the current view.

Specified by:
setShowFilterPools in interface ISubSystemConfiguration

setSubSystemConfigurationProxy

public void setSubSystemConfigurationProxy(
ISubSystemConfigurationProxy proxy)
The following is called for you by the SubSystemConfigurationProxy, after starting this object via the extension point mechanism

Specified by:
setSubSystemConfigurationProxy in interface ISubSystemConfiguration

getSubSystemConfigurationProxy

public 
ISubSystemConfigurationProxy getSubSystemConfigurationProxy()
The following is here for completeness but should never be needed.

Specified by:
getSubSystemConfigurationProxy in interface ISubSystemConfiguration

getVendor

public 
String getVendor()
Return vendor of this subsystem configuration. This comes from the xml "vendor" attribute of the extension point.

Specified by:
getVendor in interface ISubSystemConfiguration

getName

public 
String getName()
Return name of this subsystem configuration. This comes from the xml "name" attribute of the extension point.

Specified by:
getName in interface ISubSystemConfiguration

getDescription

public 
String getDescription()
Return name of this subsystem configuration. This comes from the xml "description" attribute of the extension point.

Specified by:
getDescription in interface ISubSystemConfiguration

getId

public 
String getId()
Return unique id of this subsystem configuration. This comes from the xml "id" attribute of the extension point.

Specified by:
getId in interface ISystemFilterPoolManagerProvider
Specified by:
getId in interface ISubSystemConfiguration
Returns:
the id

getCategory

public 
String getCategory()
Return the category this subsystem configuration subscribes to. This comes from the xml "category" attribute of the extension point.

Specified by:
getCategory in interface ISubSystemConfiguration
See Also:
ISubSystemConfigurationCategories

getSystemTypes

public 
IRSESystemType[] getSystemTypes()
Return the system types this subsystem configuration supports. These come from static declaration in the org.eclipse.rse.core.subsystemConfigurations and org.eclipse.rse.core.systemTypes extension points.

Specified by:
getSystemTypes in interface ISubSystemConfiguration

getSystemProfile

public 
ISystemProfile getSystemProfile(
String name)
Get a profile object given its name

Specified by:
getSystemProfile in interface ISubSystemConfiguration

getSystemProfile

protected 
ISystemProfile getSystemProfile(
ISystemFilterPoolManager poolMgr)
Get a profile object given a filter pool manager object


getSystemProfile

public 
ISystemProfile getSystemProfile(
ISystemFilterPool pool)
Get owning profile object given a filter pool object

Specified by:
getSystemProfile in interface ISubSystemConfiguration

getSystemProfile

protected 
ISystemProfile getSystemProfile(
ISystemFilter filter)
Get a profile object given a filter object


deletingSystemProfile

public void deletingSystemProfile(
ISystemProfile profile)
Called by SystemRegistry when we are about to delete a profile.

Our only mission is to delete the filter pool associated with it, because the registry has already called deleteSubSystemsByConnection for every subsystem of every connection owned by this profile.

Specified by:
deletingSystemProfile in interface ISubSystemConfiguration

changingSystemProfileActiveStatus

public void changingSystemProfileActiveStatus(
ISystemProfile profile,
                                              boolean newStatus)
Called by SystemRegistry when we have toggled the active-status of a profile

Specified by:
changingSystemProfileActiveStatus in interface ISubSystemConfiguration

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
Parameters:
oldProfileName - the old profile name.
newProfileName - the new profile name.

renameSubSystemProfile

public void renameSubSystemProfile(
ISubSystem subsystem,
                                   
String oldProfileName,
                                   
String newProfileName)
Description copied from interface: ISubSystemConfiguration
Called by SystemRegistry's renameSystemProfile method to ensure we update our subsystem names within each subsystem. This should be invoked after changing the profile's name.

Specified by:
renameSubSystemProfile in interface ISubSystemConfiguration
Parameters:
subsystem - the subsystem to be updated
oldProfileName - the old profile name
newProfileName - the new profile name

preTestRenameSubSystemProfile

public void preTestRenameSubSystemProfile(
String oldProfileName)
                                   throws 
Exception
Called by SystemRegistry's renameSystemProfile method to pre-test if we are going to run into errors on a profile rename, due to file or folder in use.

Specified by:
preTestRenameSubSystemProfile in interface ISubSystemConfiguration
Throws:
Exception

getDefaultFilterPool

public 
ISystemFilterPool getDefaultFilterPool(
ISystemProfile profile,
                                              
String oldProfileName)
Return the default filter pool for the given profile...

Specified by:
getDefaultFilterPool in interface ISubSystemConfiguration

renameSubSystemsByConnection

public void renameSubSystemsByConnection(
IHost conn,
                                         
String newConnectionName)
Called by SystemRegistry's renameConnection method to ensure we update our connection names within each subsystem.

Must be called prior to changing the connection's name!!

Specified by:
renameSubSystemsByConnection in interface ISubSystemConfiguration

deleteSubSystemsByConnection

public void deleteSubSystemsByConnection(
IHost conn)
Called by SystemRegistry's deleteConnection method to ensure we delete all our subsystems for a given connection.

Specified by:
deleteSubSystemsByConnection in interface ISubSystemConfiguration

invalidateSubSystemCache

protected void invalidateSubSystemCache(
IHost conn)
Invalidate internal cached array of subsystems. Call whenever a new subsystem is created, repositioned or deleted.


getSubSystems

public 
ISubSystem[] getSubSystems(boolean force)
Return list of all subsystems.

Specified by:
getSubSystems in interface ISubSystemConfiguration
Parameters:
force - true if we should force all the subsystems to be restored from disk if not already

getSubSystems

public 
ISubSystem[] getSubSystems(
IHost conn,
                                  boolean force)
Returns a list of subsystem objects existing for the given connection. For performance, the calculated array is cached until something changes.

Specified by:
getSubSystems in interface ISubSystemConfiguration
Parameters:
conn - System connection to retrieve subsystems for
force - true if we should force all the subsystems to be restored from disk if not already

internalGetSubSystems

protected 
ISubSystem[] internalGetSubSystems(
IHost conn)
Private method to subset master list of all subsystems by a given connection


getSubSystems

public 
ISubSystem[] getSubSystems(
ISystemProfile profile)
Returns a list of subsystem objects existing for all the connections in the given profile. Will force restoring all subsystems from disk.


getSubSystems

public 
ISubSystem[] getSubSystems(
ISystemFilterPool pool)
Returns a list of subsystem objects existing in memory, which contain a reference to the given filter pool.


addSubSystem

protected void addSubSystem(
ISubSystem subsys)
Helper method to allow child classes to add a subsystem object to the in-memory list maintained and returned by this base class.


removeSubSystem

protected void removeSubSystem(
ISubSystem subsys)
Helper method to allow child classes to remove a subsystem object from the in-memory list maintained and returned by this base class.


createSubSystem

public 
ISubSystem createSubSystem(
IHost conn,
                                  boolean creatingConnection,
                                  
ISubSystemConfigurator[] configurators)
Creates a new subsystem instance that is associated with the given connection object. SystemRegistry calls this when a new connection is created, and appliesToSystemType returns true.

This method does the following:

Specified by:
createSubSystem in interface ISubSystemConfiguration
Parameters:
conn - The connection to create a subsystem for
creatingConnection - true if we are creating a connection, false if just creating another subsystem for an existing connection.
configurators - configurators that inject properties into this new subsystem or null if there are none. Used to take ISystemNewConnectionWizardPage[] before RSE 3.0.
Returns:
the created subsystem or null if none has been created.
Since:
3.0

cloneSubSystem

public 
ISubSystem cloneSubSystem(
ISubSystem oldSubsystem,
                                 
IHost newConnection,
                                 boolean copyProfileOperation)
                          throws 
Exception
Clone a given subsystem into the given connection. Called when user does a copy-connection action.

Specified by:
cloneSubSystem in interface ISubSystemConfiguration
Parameters:
oldSubsystem - The subsystem to be cloned
newConnection - The connection into which to create and clone the old subsystem
copyProfileOperation - Pass true if this is an profile-copy operation versus a connection-copy operation
Returns:
New subsystem within the new connection
Throws:
Exception

internalGetSubSystemName

protected 
String internalGetSubSystemName(
ISubSystem subsys)
Overridable.

Return the name to give a new subsystem. By default, it is given the name of this subsystem configuration object. This is fine, unless you support multiple subsystem instances per connection, in which case it is your responsibility to supply a unique name for each.

By default returns getName()


createSubSystemInternal

public abstract 
ISubSystem createSubSystemInternal(
IHost conn)
Method called by default implementation of createSubSystem method in AbstractSubSystemConfiguration.

Specified by:
createSubSystemInternal in interface ISubSystemConfiguration

initializeSubSystem

protected void initializeSubSystem(
ISubSystem ss,
                                   
ISubSystemConfigurator[] configurators)
Initialize subsystems after creation (Overridable). The default behavior is to add a reference to the default filter pool for this subsystem configuration, if there is one. Typically subclasses call super().initializeSubSystem(...) to get this default behavior, then extend it.

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
Since:
3.0

copySubSystemData

protected void copySubSystemData(
ISubSystem oldSubSystem,
                                 
ISubSystem newSubSystem)
Copy unique subsystem data after a copy operation. Subclasses should override and call super.


updateSubSystem

public void updateSubSystem(
ISubSystem subsystem,
                            boolean updateUserId,
                            
String userId,
                            boolean updatePort,
                            int port)
Updates userid and/or port of an existing subsystem instance. These attributes typically affect the live connection, so the subsystem will be forced to disconnect.

If you have your own attributes and own GUI to prompt for these, then call your own method to set your attributes, and call this method via super().

The changes to the subsystem configuration will be saved to disk. Further, it will be asked to disconnect as this data affects the connection.

Specified by:
updateSubSystem in interface ISubSystemConfiguration
Parameters:
subsystem - target of the update action
updateUserId - true if we are updating the userId, else false to ignore userId
userId - new local user Id. Ignored if updateUserId is false
updatePort - true if we are updating the port, else false to ignore port
port - new local port value. Ignored if updatePort is false

setSubSystemPort

public void setSubSystemPort(
ISubSystem subsystem,
                             int port)
Update the port for the given subsystem instance. Shortcut to updateSubSystem(ISubSystem, boolean, String, boolean, int)

Specified by:
setSubSystemPort in interface ISubSystemConfiguration

setSubSystemUserId

public void setSubSystemUserId(
ISubSystem subsystem,
                               
String userId)
Update the user ID for the given subsystem instance. Shortcut to updateSubSystem(ISubSystem, boolean, String, boolean, int)

Specified by:
setSubSystemUserId in interface ISubSystemConfiguration

needsUpdate

protected boolean needsUpdate(
ISubSystem subsystem,
                              boolean updateUserId,
                              
String userId,
                              boolean updatePort,
                              int port)
Used by child classes that override updateSubSystem to establish if anything really needs to be changed.


isSubSystemsDeletable

public boolean isSubSystemsDeletable()
Returns true if this subsystem configuration allows users to delete instances of subsystem objects. Would only be true if users are allowed to create multiple instances of subsystem objects per connection. Returns false by default. Override this and deleteSubSystem(SubSystem subsystem) to support user deletes

Specified by:
isSubSystemsDeletable in interface ISubSystemConfiguration

deleteSubSystem

public boolean deleteSubSystem(
ISubSystem subsystem)
Deletes a given subsystem instance from the list maintained by this subsystem configuration. SystemRegistryImpl calls this when the user selects to delete a subsystem object, or deletes the parent connection this subsystem is associated with.

In former case, this is only called if the subsystem configuration supports user-deletable subsystems.

Handled for you!

Specified by:
deleteSubSystem in interface ISubSystemConfiguration

renameSubSystem

public void renameSubSystem(
ISubSystem subsystem,
                            
String newName)
Renames a subsystem. This is better than ss.setName(String newName) as it saves the subsystem to disk.

Specified by:
renameSubSystem in interface ISubSystemConfiguration

getNewFilterWizardPoolWrapperInformation

protected 
ISystemFilterPoolWrapperInformation getNewFilterWizardPoolWrapperInformation()
Overridable entry for child classes to supply their own flavor of ISystemFilterPoolWrapperInformation for the new filter wizards.

Returns:
an ISystemFilterPoolWrapperInformation instead of a SystemFilterPoolWrapperInformation since 3.0
Since:
3.0

disconnectAllSubSystems

public void disconnectAllSubSystems()
                             throws 
Exception
Disconnect all subsystems currently connected. Called by shutdown() of RSEUIPlugin.

Specified by:
disconnectAllSubSystems in interface ISubSystemConfiguration
Throws:
Exception

createDefaultFilterPool

protected 
ISystemFilterPool createDefaultFilterPool(
ISystemFilterPoolManager mgr)
Overridable lifecycle method. Typically overridden to supply a default filter.
When the user creates a new profile in the RSE (which is mapped to a SystemFilterPoolManager by our parent class), each subsystem configuration that supports filters is asked if it wants to create a default system filter pool in that profile.
This is the method that is called to do that default filter pool creation in the new profile.

By default we create an empty filter pool with a generated name, and no pre-defined filters. If you don't want that behaviour, override this method and do one of the following:

  • nothing if you don't want your subsystem configuration to have a default filter pool in the new profile
  • .
  • call super.createDefaultFilterPool(mgr) to get the default pool, and then than call mgr.createSystemFilter(pool,...) to create each filter and add it to the filter pool, if you want to pre-populate the default pool with default filters.


isUserPrivateProfile

protected boolean isUserPrivateProfile(
ISystemFilterPoolManager mgr)
Return true if the given filter pool manager maps to the private profile for this user.


getDefaultSystemFilterPool

public 
ISystemFilterPool getDefaultSystemFilterPool(
ISubSystem subsys)
Given a subsystem, return the first (hopefully only) default pool for this subsystem's profile.

Specified by:
getDefaultSystemFilterPool in interface ISubSystemConfiguration

getDefaultSystemFilterPool

public 
ISystemFilterPool getDefaultSystemFilterPool(
ISystemProfile profile)
Given a profile, return the first (hopefully only) default pool for this profile.


invalidateFilterCache

public void invalidateFilterCache()
Invalidate any internal caches related to filters


getFilterPoolManagers

public 
ISystemFilterPoolManager[] getFilterPoolManagers()
Return an array of all filter pool managers owned by this subsystem configuration. This is a runtime array that only captures those filter pools that have been restored as a result of someone calling getFilterPoolManager(SystemProfile).


getActiveFilterPoolManagers

public 
ISystemFilterPoolManager[] getActiveFilterPoolManagers()
Get the filter pool managers for the active profiles.


getFilterPoolManager

public 
ISystemFilterPoolManager getFilterPoolManager(
ISystemProfile profile)
Description copied from interface: ISubSystemConfiguration
Get the filter pool manager for the given profile. A subsystem configuration has a filter pool manager for each profile. Do not force the creation of default filter pools. Fully equivalent to getFilterPoolManager(profile, false).

Specified by:
getFilterPoolManager in interface ISubSystemConfiguration
Parameters:
profile - The system profile for which to get the manager.
Returns:
a filter pool manager

getFilterPoolManager

public 
ISystemFilterPoolManager getFilterPoolManager(
ISystemProfile profile,
                                                     boolean force)
Get the filter pool manager for the given profile. A subsystem configuration has a filter pool manager for each profile.

Specified by:
getFilterPoolManager in interface ISubSystemConfiguration
Parameters:
profile - The system profile for which to get the manager.
force - if true then create the default filters for this subsystem configuration in this profile. This should only be done during initial subsystem creation, not during subsystem restore.
Returns:
a filter pool manager
Since:
3.0 added boolean argument

doPostRestoreProcessing

protected boolean doPostRestoreProcessing(
ISystemFilterPoolManager restoredFilterPoolMgr)
Do post-restore-processing of an existing filter pool manager. This is where child classes do any required migration work. By default, we do nothing.

You can query the release of the filter pool managers, filter pools and filters, by querying the release attribute via getRelease().getValue(). You can compare to the current release number using the CURRENT_RELEASE constant in ISystemConstants.

Returns:
false if no changes made. True if changes made, and hence save required.

copyFilterPoolManager

public 
ISystemFilterPoolManager copyFilterPoolManager(
ISystemProfile oldProfile,
                                                      
ISystemProfile newProfile)
                                               throws 
Exception
Copy the filter pool manager and return a new one. Called during profile-copy operations. Will also copy all of the filter pools and their respective data.

Specified by:
copyFilterPoolManager in interface ISubSystemConfiguration
Throws:
Exception

getSystemFilterPoolManager

public 
ISystemFilterPoolManager getSystemFilterPoolManager(
String mgrName)
Get the filter pool manager for the given profile. REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE

Specified by:
getSystemFilterPoolManager in interface ISystemFilterPoolManagerProvider

getSystemFilterPoolManagers

public 
ISystemFilterPoolManager[] getSystemFilterPoolManagers()
Get the filter pool manager for the given profile. REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE

Specified by:
getSystemFilterPoolManagers in interface ISystemFilterPoolManagerProvider

getReferencableSystemFilterPoolManagers

public 
ISystemFilterPoolManager[] getReferencableSystemFilterPoolManagers(
ISystemFilterPoolReferenceManager refMgr)
Return all the manager objects this provider owns, to which it wants to support referencing from the given filter reference manager.

Called by SystemFilterPoolReferenceManager.

REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE

Specified by:
getReferencableSystemFilterPoolManagers in interface ISystemFilterPoolManagerProvider

getSystemFilterPoolForBrokenReference

public 
ISystemFilterPool getSystemFilterPoolForBrokenReference(
ISystemFilterPoolReferenceManager callingRefMgr,
                                                               
String missingPoolMgrName,
                                                               
String missingPoolName)
Last chance call, by a filter pool reference manager, when a reference to a filter pool is found but the referenced master filter pool is not found in those the reference manager by getSystemFilterPoolManagers().

If this returns null, then this broken reference will be deleted

REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE

Specified by:
getSystemFilterPoolForBrokenReference in interface ISystemFilterPoolManagerProvider

addFilterPoolManager

protected void addFilterPoolManager(
ISystemProfile profile,
                                    
ISystemFilterPoolManager mgr)
Add the given filter pool manager object to internal lists


getFilterPoolManager

protected 
ISystemFilterPoolManager getFilterPoolManager(
ISystemFilterPool pool)
Get the filter pool manager for the given filter pool


getFilterPoolManager

protected 
ISystemFilterPoolManager getFilterPoolManager(
ISystemFilterContainer poolOrFilter)
Get the filter pool manager for the given filter pool or filter


getFilterPoolManager

protected 
ISystemFilterPoolManager getFilterPoolManager(
ISystemFilterContainerReference poolOrFilterReference)
Get the filter pool manager for the given reference to a filter pool or filter


getFilterPoolManager

protected 
ISystemFilterPoolManager getFilterPoolManager(
IHost conn)
Get the filter pool manager for the given connection


getFilterPoolManagerName

protected 
String getFilterPoolManagerName(
ISystemProfile profile)
Return the name of the filter pool manager, given the profile.


getSystemProfileName

protected 
String getSystemProfileName(
ISystemFilterPoolManager manager)
Return the name of the profile, given the filter pool manager


deleteFilterPoolManager

protected void deleteFilterPoolManager(
ISystemProfile profile)
Delete the filter pool manager associated with the given profile


renameFilterPoolManager

public void renameFilterPoolManager(
ISystemProfile profile)
Rename the filter pool manager associated with the given profile

Specified by:
renameFilterPoolManager in interface ISubSystemConfiguration

fireEvent

protected void fireEvent(
SystemResourceChangeEvent event)
Helper method to fire an event...


fireEvent

protected void fireEvent(
Object src,
                         int eventId,
                         
Object parent)
Helper method to create and then fire an event...


fireEvent

protected void fireEvent(
Object[] multiSrc,
                         int eventId,
                         
Object parent,
                         int delta)
Helper method to create and then fire an event with a position or delta...


createEvent

protected 
SystemResourceChangeEvent createEvent(
Object src,
                                                int eventId,
                                                
Object parent)
Helper method to create a single-source event


createEvent

protected 
SystemResourceChangeEvent createEvent(
Object[] src,
                                                int eventId,
                                                
Object parent)
Helper method to create a multi-source event


createEvent

protected 
SystemResourceChangeEvent createEvent(
Object[] src,
                                                int eventId,
                                                
Object parent,
                                                int delta)
Helper method to create a multi-source event


fireSubSystemEvent

protected void fireSubSystemEvent(
SystemResourceChangeEvent event,
                                  
ISubSystem subsystem)
Fire given event to the given subsystem


fireSubSystemEvent

protected void fireSubSystemEvent(
SystemResourceChangeEvent event)
Fire given event to all currently known subsystems


fireSubSystemEvent

protected void fireSubSystemEvent(
SystemResourceChangeEvent event,
                                  
ISystemProfile profile)
Fire given event to all subsystems in the given profile


fireSubSystemFilterEvent

protected void fireSubSystemFilterEvent(int eventId,
                                        
ISystemFilter filter)
Fire an event of a given id to subsystems that hold a reference to the given filter


fireSubSystemFilterEvent

protected void fireSubSystemFilterEvent(int eventId,
                                        
ISystemFilter[] filters)
Fire an event of a given id to subsystems that hold a reference to the given filter


fireSubSystemFilterEvent

protected void fireSubSystemFilterEvent(
SystemResourceChangeEvent event,
                                        
ISystemFilter filter)
Fire an event of a given id to subsystems that hold a reference to the given filter


cloneEvent

protected 
SystemResourceChangeEvent cloneEvent(
SystemResourceChangeEvent event,
                                               
Object parent)

fireSubSystemFilterEvent

protected void fireSubSystemFilterEvent(int eventId,
                                        
ISystemFilterString filterString)

fireSubSystemFilterEvent

protected void fireSubSystemFilterEvent(int eventId,
                                        
ISystemFilterString[] filterStrings,
                                        int delta)

fireSubSystemFilterEvent

protected void fireSubSystemFilterEvent(
SystemResourceChangeEvent event,
                                        
ISystemFilterString filterString)

filterEventFilterPoolCreated

public void filterEventFilterPoolCreated(
ISystemFilterPool newPool)
A new filter pool has been created

Specified by:
filterEventFilterPoolCreated in interface ISystemFilterPoolManagerProvider

filterEventFilterPoolDeleted

public void filterEventFilterPoolDeleted(
ISystemFilterPool oldPool)
A filter pool has been deleted

Specified by:
filterEventFilterPoolDeleted in interface ISystemFilterPoolManagerProvider

filterEventFilterPoolRenamed

public void filterEventFilterPoolRenamed(
ISystemFilterPool pool,
                                         
String oldName)
A filter pool has been renamed

Specified by:
filterEventFilterPoolRenamed in interface ISystemFilterPoolManagerProvider

filterEventFilterPoolsRePositioned

public void filterEventFilterPoolsRePositioned(
ISystemFilterPool[] pools,
                                               int delta)
One or more filter pools have been re-ordered within their manager

Specified by:
filterEventFilterPoolsRePositioned in interface ISystemFilterPoolManagerProvider

filterEventFilterCreated

public void filterEventFilterCreated(
ISystemFilter newFilter)
A new filter has been created

Specified by:
filterEventFilterCreated in interface ISystemFilterPoolManagerProvider

filterEventFilterDeleted

public void filterEventFilterDeleted(
ISystemFilter oldFilter)
A filter has been deleted

Specified by:
filterEventFilterDeleted in interface ISystemFilterPoolManagerProvider

filterEventFilterRenamed

public void filterEventFilterRenamed(
ISystemFilter filter,
                                     
String oldName)
A filter has been renamed

Specified by:
filterEventFilterRenamed in interface ISystemFilterPoolManagerProvider

filterEventFilterUpdated

public void filterEventFilterUpdated(
ISystemFilter filter)
A filter's strings have been updated

Specified by:
filterEventFilterUpdated in interface ISystemFilterPoolManagerProvider

filterEventFiltersRePositioned

public void filterEventFiltersRePositioned(
ISystemFilter[] filters,
                                           int delta)
One or more filters have been re-ordered within their pool or filter (if nested)

Specified by:
filterEventFiltersRePositioned in interface ISystemFilterPoolManagerProvider

filterEventFilterStringCreated

public void filterEventFilterStringCreated(
ISystemFilterString newFilterString)
A new filter string has been created

Specified by:
filterEventFilterStringCreated in interface ISystemFilterPoolManagerProvider

filterEventFilterStringDeleted

public void filterEventFilterStringDeleted(
ISystemFilterString oldFilterString)
A filter string has been deleted

Specified by:
filterEventFilterStringDeleted in interface ISystemFilterPoolManagerProvider

filterEventFilterStringUpdated

public void filterEventFilterStringUpdated(
ISystemFilterString filterString)
A filter string has been updated

Specified by:
filterEventFilterStringUpdated in interface ISystemFilterPoolManagerProvider

filterEventFilterStringsRePositioned

public void filterEventFilterStringsRePositioned(
ISystemFilterString[] filterStrings,
                                                 int delta)
One or more filters have been re-ordered within their filter

Specified by:
filterEventFilterStringsRePositioned in interface ISystemFilterPoolManagerProvider

getFilterPool

public 
ISystemFilterPool getFilterPool(
ISystemProfile profile,
                                       
String name)
Returns a filter pool, given its profile and pool name


getFilterPools

public 
ISystemFilterPool[] getFilterPools(
ISystemProfile profile)
Returns an array of filter pool objects within a profile.


showChangeFilterStringsPropertyPage

public boolean showChangeFilterStringsPropertyPage(
ISystemFilter filter)
Given a filter, decide whether to show the Filter Strings property page for this filter. Default is true.

Specified by:
showChangeFilterStringsPropertyPage in interface ISubSystemConfiguration

testForActiveReferences

public 
ISubSystem[] testForActiveReferences(
ISystemProfile profile)
Test if any filter pools in the given profile are referenced by other profiles, which are active.

Called when user tries to make a profile inactive. We prevent this if there exists active references.

Specified by:
testForActiveReferences in interface ISubSystemConfiguration
Parameters:
profile - The profile being tested
Returns:
An array of the active subsystems which reference filter pools in this profile, or null if none are found.

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

showRefreshOnFilter

public boolean showRefreshOnFilter()
Return true if we should show the refresh action in the popup for the given element.

Specified by:
showRefreshOnFilter in interface ISubSystemConfiguration

showGenericShowInTableOnFilter

public boolean showGenericShowInTableOnFilter()
Return true if we should show the show in table action in the popup for the given element.

Specified by:
showGenericShowInTableOnFilter in interface ISubSystemConfiguration

createServerLauncher

public 
IServerLauncherProperties createServerLauncher(
IConnectorService connectorService)
Overridable entry for child classes to contribute a server launcher instance for a given subsystem.

Create an instance of ServerLauncher, and add it to the given subsystem. When a subsystem is created, and supportsServerLaunchProperties(IHost) returns true, this method is called to create the server launcher instance associated with the subsystem. The default implementation is to create an instance of IRemoteServerLauncher, but override to create your own ServerLauncher instance if you have your own class.

Specified by:
createServerLauncher in interface ISubSystemConfiguration

commit

public boolean commit()
Saves absolutely everything to disk. This is called as a safety measure when the workbench shuts down.

Totally handled for you!

Calls saveSubSystems() and saveFilterPools()

Exceptions are swallowed since we can deal with them on shutdown anyway!

Specified by:
commit in interface IRSEPersistableContainer
Specified by:
commit in interface ISubSystemConfiguration
Returns:
true if the object was persisted.

saveSubSystems

public void saveSubSystems()
                    throws 
Exception
Save all subsystems for all connections to disk. The default implementation for this iterates all subsystem instances, and calls saveSubSystem for each.

If you handle your own save action versus using MOF, then override saveSubSystem(SubSystem) versus this method.

Attempts to save all of them, swallowing exceptions, then at the end throws the last exception caught.

Throws:
Exception

saveSubSystems

public void saveSubSystems(
IHost conn)
                    throws 
Exception
Save all subsystems for a given connection to disk. The default implementation for this iterates all subsystem instances for that connection, and calls saveSubSystem for each.

If you handle your own save action versus using MOF, then override saveSubSystem(SubSystem) versus this method.

Attempts to save all of them, swallowing exceptions, then at the end throws the last exception caught.

Throws:
Exception

saveSubSystem

public void saveSubSystem(
ISubSystem subsys)
                   throws 
Exception
Attempt to save single subsystem to disk. Uses MOF to save the given subsystem object.

Calls get saveFileName on the subsystem object to determine what file name to save to.

You need only override if you do not use MOF!

Specified by:
saveSubSystem in interface ISubSystemConfiguration
Throws:
Exception

saveFilterPools

public boolean saveFilterPools()
                        throws 
Exception
Saves all filter information to disk for all profiles.

This method is handled for you. If you do override, please call super.saveFilterPools.

Throws:
Exception

saveFilterPools

public void saveFilterPools(
ISystemFilterPoolManager mgr)
                     throws 
Exception
Saves all filter information to disk for the given profile.

This method is handled for you. If you do override, please call super.saveFilterPools.

Throws:
Exception

createSubSystemAfterTheFact

public 
ISubSystem createSubSystemAfterTheFact(
IHost conn)
Specified by:
createSubSystemAfterTheFact in interface ISubSystemConfiguration

subSystemsHaveBeenRestored

protected boolean subSystemsHaveBeenRestored(
IHost connection)
Return true if the subsystems for a given connection have been restored yet or not


getAllSystemFilterPoolManagers

public 
ISystemFilterPoolManager[] getAllSystemFilterPoolManagers()
Get all the filter pool managers for all the profiles, active or not. This allows cross references from one subsystem in one profile to filter pools in any other profile.

Specified by:
getAllSystemFilterPoolManagers in interface ISubSystemConfiguration

setConnection

public void setConnection(
IHost connection)
Called by adapters prior to asking for actions, in case the connection of the currently selected object is required by the action.

Specified by:
setConnection in interface ISubSystemConfiguration

setCurrentSelection

public void setCurrentSelection(
Object[] selection)
Called by adapters prior to asking for actions. For cases when current selection is needed.

Specified by:
setCurrentSelection in interface ISubSystemConfiguration

handleException

protected void handleException(
String msg,
                               
Exception exc)

getConnectingMessage

public static 
String getConnectingMessage(
String hostName,
                                          int port)
Helper method to return the message "Connecting to &1..."


getDisconnectingMessage

public static 
String getDisconnectingMessage(
String hostName,
                                             int port)
Helper method to return the message "Disconnecting from &1..."


getDefaultFilterPoolName

public static 
String getDefaultFilterPoolName(
String profileName,
                                              
String factoryId)
Return the translated name of a default filter pool for a given profile


toString

public 
String toString()
Return object as printable string. This is the id plus dot plus the name.

Overrides:
toString in class Object

getSubSystemList

public 
List getSubSystemList()
Description copied from interface: ISubSystemConfiguration
Return the internal list of subsystems instantiated for this configuration. Internal use only, do not call or use. Use ISubSystemConfiguration.getSubSystems(boolean) with a false argument instead.

Specified by:
getSubSystemList in interface ISubSystemConfiguration
Returns:
The internal list of SubSystem instances for this configuration. Any operations on this list (such as iterating, adding or removing members) must always be synchronized against the list, in order to protect against concurrent modification.

getFilterPoolManagerList

public 
List getFilterPoolManagerList()
Description copied from interface: ISubSystemConfiguration
Return the internal list of filter pool managers associated with this configuration. Internal use only, do not call or use.

Specified by:
getFilterPoolManagerList in interface ISubSystemConfiguration
Returns:
The internal list of filter pool Managers associated with this configuration. Any operations on this list (such as iterating, adding or removing members) must always be synchronized against the list, in order to protect against concurrent modification.

getAdapter

public 
Object getAdapter(
Class adapterType)
Specified by:
getAdapter in interface IAdaptable

isDirty

public boolean isDirty()
Subsystem configurations are never persisted.

Specified by:
isDirty in interface IRSEPersistableContainer
Returns:
false

setDirty

public void setDirty(boolean flag)
Subsystem configurations are never marked dirty. This does nothing.

Specified by:
setDirty in interface IRSEPersistableContainer
Parameters:
flag - true if the object must be persisted.

isTainted

public boolean isTainted()
Subsystem configurations are never persisted.

Specified by:
isTainted in interface IRSEPersistableContainer
Returns:
false

setTainted

public void setTainted(boolean flag)
Subsystem configurations are never marked dirty. This does nothing.

Specified by:
setTainted in interface IRSEPersistableContainer
Parameters:
flag - the tainted state of the object.

wasRestored

public boolean wasRestored()
Subsystem configurations are never restored since they are not persisted.

Specified by:
wasRestored in interface IRSEPersistableContainer
Returns:
false

setWasRestored

public void setWasRestored(boolean flag)
Subsystem configurations are never restored. This does nothing.

Specified by:
setWasRestored in interface IRSEPersistableContainer
Parameters:
flag - true if the object was restored.

beginRestore

public void beginRestore()

endRestore

public void endRestore()

getPersistableParent

public 
IRSEPersistableContainer getPersistableParent()
Subsystem configurations are not persisted.

Specified by:
getPersistableParent in interface IRSEPersistableContainer
Returns:
null

getPersistableChildren

public 
IRSEPersistableContainer[] getPersistableChildren()
Description copied from interface: IRSEPersistableContainer
Retrieves the children of this object in the persistence containment hierarchy. This is related to, but not necessarily the same as, the model hierarchy.

Specified by:
getPersistableChildren in interface IRSEPersistableContainer
Returns:
the array of persistent children in the order they are to be stored in the persistent form. This is an empty array if there are no children. See IRSEPersistableContainer.NO_CHILDREN.

supportsDeferredQueries

public boolean supportsDeferredQueries()
Return true if deferred queries are supported. By default, they are supported. Override for different behavior.

Specified by:
supportsDeferredQueries in interface ISubSystemConfiguration
Returns:
true if deferred queries are supported.
See Also:
ISubSystemConfiguration.supportsDeferredQueries()

setConnectorService

public void setConnectorService(
IHost host,
                                
IConnectorService connectorService)
Set the connector service for a particular host. This is usually managed by a connector service manager known to this configuration. This must be implemented by service subsystem configurations. Service subsystems allow a connector service to be changed.

This default implementation does nothing. Service subsystems must override as defined in the interface.

Specified by:
setConnectorService in interface ISubSystemConfiguration
Parameters:
host - the host for which to set this connector service.
connectorService - the connector service associated with this host.
Since:
org.eclipse.rse.core 3.0
See Also:
ISubSystemConfiguration.setConnectorService(IHost, IConnectorService)

getConnectorService

public 
IConnectorService getConnectorService(
IHost host)
Get the connector service for a particular host. This may create the connector service if necessary. If the configuration is a service subsystem configuration, this should return the connector service specified in ISubSystemConfiguration.setConnectorService(IHost, IConnectorService).

This default implementation returns null. Service subsystem configurations must override as defined in the interface.

Specified by:
getConnectorService in interface ISubSystemConfiguration
Parameters:
host - the host for which to create or retrieve the connector service
Returns:
the connector service associated with this host. This can return null if there is no connector service associated with this configuration. It is recommended that there be a connector service if ISubSystemConfiguration.supportsSubSystemConnect() is true.
Since:
org.eclipse.rse.core 3.0
See Also:
ISubSystemConfiguration.getConnectorService(IHost)

getServiceType

public 
Class getServiceType()
Get the service type associated with this subsystem configuration. If the configuration is not a service subsystem configuration it must return null, otherwise it must return the interface class that the underlying service layer implements.

This default implementation returns null. Service subsystem configurations must override as defined in the interface.

Specified by:
getServiceType in interface ISubSystemConfiguration
Returns:
an interface class that is implemented by the service layer used by subsystems that have this configuration, or null if this is not a service subsystem configuration.
Since:
org.eclipse.rse.core 3.0
See Also:
ISubSystemConfiguration.getServiceType()

getServiceImplType

public 
Class getServiceImplType()
Get the implementation type of the service associated with this subsystem configuration. If the configuration is not a service subsystem configuration then this must return null, otherwise it must return the class that implements the interface specified in ISubSystemConfiguration.getServiceType().

This default implementation returns null. Service subsystem configurations must override as defined in the interface.

Specified by:
getServiceImplType in interface ISubSystemConfiguration
Returns:
an implementation class that implements the interface specified in ISubSystemConfiguration.getServiceType(), or null if this is not a service subsystem configuration.
Since:
org.eclipse.rse.core 3.0
See Also:
ISubSystemConfiguration.getServiceImplType()

getService

public 
IService getService(
IHost host)
Get the actual service associated with a particular host. If the configuration is not a service subsystem this must return null. Otherwise this must return the particular instance of the class returned by ISubSystemConfiguration.getServiceImplType() that is associated with this host instance.

This default implementation returns null. Service subsystem configurations must override as defined in the interface.

Specified by:
getService in interface ISubSystemConfiguration
Parameters:
host - The host for which to retrieve the service.
Returns:
The instance of IService which is associated with this host, or null if this is not a service subsystem configuration.
Since:
org.eclipse.rse.core 3.0
See Also:
ISubSystemConfiguration.getService(IHost)

RSE
Release 3.0

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

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire