RSE
Release 1.0

org.eclipse.rse.core.subsystems
Class SubSystemConfiguration

java.lang.Object
  extended byorg.eclipse.rse.core.subsystems.SubSystemConfiguration
All Implemented Interfaces:
IAdaptable, org.eclipse.rse.core.persistance.IRSEPersistableContainer, ISubSystemConfiguration, ISystemFilterPoolManagerProvider
Direct Known Subclasses:
org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystemConfiguration, RemoteFileSubSystemConfiguration, RemoteProcessSubSystemConfiguration, ServiceSubSystemConfiguration

public abstract class SubSystemConfiguration
extends Object
implements ISubSystemConfiguration

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

Child classes can optionally override:

A factory will maintain in memory a list of all subsystem objects it has. This list should be initialize 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 Vector instance variable named subsystems. It is returned by the getSubSystems method in this base class. For this to be accurate you though, you should:

Should you prefer to maintain your own list, simply override getSubSystems.


Field Summary
protected  boolean _isDirty
           
protected static IHost currentlyProcessingConnection
           
protected static SubSystemConfiguration currentlyProcessingSubSystemConfiguration
           
protected  Object[] currentlySelected
           
protected  IHost currentlySelectedConnection
           
protected  SubSystemFilterNamingPolicy filterNamingPolicy
           
protected  List filterPoolManagerList
           
protected  ISystemFilterPoolManager[] filterPoolManagers
           
protected  Hashtable filterPoolManagersPerProfile
           
protected  Hashtable imageTable
           
protected  List subSystemList
           
 
Fields inherited from interface org.eclipse.rse.core.subsystems.ISubSystemConfiguration
FORCE_INTO_MEMORY, LAZILY
 
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 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.
 void configureNewFilterAction(SystemNewFilterAction newFilterAction, Object callerData)
          There is a reasonable amount of processing needed to configure filter wizards.
 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 abstract  ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
          OVERRIDABLE METHOD FOR CHILD CLASSES TO ENABLE THEM TO CREATE A DEFAULT POOL WHENEVER A NEW FILTER POOL MANAGER IS CREATED (EG, WHEN PROFILE CREATED).
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, ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
          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 factory.
 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 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)
           
 String getCategory()
          Return the category this subsystem factory subscribes to.
static String getConnectingMessage(String hostName, int port)
          Helper method to return the message "Connecting to &1..."
 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 factory.
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
 List getFilterPoolManagerList()
          Private.
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 factory.
 ISystemFilterPool[] getFilterPools(ISystemProfile profile)
          Returns an array of filter pool objects within a profile.
 Image getGraphicsImage()
          Return actual graphics Image of this factory.
 Image getGraphicsLiveImage()
          Return actual graphics LiveImage of this factory.
 String getId()
          Return unique id of this factory.
 ImageDescriptor getImage()
          Return image descriptor of this factory.
 ImageDescriptor getLiveImage()
          Return image to use when this susystem is connection.
 String getName()
          Return name of this factory.
protected  SystemFilterPoolWrapperInformation getNewFilterWizardPoolWrapperInformation()
          Overridable entry for child classes to supply their own flavour of ISystemFilterPoolWrapperInformation for the new filter wizards.
 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.
 IServerLauncherForm getServerLauncherForm(Shell shell, ISystemMessageLine msgLine)
          Return the form used in the property page, etc for this server launcher.
 ISubSystemConfigurationProxy getSubSystemConfigurationProxy()
          The following is here for completeness but should never be needed.
 List getSubSystemList()
          Private.
 ISystemSubSystemPropertyPageCoreForm getSubSystemPropertyPageCoreFrom(ISystemMessageLine msgLine, Object caller)
           
protected  List getSubSystemPropertyPages()
          Gets the list of property pages applicable for a subsystem associated with this factory
 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
 String[] getSystemTypes()
          Return the system types this subsystem factory supports.
 String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
          Return the translated string to show in the property sheet for the type property.
 ISystemValidator getUserIdValidator()
          Return the validator for the userId.
 String getVendor()
          Return vendor of this factory.
protected  void handleException(String msg, Exception exc)
           
protected  void initializeSubSystem(ISubSystem ss, ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
          Overridable method to initialize subsystems after creation.
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()
          An object is dirty if a change has been made to it that requires it to be persisted.
 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 isPortEditable()
          Return true (default) or false to indicate if subsystems of this factory support user-editable port numbers.
 boolean isSubSystemsDeletable()
          Returns true if this factory allows users to delete instances of subsystem objects.
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 factory 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 ss, String oldProfileName, String newProfileName)
          Called by SystemRegistry's renameSystemProfile method to ensure we update our subsystem names within each subsystem.
 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.
 ISystemFilterPoolManager[] restoreAllFilterPoolManagersForAllProfiles()
          Get all the filter pool managers for all the profiles, active or not.
 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 setCurrentSelection(Object[] selection)
          Called by adapters prior to asking for actions.
 void setDirty(boolean flag)
          An object is dirty if a change has been made to it that requires it to be persisted.
 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 setWasRestored(boolean flag)
          The the "restored" state of the object.
 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 factory support remote command execution RETURNS FALSE BY DEFAULT.
 boolean supportsCompileActions()
          Return true if you support compile actions for the remote system objects returned from expansion of subsystems created by this subsystem factory.
 boolean supportsDropInFilters()
          Return true if filters of this subsystem factory support dropping into.
 boolean supportsDuplicateFilterStrings()
          Tell us if duplicate filter strings are supported.
 boolean supportsFileTypes()
          Return true if you support user-defined/managed named file types RETURNS false BY DEFAULT
 boolean supportsFilterCaching()
          Required method for subsystem factory 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 factory 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 factory child classes if returning true from supportsFilters.
 boolean supportsProperties()
          Return true if subsystem instances from this factory support getting and setting properties RETURNS FALSE BY DEFAULT.
 boolean supportsQuickFilters()
          Return true if you support quick filters.
abstract  boolean supportsServerLaunchProperties(IHost host)
          Tell us if this subsystem factory 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 factory's subsystems support connect and disconnect actions.
 boolean supportsTargets()
          Tell us if this subsystem factory supports targets, which are destinations for pushes and builds.
 boolean supportsUserDefinedActions()
          Return true if you support user-defined actions for the remote system objects returned from expansion of subsystems created by this subsystem factory RETURNS false BY DEFAULT
 boolean supportsUserDefinedActions(ISelection selection)
          Return true if you support user-defined actions for the remote system objects explicitly given.
 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()
          An object was restored if it originated from a persistent form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.core.subsystems.ISubSystemConfiguration
getConnectorService
 

Field Detail

filterNamingPolicy

protected SubSystemFilterNamingPolicy filterNamingPolicy

filterPoolManagers

protected ISystemFilterPoolManager[] filterPoolManagers

filterPoolManagersPerProfile

protected Hashtable filterPoolManagersPerProfile

imageTable

protected Hashtable imageTable

currentlySelectedConnection

protected IHost currentlySelectedConnection

currentlySelected

protected Object[] currentlySelected

currentlyProcessingConnection

protected static IHost currentlyProcessingConnection

currentlyProcessingSubSystemConfiguration

protected static SubSystemConfiguration currentlyProcessingSubSystemConfiguration

subSystemList

protected List subSystemList

filterPoolManagerList

protected List filterPoolManagerList

_isDirty

protected boolean _isDirty
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

supportsSubSystemConnect

public boolean supportsSubSystemConnect()
Return true if instance of this factory'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 factory support user-editable port numbers.

Specified by:
isPortEditable in interface ISubSystemConfiguration

supportsCommands

public boolean supportsCommands()
Return true if subsystem instances from this factory 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 factory support getting and setting properties

RETURNS FALSE BY DEFAULT.

Specified by:
supportsProperties in interface ISubSystemConfiguration

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

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 factory 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 factory 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 factory 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 factory 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 factory 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

supportsUserDefinedActions

public boolean supportsUserDefinedActions()
Return true if you support user-defined actions for the remote system objects returned from expansion of subsystems created by this subsystem factory

RETURNS false BY DEFAULT

Specified by:
supportsUserDefinedActions in interface ISubSystemConfiguration
See Also:
supportsUserDefinedActions(ISelection), #getActionSubSystem(ISubSystem), #createActionSubSystem()

supportsUserDefinedActions

public boolean supportsUserDefinedActions(ISelection selection)
Return true if you support user-defined actions for the remote system objects explicitly given. This calls supportsUserDefinedActions() by default. It is called when decided whether or not to show the User Actions menu for the current selection, if supportsUserDefinedActions() returns true.

See Also:
#getActionSubSystem(ISubSystem), #createActionSubSystem(), #addCommonRemoteActions(SystemMenuManager, IStructuredSelection, Shell, String, ISubSystem)

supportsCompileActions

public boolean supportsCompileActions()
Return true if you support compile actions for the remote system objects returned from expansion of subsystems created by this subsystem factory.

By returning true, user sees a "Work with->Compile Commands..." action item in the popup menu for this subsystem. The action is supplied by the framework, but is populated using overridable methods in this subsystem.

RETURNS false BY DEFAULT

Specified by:
supportsCompileActions in interface ISubSystemConfiguration
See Also:
#getCompileManager(), #createCompileManager()

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 factory supports targets, which are destinations for pushes and builds. Normally only true for file system factories.

Specified by:
supportsTargets in interface ISubSystemConfiguration

supportsServerLaunchProperties

public abstract boolean supportsServerLaunchProperties(IHost host)
Tell us if this subsystem factory 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, getServerLauncherForm(Shell, ISystemMessageLine)

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
Parameters:
subSystemType - type of subsystem
Returns:
whether this factory is for the specified subsystemtype

getSubSystemPropertyPageCoreFrom

public ISystemSubSystemPropertyPageCoreForm getSubSystemPropertyPageCoreFrom(ISystemMessageLine msgLine,
                                                                             Object caller)

getSubSystemPropertyPages

protected List getSubSystemPropertyPages()
Gets the list of property pages applicable for a subsystem associated with this factory

Returns:
the list of subsystem property pages

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 factory. 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 factory. 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 factory. 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 factory. This comes from the xml "id" attribute of the extension point.

Specified by:
getId in interface ISubSystemConfiguration

getImage

public ImageDescriptor getImage()
Return image descriptor of this factory. This comes from the xml "icon" attribute of the extension point.


getGraphicsImage

public Image getGraphicsImage()
Return actual graphics Image of this factory. This is the same as calling getImage().createImage() but the resulting image is cached.


getLiveImage

public ImageDescriptor getLiveImage()
Return image to use when this susystem is connection. This comes from the xml "iconlive" attribute of the extension point.


getGraphicsLiveImage

public Image getGraphicsLiveImage()
Return actual graphics LiveImage of this factory. This is the same as calling getLiveImage().createImage() but the resulting image is cached.


getCategory

public String getCategory()
Return the category this subsystem factory subscribes to.

Specified by:
getCategory in interface ISubSystemConfiguration
See Also:
ISubSystemConfigurationCategories

getSystemTypes

public String[] getSystemTypes()
Return the system types this subsystem factory supports.

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

getUserIdValidator

public ISystemValidator getUserIdValidator()
Return the validator for the userId. A default is supplied. Note this is only used for the subsystem's properties, so will not be used by the connection's default. Thus, is only of limited value.

This must be castable to ICellEditorValidator for the property sheet support.


renameSubSystemProfile

public void renameSubSystemProfile(ISubSystem ss,
                                   String oldProfileName,
                                   String newProfileName)
Called by SystemRegistry's renameSystemProfile method to ensure we update our subsystem names within each subsystem.

This is called AFTER changing the profile's name!!

Specified by:
renameSubSystemProfile in interface ISubSystemConfiguration

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,
                                  ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
Creates a new subsystem instance that is associated with the given connection object. SystemRegistryImpl calls this when a new connection is created, and appliesToSystemType returns true.

This method doe sthe 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.
yourNewConnectionWizardPages - The wizard pages you supplied to the New Connection wizard, via the ISubSystemConfigurationAdapter.getNewConnectionWizardPages(ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard) method or null if you didn't override this method. Note there may be more pages than you originally supplied as it is all pages contributed by this factory object, including subclasses.

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 factory 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,
                                   ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
Overridable method to initialize subsystems after creation. The default behaviour here is to set the subsystem's port property to 0, and to add to it a reference to the default filter pool for this factory, if there is one. Typically subclasses call super().initializeSubSystem(...) to get this default behaviour, then extend it.

The reason for the connect wizard pages parm is in case your factory contributes a page to that wizard, whose values are needed to set the subsystem's initial state. For example, you might decide to add a page to the connection wizard to prompt for a JDBC Driver name. If so, when this method is called at the time a new connection is created apres the wizard, your page will have the user's value. You can thus use it here to initialize that subsystem property. Be use to use instanceof to find your particular page.

Parameters:
ss - - The subsystem that was created via createSubSystemInternal
yourNewConnectionWizardPages - - The wizard pages you supplied to the New Connection wizard, via the SubSystemConfigurationAdapter.getNewConnectionWizardPages(org.eclipse.rse.core.subsystems.ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard) method or null if you didn't override this method. Note there may be more pages than you originally supplied, as you are passed all pages contributed by this factory object, including subclasses. This is null when this method is called other than for a New Connection operation.

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(Shell, 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(Shell, 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 factory 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 factory. 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 factory 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

configureNewFilterAction

public void configureNewFilterAction(SystemNewFilterAction newFilterAction,
                                     Object callerData)
There is a reasonable amount of processing needed to configure filter wizards. To aid in performance and memory usage, we extract that processing into this method, and then use a callback contract with the filter wizard to call us back to do this processing only at the time the action is actually selected to be run.

The processing we do here is to specify the filter pools to prompt the user for, in the second page of the New Filter wizards.

This method is from the ISystemNewFilterActionConfigurator interface


getNewFilterWizardPoolWrapperInformation

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


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 abstract ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
OVERRIDABLE METHOD FOR CHILD CLASSES TO ENABLE THEM TO CREATE A DEFAULT POOL WHENEVER A NEW FILTER POOL MANAGER IS CREATED (EG, WHEN PROFILE CREATED).

You should only pre-populate your default filter pool if this new manager (eg, its really a profile) is the user's private own. Call isUserPrivateProfile(ISystemFilterPoolManager) to find out if it is.


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 factory. 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)
Get the filter pool manager for the given profile

Specified by:
getFilterPoolManager in interface ISubSystemConfiguration

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

getServerLauncherForm

public IServerLauncherForm getServerLauncherForm(Shell shell,
                                                 ISystemMessageLine msgLine)
Return the form used in the property page, etc for this server launcher. Only called if supportsServerLaunchProperties(IHost) returns true.

We return RemoteServerLauncherForm. Override if appropriate.


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 ISubSystemConfiguration

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


restoreAllFilterPoolManagersForAllProfiles

public ISystemFilterPoolManager[] restoreAllFilterPoolManagersForAllProfiles()
Get all the filter pool managers for all the profiles, active or not. Why do this? Because we need to in order to allow cross references from one subsystem in one profile to filter pools in any other profile.


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.


getSubSystemList

public List getSubSystemList()
Description copied from interface: ISubSystemConfiguration
Private. Do not call or use.

Specified by:
getSubSystemList in interface ISubSystemConfiguration
Returns:
The list of SubSystemList references

getFilterPoolManagerList

public List getFilterPoolManagerList()
Description copied from interface: ISubSystemConfiguration
Private. Do not call or use.

Specified by:
getFilterPoolManagerList in interface ISubSystemConfiguration
Returns:
The list of FilterPoolManagerList references

getAdapter

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

isDirty

public boolean isDirty()
Description copied from interface: org.eclipse.rse.core.persistance.IRSEPersistableContainer
An object is dirty if a change has been made to it that requires it to be persisted.

Specified by:
isDirty in interface org.eclipse.rse.core.persistance.IRSEPersistableContainer
Returns:
true if the object is dirty

setDirty

public void setDirty(boolean flag)
Description copied from interface: org.eclipse.rse.core.persistance.IRSEPersistableContainer
An object is dirty if a change has been made to it that requires it to be persisted. Objects should usually mark themselves dirty when a persistable change is made. However, there may be a need to mark related objects dirty as well. Setting this value to false should be done only in the persistence manager after the object has been written to the DOM.

Specified by:
setDirty in interface org.eclipse.rse.core.persistance.IRSEPersistableContainer
Parameters:
flag - true if the object must be persisted.

wasRestored

public boolean wasRestored()
Description copied from interface: org.eclipse.rse.core.persistance.IRSEPersistableContainer
An object was restored if it originated from a persistent form.

Specified by:
wasRestored in interface org.eclipse.rse.core.persistance.IRSEPersistableContainer
Returns:
true if the object was created from its persistent form, false if the object has never been persisted.

setWasRestored

public void setWasRestored(boolean flag)
Description copied from interface: org.eclipse.rse.core.persistance.IRSEPersistableContainer
The the "restored" state of the object. Only persistence managers should do this.

Specified by:
setWasRestored in interface org.eclipse.rse.core.persistance.IRSEPersistableContainer
Parameters:
flag - true if the object was restored.

RSE
Release 1.0

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