Remote Systems
v6.4.1

com.ibm.etools.systems.subsystems.impl
Class SubSystemFactoryImpl

java.lang.Object
  extended byEObjectImpl
      extended bycom.ibm.etools.systems.subsystems.impl.SubSystemFactoryImpl
All Implemented Interfaces:
ISubSystemConstants, ISystemNewFilterActionConfigurator, SubSystemFactory, SystemFilterPoolManagerProvider
Direct Known Subclasses:
DefaultSubSystemFactoryImpl, RemoteCmdSubSystemFactoryImpl, RemoteFileSubSystemFactoryImpl, RemoteJobSubSystemFactoryImpl

public class SubSystemFactoryImpl
extends EObjectImpl
implements SubSystemFactory, ISystemNewFilterActionConfigurator, ISubSystemConstants

See Also:
Serialized Form

Field Summary
protected  SystemCompileManager compileManager
           
static String copyright
           
protected static SystemConnection currentlyProcessingConnection
           
protected static SubSystemFactoryImpl currentlyProcessingSubSystemFactory
           
protected  Object[] currentlySelected
           
protected  SystemConnection currentlySelectedConnection
           
protected  SubSystemFilterNamingPolicy filterNamingPolicy
           
protected  EList filterPoolManagerList
           
protected  SystemFilterPoolManager[] filterPoolManagers
           
protected  Hashtable filterPoolManagersPerProfile
           
protected  Hashtable imageTable
           
protected static boolean mofInitSS
           
protected  boolean mofInitSubclassSS
           
protected static SubsystemsFactory ssfactory
           
protected static SubsystemsPackage sspkg
           
protected  EList subSystemList
           
protected  SystemUDActionSubsystem udas
           
 
Fields inherited from interface com.ibm.etools.systems.subsystems.SubSystemFactory
FORCE_INTO_MEMORY, LAZILY
 
Fields inherited from interface com.ibm.etools.systems.subsystems.ISubSystemConstants
Copyright, DEFAULT_PORT, SAVEFILE_FILTERS, SAVEFILE_SUBSYSTEMS
 
Constructor Summary
SubSystemFactoryImpl()
          Constructor
 
Method Summary
 void addCommonRemoteActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, SubSystem subsystem)
          Returns any framework-supplied actions remote objects that should be contributed to the popup menu for the given selection list.
protected  void addFilterPoolManager(SystemProfile profile, SystemFilterPoolManager mgr)
          Add the given filter pool manager object to internal lists
protected  void addSubSystem(SubSystem subsys)
          Helper method to allow child classes to add a subsystem object to the in-memory list maintained and returned by this base class.
static void addUserDefinedActions(Shell shell, IStructuredSelection selection, SystemMenuManager menu, String menuGroup, SystemUDActionSubsystem userActionSubSystem)
          Populate main context menu with a "User Actions->" submenu cascade, which will only be populated when the submenu is selected.
 void changingSystemProfileActiveStatus(SystemProfile profile, boolean newStatus)
          Called by SystemRegistry when we have toggled the active-status of a profile
 SubSystem cloneSubSystem(SubSystem oldSubsystem, SystemConnection newConnection, boolean copyProfileOperation)
          Clone a given subsystem into the given connection.
 void configureNewFilterAction(SystemNewFilterAction newFilterAction, Object callerData)
          There is a reasonable amount of processing needed to configure filter wizards.
 SystemFilterPoolManager copyFilterPoolManager(SystemProfile oldProfile, SystemProfile newProfile)
          Copy the filter pool manager and return a new one.
protected  void copySubSystemData(SubSystem oldSubSystem, SubSystem newSubSystem)
          OVERRIDABLE METHOD FOR CHILD CLASSES TO COPY THEIR UNIQUE SUBSYSTEM DATA AFTER COPY OPERATION noteThis method should be abstract but MOF doesn't allow abstract impl classes at this point
protected  SystemUDActionSubsystem createActionSubSystem()
          Overridable method to instantiate the SystemUDActionSubsystem.
protected  SystemCompileManager createCompileManager()
          Overridable method to instantiate the SystemCompileManager for this factory.
protected  SystemFilterPool createDefaultFilterPool(SystemFilterPoolManager 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
 SystemFilter createFilterByPrompting(SystemFilterReference referenceToPromptableFilter, Shell shell)
          Prompt the user to create a new filter as a result of the user expanding a promptable filter.
 ServerLauncher createServerLauncher(SubSystem ss)
          Overridable entry for child classes to contribute a server launcher instance for a given subsystem.
 SubSystem createSubSystem(SystemConnection conn, boolean creatingConnection, ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
          Creates a new subsystem instance that is associated with the given connection object.
protected  SubSystem createSubSystemInternal(SystemConnection conn)
          Method called by default implementation of createSubSystem method in AbstractSubSystemFactory.
 void customizeChangeFilterPropertyPage(SystemChangeFilterPropertyPage page, SystemFilter selectedFilter, Shell shell)
          In addition to a change filter action, we now also support the same functionality via a Properties page for filters.
 void customizeFilterStringPropertyPage(SystemFilterStringPropertyPage page, SystemFilterString selectedFilterString, Shell shell)
          In addition to a change filter action, we now also support the same functionality via a Properties page for filter strings, in the Team View.
protected  void deleteFilterPoolManager(SystemProfile profile)
          Delete the filter pool manager associated with the given profile
 boolean deleteSubSystem(SubSystem subsystem)
          Deletes a given subsystem instance from the list maintained by this factory.
 void deleteSubSystemsByConnection(SystemConnection conn)
          Called by SystemRegistry's deleteConnection method to ensure we delete all our subsystems for a given connection.
 void deletingSystemProfile(SystemProfile profile)
          Called by SystemRegistry when we are about to delete a profile.
 void disconnectAllSubSystems()
          Disconnect all subsystems currently connected.
protected  boolean doPostRestoreProcessing(SystemFilterPoolManager restoredFilterPoolMgr)
          Do post-restore-processing of an existing filter pool manager.
 Object eGet(EStructuralFeature eFeature, boolean resolve)
           
 NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs)
           
 boolean eIsSet(EStructuralFeature eFeature)
           
 void eSet(EStructuralFeature eFeature, Object newValue)
           
protected  EClass eStaticClass()
           
 void eUnset(EStructuralFeature eFeature)
           
 void filterEventFilterCreated(SystemFilter newFilter)
          A new filter has been created
 void filterEventFilterDeleted(SystemFilter oldFilter)
          A filter has been deleted
 void filterEventFilterPoolCreated(SystemFilterPool newPool)
          A new filter pool has been created
 void filterEventFilterPoolDeleted(SystemFilterPool oldPool)
          A filter pool has been deleted
 void filterEventFilterPoolRenamed(SystemFilterPool pool, String oldName)
          A filter pool has been renamed
 void filterEventFilterPoolsRePositioned(SystemFilterPool[] pools, int delta)
          One or more filter pools have been re-ordered within their manager
 void filterEventFilterRenamed(SystemFilter filter, String oldName)
          A filter has been renamed
 void filterEventFiltersRePositioned(SystemFilter[] filters, int delta)
          One or more filters have been re-ordered within their pool or filter (if nested)
 void filterEventFilterStringCreated(SystemFilterString newFilterString)
          A new filter string has been created
 void filterEventFilterStringDeleted(SystemFilterString oldFilterString)
          A filter string has been deleted
 void filterEventFilterStringsRePositioned(SystemFilterString[] filterStrings, int delta)
          One or more filters have been re-ordered within their filter
 void filterEventFilterStringUpdated(SystemFilterString filterString)
          A filter string has been updated
 void filterEventFilterUpdated(SystemFilter 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, SubSystem subsystem)
          Fire given event to the given subsystem
protected  void fireSubSystemEvent(SystemResourceChangeEvent event, SystemProfile profile)
          Fire given event to all subsystems in the given profile
protected  void fireSubSystemFilterEvent(int eventId, SystemFilter filter)
          Fire an event of a given id to subsystems that hold a reference to the given filter
protected  void fireSubSystemFilterEvent(int eventId, SystemFilter[] filters)
          Fire an event of a given id to subsystems that hold a reference to the given filter
protected  void fireSubSystemFilterEvent(int eventId, SystemFilterString filterString)
           
protected  void fireSubSystemFilterEvent(int eventId, SystemFilterString[] filterStrings, int delta)
           
protected  void fireSubSystemFilterEvent(SystemResourceChangeEvent event, SystemFilter filter)
          Fire an event of a given id to subsystems that hold a reference to the given filter
protected  void fireSubSystemFilterEvent(SystemResourceChangeEvent event, SystemFilterString filterString)
           
 SystemUDActionSubsystem getActionSubSystem(SubSystem subsystem)
          Get the action subsystem object for this subsystemfactory, and set its current subsystem to the given subsystem instance.
 SystemFilterPoolManager[] getActiveFilterPoolManagers()
          Get the filter pool managers for the active profiles.
protected  Vector getAdditionalFilterActions(SystemFilter selectedFilter, Shell shell)
          Overridable entry for child classes to contribute filter actions beyond the default supplied actions.
protected  Vector getAdditionalFilterPoolActions(SystemFilterPool selectedPool, Shell shell)
          Overridable entry for child classes to contribute filter pool actions beyond the default supplied actions.
protected  Vector getAdditionalFilterPoolReferenceActions(SystemFilterPool selectedPool, Shell shell)
          Overridable entry for child classes to contribute filter pool reference actions beyond the default supplied actions.
protected  Vector getAdditionalFilterReferenceActions(SystemFilterReference selectedFilterRef, Shell shell)
          Overridable entry for child classes to contribute filter reference actions beyond the default supplied actions.
protected  Vector getAdditionalSubSystemActions(SubSystem selectedSubSystem, Shell shell)
          Overridable entry for child classes to contribute subsystem actions beyond the default supplied actions.
 String getCategory()
          Return the category this subsystem factory subscribes to.
protected  IAction getChangeFilterAction(SystemFilter selectedFilter, Shell shell)
          Overridable method to return the action for changing an existing filter.
 SystemCompileManager getCompileManager()
          Get the singleton compile manager responsible for enabling the compile support for remote source objects.
static String getConnectingMessage(String hostName, int port)
          Helper method to return the message "Connecting to &1..."
static String getDefaultFilterPoolName(String profileName)
          Return the translated name of a default filter pool for a given profile
 SystemFilterPool getDefaultSystemFilterPool(SubSystem subsys)
          Given a subsystem, return the first (hopefully only) default pool for this subsystem's profile.
 SystemFilterPool getDefaultSystemFilterPool(SystemProfile profile)
          Given a profile, return the first (hopefully only) default pool for this profile.
static String getDisconnectingMessage(String hostName, int port)
          Helper method to return the message "Disconnecting from &1..."
 IAction[] getFilterActions(SystemFilter selectedFilter, Shell shell)
          Returns a list of actions for the popup menu when user right clicks on a filter object.
 SystemFilterPool getFilterPool(SystemProfile profile, String name)
          Returns a filter pool, given its profile and pool name
 IAction[] getFilterPoolActions(SystemFilterPool selectedPool, Shell shell)
          Returns a list of actions for the popup menu when user right clicks on a filter pool object within a subsystem of this factory.
protected  SystemFilterPoolManager getFilterPoolManager(SystemConnection conn)
          Get the filter pool manager for the given connection
protected  SystemFilterPoolManager getFilterPoolManager(SystemFilterContainer poolOrFilter)
          Get the filter pool manager for the given filter pool or filter
protected  SystemFilterPoolManager getFilterPoolManager(SystemFilterContainerReference poolOrFilterReference)
          Get the filter pool manager for the given reference to a filter pool or filter
protected  SystemFilterPoolManager getFilterPoolManager(SystemFilterPool pool)
          Get the filter pool manager for the given filter pool
 SystemFilterPoolManager getFilterPoolManager(SystemProfile profile)
          Get the filter pool manager for the given profile
 EList getFilterPoolManagerList()
          Private.
protected  String getFilterPoolManagerName(SystemProfile profile)
          Return the name of the filter pool manager, given the profile.
 SystemFilterPoolManager[] getFilterPoolManagers()
          Return an array of all filter pool managers owned by this subsystem factory.
 IAction[] getFilterPoolReferenceActions(SystemFilterPoolReference selectedPoolRef, Shell shell)
          Returns a list of actions for the popup menu when user right clicks on a filter pool reference object within a subsystem of this factory.
 SystemFilterPool[] getFilterPools(SystemProfile profile)
          Returns an array of filter pool objects within a profile.
 IAction[] getFilterReferenceActions(SystemFilterReference selectedFilterRef, Shell shell)
          Returns a list of actions for the popup menu when user right clicks on a filter reference object within a subsystem of this factory.
 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.
protected  SystemMOFHelpers getMOFHelpers()
          Return EMF helpers instance.
 String getName()
          Return name of this factory.
 ISystemNewConnectionWizardPage[] getNewConnectionWizardPages(IWizard wizard)
          Optionally return one or more wizard pages to append to the New Wizard connection if the user selects a system type that this subsystem factory supports.
protected  IAction getNewFilterPoolFilterAction(SystemFilterPool selectedPool, Shell shell)
          Overridable method to return the single action for creating a new filter in a filter pool.
protected  IAction[] getNewFilterPoolFilterActions(SystemFilterPool selectedPool, Shell shell)
          Overridable method to return the actions for creating a new filter in a filter pool.
protected  SystemFilterPoolWrapperInformation getNewFilterWizardPoolWrapperInformation()
          Overridable entry for child classes to supply their own flavour of ISystemFilterPoolWrapperInformation for the new filter wizards.
protected  IAction getNewNestedFilterAction(SystemFilter selectedFilter, Shell shell)
          Overridable method to return the action for creating a new nested filter inside another filter.
 ISystemValidator getPasswordValidator()
          Return the validator for the password which is prompted for at runtime.
 ISystemValidator getPortValidator()
          Return the validator for the port.
 SystemFilterPoolManager[] getReferencableSystemFilterPoolManagers(SystemFilterPoolReferenceManager refMgr)
          Return all the manager objects this provider owns, to which it wants to support referencing from the given filter reference manager.
protected  IAction getRemoveFilterPoolReferenceAction(SystemFilterPool selectedPool, Shell shell)
          Overridable method to return the action for removing a filter pool reference.
 IServerLauncherForm getServerLauncherForm(Shell shell, ISystemMessageLine msgLine)
          Return the form used in the property page, etc for this server launcher.
static SubsystemsFactory getSSMOFfactory()
          Return the EMF factory
 IAction[] getSubSystemActions(SubSystem selectedSubSystem, Shell shell)
          Returns a list of actions for the popup menu when user right clicks on a subsystem object from this factory.
 ISubSystemFactoryProxy getSubSystemFactoryProxy()
          The following is here for completeness but should never be needed.
 EList getSubSystemList()
          Private.
protected  IAction[] getSubSystemNewFilterPoolActions(SubSystem selectedSubSystem, Shell shell)
          Overridable entry for child classes to supply their own "new" action(s) for creating a filter pool.
 ISystemSubSystemPropertyPageCoreForm getSubSystemPropertyPageCoreFrom(ISystemMessageLine msgLine, Object caller)
           
protected  List getSubSystemPropertyPages()
          Gets the list of property pages applicable for a subsystem associated with this factory
 SubSystem[] getSubSystems(boolean force)
          Return list of all subsystems.
 SubSystem[] getSubSystems(SystemConnection conn, boolean force)
          Returns a list of subsystem objects existing for the given connection.
 SubSystem[] getSubSystems(SystemFilterPool pool)
          Returns a list of subsystem objects existing in memory, which contain a reference to the given filter pool.
 SubSystem[] getSubSystems(SystemProfile profile)
          Returns a list of subsystem objects existing for all the connections in the given profile.
protected  IFolder getSubSystemsFolder(SystemConnection connection)
          Return the subsystems folder for a given connection
 ImageDescriptor getSystemFilterImage(SystemFilter filter)
          Supply the image to be used for filters, within actions.
 SystemFilterPool getSystemFilterPoolForBrokenReference(SystemFilterPoolReferenceManager 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().
 ImageDescriptor getSystemFilterPoolImage(SystemFilterPool filterPool)
          Supply the image to be used for filter pools, within actions.
 SystemFilterPoolManager getSystemFilterPoolManager(String mgrName)
          Get the filter pool manager for the given profile.
 ImageDescriptor getSystemFilterPoolManagerImage()
          Supply the image to be used for filter pool managers, within actions.
 SystemFilterPoolManager[] getSystemFilterPoolManagers()
          Get the filter pool manager for the given profile.
 ImageDescriptor getSystemFilterStringImage(String filterStringString)
           
 ImageDescriptor getSystemFilterStringImage(SystemFilterString filterString)
           
protected  SystemProfile getSystemProfile(String name)
          Get a profile object given its name
protected  SystemProfile getSystemProfile(SystemFilter filter)
          Get a profile object given a filter object
 SystemProfile getSystemProfile(SystemFilterPool pool)
          Get owning profile object given a filter pool object
protected  SystemProfile getSystemProfile(SystemFilterPoolManager poolMgr)
          Get a profile object given a filter pool manager object
protected  String getSystemProfileName(SystemFilterPoolManager manager)
          Return the name of the profile, given the filter pool manager
 String[] getSystemTypes()
          Return the system types this subsystem factory supports.
 String getTranslatedFilterTypeProperty(SystemFilter selectedFilter)
          Return the translated string to show in the property sheet for the type property.
protected  IFolder getTypeFiltersFolder()
          Return the folder where type filters go for this subsystem factory...
 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(SubSystem ss, ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
          Overridable method to initialize subsystems after creation.
protected  SubsystemsFactory initMOF()
          Initialize the EMF package.
protected  void initSubSystemMOF()
          If you use EMF you must override this method and instantiate your EMF xxxFactoryImpl() and xxxxPackageImpl(xxxfactory) objects.
protected  String internalGetSubSystemName(SubSystem subsys)
          Overridable.
protected  SubSystem[] internalGetSubSystems(SystemConnection 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(SystemConnection conn)
          Invalidate internal cached array of subsystems.
 boolean isCaseSensitive()
          Tell us if filter strings are case sensitive.
protected  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(SystemFilterPoolManager mgr)
          Return true if the given filter pool manager maps to the private profile for this user.
protected  boolean needsUpdate(SubSystem subsystem, boolean updateUserId, String userId, boolean updatePort, Integer 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(SubSystem subsys)
          Helper method to allow child classes to remove a subsystem object from the in-memory list maintained and returned by this base class.
protected  void renameFilterPoolManager(SystemProfile profile)
          Rename the filter pool manager associated with the given profile
 void renameSubSystem(SubSystem subsystem, String newName)
          Renames a subsystem.
 void renameSubSystemProfile(String oldProfileName, String newProfileName)
          Called by SystemRegistry's renameSystemProfile method to ensure we update our filter pool manager names (and their folders) Must be called AFTER changing the profile's name!!
 void renameSubSystemProfile(SubSystem ss, String oldProfileName, String newProfileName)
          Called by SystemRegistry's renameSystemProfile method to ensure we update our subsystem names within each subsystem.
 void renameSubSystemsByConnection(SystemConnection 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 restore(SystemConnection connection)
          Restores all information from disk for a given connection.
 SystemFilterPoolManager[] restoreAllFilterPoolManagersForAllProfiles()
          Get all the filter pool managers for all the profiles, active or not.
protected  SubSystem restoreSubSystem(SystemConnection connection, String fileName)
          Restore a saved subsystem instance from disk, for a given connection.
protected  SubSystem[] restoreSubSystems(SystemConnection connection)
          Restore all subsystems from disk, for a given connection.
 boolean save()
          Saves absolutely everything to disk.
 boolean saveFilterPools()
          Saves all filter information to disk for all profiles.
 void saveFilterPools(SystemFilterPoolManager mgr)
          Saves all filter information to disk for the given profile.
 void saveSubSystem(SubSystem subsys)
          Attempt to save single subsystem to disk.
 void saveSubSystems()
          Save all subsystems for all connections to disk.
 void saveSubSystems(SystemConnection conn)
          Save all subsystems for a given connection to disk.
 void setConnection(SystemConnection 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 setShowFilterPools(boolean show)
          If we support filters, should we show filter pools in the remote system explorer?
 void setSubSystemFactoryProxy(ISubSystemFactoryProxy proxy)
          The following is called for you by the SubSystemFactoryProxy, after starting this object via the extension point mechanism
 void setSubSystemPort(Shell shell, SubSystem subsystem, int port)
          Update the port for the given subsystem instance.
 void setSubSystemUserId(Shell shell, SubSystem subsystem, String userId)
          Update the user ID for the given subsystem instance.
 boolean showChangeFilterStringsPropertyPage(SystemFilter 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(SystemConnection 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 supportsFilters()
          Required method for subsystem factory child classes.
 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.
 boolean supportsServerLaunchProperties()
          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() 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.
 boolean supportsUserId()
          Return true (default) or false to indicate if subsystems of this factory require a userId to do connection or not.
 SubSystem[] testForActiveReferences(SystemProfile 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(Shell shell, SubSystem subsystem, boolean updateUserId, String userId, boolean updatePort, Integer port)
          Updates user-editable attributes of an existing subsystem instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

mofInitSS

protected static boolean mofInitSS

mofInitSubclassSS

protected boolean mofInitSubclassSS

ssfactory

protected static SubsystemsFactory ssfactory

sspkg

protected static SubsystemsPackage sspkg

filterNamingPolicy

protected SubSystemFilterNamingPolicy filterNamingPolicy

filterPoolManagers

protected SystemFilterPoolManager[] filterPoolManagers

filterPoolManagersPerProfile

protected Hashtable filterPoolManagersPerProfile

imageTable

protected Hashtable imageTable

currentlySelectedConnection

protected SystemConnection currentlySelectedConnection

currentlySelected

protected Object[] currentlySelected

udas

protected SystemUDActionSubsystem udas

currentlyProcessingConnection

protected static SystemConnection currentlyProcessingConnection

currentlyProcessingSubSystemFactory

protected static SubSystemFactoryImpl currentlyProcessingSubSystemFactory

compileManager

protected SystemCompileManager compileManager

subSystemList

protected EList subSystemList

filterPoolManagerList

protected EList filterPoolManagerList
Constructor Detail

SubSystemFactoryImpl

public SubSystemFactoryImpl()
Constructor

Method Detail

eStaticClass

protected EClass eStaticClass()


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 SubSystemFactory

supportsUserId

public boolean supportsUserId()
Return true (default) or false to indicate if subsystems of this factory require a userId to do connection or not. If not, no GUI will be supplied related to user Ids in the remote systems explorer view.

Returns TRUE by default.

Specified by:
supportsUserId in interface SubSystemFactory

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 SubSystemFactory

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 SubSystemFactory

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 SubSystemFactory

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 SubSystemFactory

supportsFilters

public boolean supportsFilters()
Required method for subsystem factory child classes. 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. noteThis method should be abstract but MOF doesn't allow abstract impl classes at this point

Specified by:
supportsFilters in interface SubSystemFactory

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 SubSystemFactory

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 SubSystemFactory

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 SubSystemFactory

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 SubSystemFactory

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 SubSystemFactory

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 SubSystemFactory

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 SubSystemFactory
See Also:
supportsUserDefinedActions(ISelection), getActionSubSystem(SubSystem), 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.

Specified by:
supportsUserDefinedActions in interface SubSystemFactory
See Also:
getActionSubSystem(SubSystem), createActionSubSystem(), addCommonRemoteActions(SystemMenuManager, IStructuredSelection, Shell, String, SubSystem)

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

supportsMultiStringFilters

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

RETURNS true BY DEFAULT

Specified by:
supportsMultiStringFilters in interface SubSystemFactory

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 SubSystemFactory

isCaseSensitive

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

Specified by:
isCaseSensitive in interface SubSystemFactory

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 SubSystemFactory

supportsServerLaunchProperties

public boolean supportsServerLaunchProperties()
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 UniversalFileSubSystemFactory though.

Specified by:
supportsServerLaunchProperties in interface SubSystemFactory

supportsServerLaunchType

public boolean supportsServerLaunchType(ServerLaunchType serverLaunchType)
If supportsServerLaunchProperties() 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 SubSystemFactory
See Also:
ServerLaunchType, getServerLauncherForm(Shell, ISystemMessageLine)

addCommonRemoteActions

public void addCommonRemoteActions(SystemMenuManager menu,
                                   IStructuredSelection selection,
                                   Shell shell,
                                   String menuGroup,
                                   SubSystem subsystem)
Returns any framework-supplied actions remote objects that should be contributed to the popup menu for the given selection list. This does nothing if this adapter does not implement ISystemRemoteElementAdapter, else it potentially adds menu items for "User Actions" and Compile", for example. It queries the subsystem factory of the selected objects to determine if these actions are appropriate to add.

No need to override.

Specified by:
addCommonRemoteActions in interface SubSystemFactory
Parameters:
menu - The menu to contribute actions to
selection - The window's current selection.
shell - of viewer calling this. Most dialogs require a shell.
menuGroup - recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
subsystem - the subsystem of the selection

getNewConnectionWizardPages

public ISystemNewConnectionWizardPage[] getNewConnectionWizardPages(IWizard wizard)
Optionally return one or more wizard pages to append to the New Wizard connection if the user selects a system type that this subsystem factory supports.

Some details:

Tip: consider extending AbstractSystemNewConnectionWizardPage for your wizard page class.

Specified by:
getNewConnectionWizardPages in interface SubSystemFactory

isFactoryFor

protected 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.

Parameters:
subSystemType - type of subsystem
Returns:
whether this factory is for the specified subsystemtype

getSubSystemPropertyPageCoreFrom

public ISystemSubSystemPropertyPageCoreForm getSubSystemPropertyPageCoreFrom(ISystemMessageLine msgLine,
                                                                             Object caller)
Specified by:
getSubSystemPropertyPageCoreFrom in interface SubSystemFactory

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

getActionSubSystem

public SystemUDActionSubsystem getActionSubSystem(SubSystem subsystem)
Get the action subsystem object for this subsystemfactory, and set its current subsystem to the given subsystem instance. Will ensure the user action subsystem is only ever instantiated once.

Called in the Work With User Actions and the User Actions cascading action.

Do not override this, as the implementation is complete. However, you must override createActionSubSystem.

Specified by:
getActionSubSystem in interface SubSystemFactory
See Also:
supportsUserDefinedActions(), createActionSubSystem()

createActionSubSystem

protected SystemUDActionSubsystem createActionSubSystem()
Overridable method to instantiate the SystemUDActionSubsystem. You must override this if you return true to supportsUserActions.

See Also:
supportsUserDefinedActions(), getActionSubSystem(SubSystem)

addUserDefinedActions

public static void addUserDefinedActions(Shell shell,
                                         IStructuredSelection selection,
                                         SystemMenuManager menu,
                                         String menuGroup,
                                         SystemUDActionSubsystem userActionSubSystem)
Populate main context menu with a "User Actions->" submenu cascade, which will only be populated when the submenu is selected.

This is called by the addCommonRemoteObjectsActions method, if this subsystem supports user defined actions.


getCompileManager

public SystemCompileManager getCompileManager()
Get the singleton compile manager responsible for enabling the compile support for remote source objects.

Do not override this, as the implementation is complete. However, you must override createCompileManager()

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

createCompileManager

protected SystemCompileManager createCompileManager()
Overridable method to instantiate the SystemCompileManager for this factory. This is typically your unique subclass of SystemCompileManager. Called once only by getCompileManager (it is only instantiated once).

See Also:
supportsCompileActions(), getCompileManager()

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 SubSystemFactory

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 SubSystemFactory

setSubSystemFactoryProxy

public void setSubSystemFactoryProxy(ISubSystemFactoryProxy proxy)
The following is called for you by the SubSystemFactoryProxy, after starting this object via the extension point mechanism

Specified by:
setSubSystemFactoryProxy in interface SubSystemFactory

getSubSystemFactoryProxy

public ISubSystemFactoryProxy getSubSystemFactoryProxy()
The following is here for completeness but should never be needed.

Specified by:
getSubSystemFactoryProxy in interface SubSystemFactory

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 SubSystemFactory

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 SubSystemFactory

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 SubSystemFactory

getImage

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

Specified by:
getImage in interface SubSystemFactory

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.

Specified by:
getGraphicsImage in interface SubSystemFactory

getLiveImage

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

Specified by:
getLiveImage in interface SubSystemFactory

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.

Specified by:
getGraphicsLiveImage in interface SubSystemFactory

getCategory

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

Specified by:
getCategory in interface SubSystemFactory
See Also:
ISubSystemFactoryCategories

getSystemTypes

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

Specified by:
getSystemTypes in interface SubSystemFactory

getSystemProfile

protected SystemProfile getSystemProfile(String name)
Get a profile object given its name


getSystemProfile

protected SystemProfile getSystemProfile(SystemFilterPoolManager poolMgr)
Get a profile object given a filter pool manager object


getSystemProfile

public SystemProfile getSystemProfile(SystemFilterPool pool)
Get owning profile object given a filter pool object

Specified by:
getSystemProfile in interface SubSystemFactory

getSystemProfile

protected SystemProfile getSystemProfile(SystemFilter filter)
Get a profile object given a filter object


deletingSystemProfile

public void deletingSystemProfile(SystemProfile 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 SubSystemFactory

changingSystemProfileActiveStatus

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

Specified by:
changingSystemProfileActiveStatus in interface SubSystemFactory

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.

Specified by:
getUserIdValidator in interface SubSystemFactory

getPasswordValidator

public ISystemValidator getPasswordValidator()
Return the validator for the password which is prompted for at runtime. Returns null by default.

Specified by:
getPasswordValidator in interface SubSystemFactory

getPortValidator

public ISystemValidator getPortValidator()
Return the validator for the port. A default is supplied. This must be castable to ICellEditorValidator for the property sheet support.

Specified by:
getPortValidator in interface SubSystemFactory

renameSubSystemProfile

public void renameSubSystemProfile(SubSystem 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 SubSystemFactory

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 SubSystemFactory
Throws:
Exception

renameSubSystemProfile

public void renameSubSystemProfile(String oldProfileName,
                                   String newProfileName)
Called by SystemRegistry's renameSystemProfile method to ensure we update our filter pool manager names (and their folders)

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

Specified by:
renameSubSystemProfile in interface SubSystemFactory

renameSubSystemsByConnection

public void renameSubSystemsByConnection(SystemConnection 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 SubSystemFactory

deleteSubSystemsByConnection

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

Specified by:
deleteSubSystemsByConnection in interface SubSystemFactory

invalidateSubSystemCache

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


getSubSystems

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

Specified by:
getSubSystems in interface SubSystemFactory

getSubSystems

public SubSystem[] getSubSystems(SystemConnection 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 SubSystemFactory
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 SubSystem[] internalGetSubSystems(SystemConnection conn)
Private method to subset master list of all subsystems by a given connection


getSubSystems

public SubSystem[] getSubSystems(SystemProfile 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 SubSystem[] getSubSystems(SystemFilterPool pool)
Returns a list of subsystem objects existing in memory, which contain a reference to the given filter pool.


addSubSystem

protected void addSubSystem(SubSystem 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(SubSystem 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 SubSystem createSubSystem(SystemConnection 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 SubSystemFactory
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 getNewConnectionWizardPages(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 SubSystem cloneSubSystem(SubSystem oldSubsystem,
                                SystemConnection 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 SubSystemFactory
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(SubSystem 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

protected SubSystem createSubSystemInternal(SystemConnection conn)
Method called by default implementation of createSubSystem method in AbstractSubSystemFactory. Use your EMF model createXXXSubSystem() method to create the subsystem object. All core attributes are set for you upon return. You need only initialize any unique attributes for your SubSystem subclass. noteThis method should be abstract but EMF didn't allow abstract impl classes at the point of design

Parameters:
conn - The connection object this is being created for. Only passed for your interest.

initializeSubSystem

protected void initializeSubSystem(SubSystem 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 getNewConnectionWizardPages(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(SubSystem oldSubSystem,
                                 SubSystem newSubSystem)
OVERRIDABLE METHOD FOR CHILD CLASSES TO COPY THEIR UNIQUE SUBSYSTEM DATA AFTER COPY OPERATION noteThis method should be abstract but MOF doesn't allow abstract impl classes at this point


updateSubSystem

public void updateSubSystem(Shell shell,
                            SubSystem subsystem,
                            boolean updateUserId,
                            String userId,
                            boolean updatePort,
                            Integer port)
Updates user-editable attributes 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().xxx(...).

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

Specified by:
updateSubSystem in interface SubSystemFactory
Parameters:
shell - parent shell needed in case an error message is displayed
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(Shell shell,
                             SubSystem subsystem,
                             int port)
Update the port for the given subsystem instance. Shortcut to updateSubSystem(Shell,SubSystem,boolean,String,boolean,Integer)

Specified by:
setSubSystemPort in interface SubSystemFactory

setSubSystemUserId

public void setSubSystemUserId(Shell shell,
                               SubSystem subsystem,
                               String userId)
Update the user ID for the given subsystem instance. Shortcut to updateSubSystem(Shell,SubSystem,boolean,String,boolean,Integer)

Specified by:
setSubSystemUserId in interface SubSystemFactory

needsUpdate

protected boolean needsUpdate(SubSystem subsystem,
                              boolean updateUserId,
                              String userId,
                              boolean updatePort,
                              Integer 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 SubSystemFactory

deleteSubSystem

public boolean deleteSubSystem(SubSystem 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 SubSystemFactory

renameSubSystem

public void renameSubSystem(SubSystem 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 SubSystemFactory

getSubSystemActions

public IAction[] getSubSystemActions(SubSystem selectedSubSystem,
                                     Shell shell)
Returns a list of actions for the popup menu when user right clicks on a subsystem object from this factory. By default returns a single item array with a SystemNewFilterPoolAction object and calls overridable method getAdditionalSubSystemActions.

If you wish to support more actions, override getAdditionalSubSystemActions to return a Vector of IAction objects.

Specified by:
getSubSystemActions in interface SubSystemFactory
Parameters:
selectedSubSystem - the currently selected subsystem
shell - The Shell of the view where this action was launched from
Returns:
array of IAction objects to contribute to the popup menu
See Also:
getSubSystemNewFilterPoolActions(SubSystem, Shell), getAdditionalSubSystemActions(SubSystem, Shell)

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

Specified by:
configureNewFilterAction in interface ISystemNewFilterActionConfigurator
Parameters:
newFilterAction - - the action to be configured
callerData - - context data that you supplied when registering this callback

getNewFilterWizardPoolWrapperInformation

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


getSubSystemNewFilterPoolActions

protected IAction[] getSubSystemNewFilterPoolActions(SubSystem selectedSubSystem,
                                                     Shell shell)
Overridable entry for child classes to supply their own "new" action(s) for creating a filter pool. By default, this creates an action for creating a new filter pool and a new filter pool reference.

Parameters:
selectedSubSystem - the currently selected subsystem
shell - The Shell of the view where this action was launched from
Returns:
array of IAction objects to contribute to the popup menu

getAdditionalSubSystemActions

protected Vector getAdditionalSubSystemActions(SubSystem selectedSubSystem,
                                               Shell shell)
Overridable entry for child classes to contribute subsystem actions beyond the default supplied actions.

By default, returns null.

Returns:
Vector of IAction objects.
See Also:
getSubSystemActions(SubSystem,Shell)

disconnectAllSubSystems

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

Specified by:
disconnectAllSubSystems in interface SubSystemFactory
Throws:
Exception

getTypeFiltersFolder

protected IFolder getTypeFiltersFolder()
Return the folder where type filters go for this subsystem factory...


createDefaultFilterPool

protected SystemFilterPool createDefaultFilterPool(SystemFilterPoolManager 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(SystemFilterPoolManager) to find out if it is.


isUserPrivateProfile

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


getDefaultSystemFilterPool

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

Specified by:
getDefaultSystemFilterPool in interface SubSystemFactory

getDefaultSystemFilterPool

public SystemFilterPool getDefaultSystemFilterPool(SystemProfile 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 SystemFilterPoolManager[] 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 SystemFilterPoolManager[] getActiveFilterPoolManagers()
Get the filter pool managers for the active profiles.


getFilterPoolManager

public SystemFilterPoolManager getFilterPoolManager(SystemProfile profile)
Get the filter pool manager for the given profile

Specified by:
getFilterPoolManager in interface SubSystemFactory

doPostRestoreProcessing

protected boolean doPostRestoreProcessing(SystemFilterPoolManager 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 SystemFilterPoolManager copyFilterPoolManager(SystemProfile oldProfile,
                                                     SystemProfile 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 SubSystemFactory
Throws:
Exception

getSystemFilterPoolManager

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

Specified by:
getSystemFilterPoolManager in interface SystemFilterPoolManagerProvider

getSystemFilterPoolManagers

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

Specified by:
getSystemFilterPoolManagers in interface SystemFilterPoolManagerProvider

getReferencableSystemFilterPoolManagers

public SystemFilterPoolManager[] getReferencableSystemFilterPoolManagers(SystemFilterPoolReferenceManager 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 SystemFilterPoolManagerProvider

getSystemFilterPoolForBrokenReference

public SystemFilterPool getSystemFilterPoolForBrokenReference(SystemFilterPoolReferenceManager 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 SystemFilterPoolManagerProvider

getSystemFilterPoolManagerImage

public ImageDescriptor getSystemFilterPoolManagerImage()
Supply the image to be used for filter pool managers, within actions. REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE

Specified by:
getSystemFilterPoolManagerImage in interface SystemFilterPoolManagerProvider

getSystemFilterPoolImage

public ImageDescriptor getSystemFilterPoolImage(SystemFilterPool filterPool)
Supply the image to be used for filter pools, within actions. REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE

Specified by:
getSystemFilterPoolImage in interface SystemFilterPoolManagerProvider

getSystemFilterImage

public ImageDescriptor getSystemFilterImage(SystemFilter filter)
Supply the image to be used for filters, within actions. REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE

Specified by:
getSystemFilterImage in interface SystemFilterPoolManagerProvider

getSystemFilterStringImage

public ImageDescriptor getSystemFilterStringImage(SystemFilterString filterString)
Specified by:
getSystemFilterStringImage in interface SystemFilterPoolManagerProvider

getSystemFilterStringImage

public ImageDescriptor getSystemFilterStringImage(String filterStringString)
Specified by:
getSystemFilterStringImage in interface SystemFilterPoolManagerProvider

addFilterPoolManager

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


getFilterPoolManager

protected SystemFilterPoolManager getFilterPoolManager(SystemFilterPool pool)
Get the filter pool manager for the given filter pool


getFilterPoolManager

protected SystemFilterPoolManager getFilterPoolManager(SystemFilterContainer poolOrFilter)
Get the filter pool manager for the given filter pool or filter


getFilterPoolManager

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


getFilterPoolManager

protected SystemFilterPoolManager getFilterPoolManager(SystemConnection conn)
Get the filter pool manager for the given connection


getFilterPoolManagerName

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


getSystemProfileName

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


deleteFilterPoolManager

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


renameFilterPoolManager

protected void renameFilterPoolManager(SystemProfile profile)
Rename the filter pool manager associated with the given profile


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,
                                  SubSystem 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,
                                  SystemProfile profile)
Fire given event to all subsystems in the given profile


fireSubSystemFilterEvent

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


fireSubSystemFilterEvent

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


fireSubSystemFilterEvent

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


fireSubSystemFilterEvent

protected void fireSubSystemFilterEvent(int eventId,
                                        SystemFilterString filterString)

fireSubSystemFilterEvent

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

fireSubSystemFilterEvent

protected void fireSubSystemFilterEvent(SystemResourceChangeEvent event,
                                        SystemFilterString filterString)

filterEventFilterPoolCreated

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

Specified by:
filterEventFilterPoolCreated in interface SystemFilterPoolManagerProvider

filterEventFilterPoolDeleted

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

Specified by:
filterEventFilterPoolDeleted in interface SystemFilterPoolManagerProvider

filterEventFilterPoolRenamed

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

Specified by:
filterEventFilterPoolRenamed in interface SystemFilterPoolManagerProvider

filterEventFilterPoolsRePositioned

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

Specified by:
filterEventFilterPoolsRePositioned in interface SystemFilterPoolManagerProvider

filterEventFilterCreated

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

Specified by:
filterEventFilterCreated in interface SystemFilterPoolManagerProvider

filterEventFilterDeleted

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

Specified by:
filterEventFilterDeleted in interface SystemFilterPoolManagerProvider

filterEventFilterRenamed

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

Specified by:
filterEventFilterRenamed in interface SystemFilterPoolManagerProvider

filterEventFilterUpdated

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

Specified by:
filterEventFilterUpdated in interface SystemFilterPoolManagerProvider

filterEventFiltersRePositioned

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

Specified by:
filterEventFiltersRePositioned in interface SystemFilterPoolManagerProvider

filterEventFilterStringCreated

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

Specified by:
filterEventFilterStringCreated in interface SystemFilterPoolManagerProvider

filterEventFilterStringDeleted

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

Specified by:
filterEventFilterStringDeleted in interface SystemFilterPoolManagerProvider

filterEventFilterStringUpdated

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

Specified by:
filterEventFilterStringUpdated in interface SystemFilterPoolManagerProvider

filterEventFilterStringsRePositioned

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

Specified by:
filterEventFilterStringsRePositioned in interface SystemFilterPoolManagerProvider

getFilterPool

public SystemFilterPool getFilterPool(SystemProfile profile,
                                      String name)
Returns a filter pool, given its profile and pool name


getFilterPools

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


getFilterPoolActions

public IAction[] getFilterPoolActions(SystemFilterPool selectedPool,
                                      Shell shell)
Returns a list of actions for the popup menu when user right clicks on a filter pool object within a subsystem of this factory. Only supported and used by subsystems that support filters.

YOU DO NOT NEED TO OVERRIDE THIS METHOD.

Most actions are handled in this base, except if you have your own action for creating a new filter. In this case, override getNewFilterAction() To add additional actions, override getAdditionalFilterPoolActions(SystemFilterPool selectedPool, Shell shell).

Specified by:
getFilterPoolActions in interface SubSystemFactory
Parameters:
shell - parent shell of viewer where the popup menu is being constructed

getAdditionalFilterPoolActions

protected Vector getAdditionalFilterPoolActions(SystemFilterPool selectedPool,
                                                Shell shell)
Overridable entry for child classes to contribute filter pool actions beyond the default supplied actions.

By default, this returns null.

Parameters:
shell - parent shell of viewer where the popup menu is being constructed
Returns:
Vector of IAction objects.
See Also:
getFilterPoolActions(SystemFilterPool,Shell)

getNewFilterPoolFilterActions

protected IAction[] getNewFilterPoolFilterActions(SystemFilterPool selectedPool,
                                                  Shell shell)
Overridable method to return the actions for creating a new filter in a filter pool. By default returns one action created by calling getNewFilterPoolFilterAction(SystemFilterPool, Shell).

If you have multiple actions for creating new filters, override this.

If you have only a single action for creating new filters, override getNewFilterPoolFilterAction (without the 's').

Parameters:
shell - parent shell of viewer where the popup menu is being constructed

getNewFilterPoolFilterAction

protected IAction getNewFilterPoolFilterAction(SystemFilterPool selectedPool,
                                               Shell shell)
Overridable method to return the single action for creating a new filter in a filter pool. By default returns a default supplied action for this.

If you have multiple actions for creating new filters, override getNewFilterPoolFilterActions (note the 's').

If you have only a single action for creating new filters, override this.

Parameters:
shell - parent shell of viewer where the popup menu is being constructed

getNewNestedFilterAction

protected IAction getNewNestedFilterAction(SystemFilter selectedFilter,
                                           Shell shell)
Overridable method to return the action for creating a new nested filter inside another filter. By default returns getNewFilterPoolFilterAction(selectedFilter.getParentFilterPool(),shell).

Parameters:
shell - parent shell of viewer where the popup menu is being constructed

getChangeFilterAction

protected IAction getChangeFilterAction(SystemFilter selectedFilter,
                                        Shell shell)
Overridable method to return the action for changing an existing filter. By default returns new SystemChangeFilterAction, unless the filter's isSingleFilterStringOnly() returns true, in which case null is returned.

Parameters:
selectedFilter - the currently selected filter
shell - parent shell of viewer where the popup menu is being constructed

customizeChangeFilterPropertyPage

public void customizeChangeFilterPropertyPage(SystemChangeFilterPropertyPage page,
                                              SystemFilter selectedFilter,
                                              Shell shell)
In addition to a change filter action, we now also support the same functionality via a Properties page for filters. When this page is activated, this method is called to enable customization of the page, given the selected filter.

By default, this method will call getChangeFilterAction(SystemFilter, Shell) to get your change filter action, and will configure the given page from the dialog created by your change filter action.

If your filter uses its own Change Filter dialog, versus subclassing or configuring SystemChangeFilterDialog you will have to override this method and specify the following information for the supplied page (via its setters):

Specified by:
customizeChangeFilterPropertyPage in interface SubSystemFactory

showChangeFilterStringsPropertyPage

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

Specified by:
showChangeFilterStringsPropertyPage in interface SubSystemFactory

customizeFilterStringPropertyPage

public void customizeFilterStringPropertyPage(SystemFilterStringPropertyPage page,
                                              SystemFilterString selectedFilterString,
                                              Shell shell)
In addition to a change filter action, we now also support the same functionality via a Properties page for filter strings, in the Team View. When this page is activated, this method is called to enable customization of the page, given the selected filter string.

By default, this method will call getChangeFilterAction(SystemFilter, Shell) to get your change filter action, and will configure the given page from the dialog created by your change filter action.

If your filter uses its own Change Filter dialog, versus subclassing or configuring SystemChangeFilterDialog you will have to override this method and specify the following information for the supplied page (via its setters):

Specified by:
customizeFilterStringPropertyPage in interface SubSystemFactory

testForActiveReferences

public SubSystem[] testForActiveReferences(SystemProfile 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 SubSystemFactory
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.

getFilterPoolReferenceActions

public IAction[] getFilterPoolReferenceActions(SystemFilterPoolReference selectedPoolRef,
                                               Shell shell)
Returns a list of actions for the popup menu when user right clicks on a filter pool reference object within a subsystem of this factory. Note, these are added to the list returned by getFilterPoolActions(). Only supported by subsystems that support filters.

Specified by:
getFilterPoolReferenceActions in interface SubSystemFactory
Parameters:
selectedPoolRef - the currently selected pool reference
shell - parent shell of viewer where the popup menu is being constructed

getAdditionalFilterPoolReferenceActions

protected Vector getAdditionalFilterPoolReferenceActions(SystemFilterPool selectedPool,
                                                         Shell shell)
Overridable entry for child classes to contribute filter pool reference actions beyond the default supplied actions.

By default, this returns null.

Parameters:
shell - parent shell of viewer where the popup menu is being constructed
Returns:
Vector of IAction objects.
See Also:
getFilterPoolReferenceActions(SystemFilterPoolReference,Shell)

getRemoveFilterPoolReferenceAction

protected IAction getRemoveFilterPoolReferenceAction(SystemFilterPool selectedPool,
                                                     Shell shell)
Overridable method to return the action for removing a filter pool reference. By default returns new SystemRemoveFilterPoolReferenceAction.

Parameters:
shell - parent shell of viewer where the popup menu is being constructed

getTranslatedFilterTypeProperty

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

Specified by:
getTranslatedFilterTypeProperty in interface SubSystemFactory

createFilterByPrompting

public SystemFilter createFilterByPrompting(SystemFilterReference referenceToPromptableFilter,
                                            Shell shell)
                                     throws Exception
Prompt the user to create a new filter as a result of the user expanding a promptable filter.

This base implementation prompts using the generic filter prompt. You should override this but copy this code to use as a base/example how to do this.

Specified by:
createFilterByPrompting in interface SubSystemFactory
Returns:
the filter created by the user or null if they cancelled the prompting
Throws:
Exception

getFilterActions

public IAction[] getFilterActions(SystemFilter selectedFilter,
                                  Shell shell)
Returns a list of actions for the popup menu when user right clicks on a filter object.

Only supported and used by subsystems that support filters.

YOU DO NOT NEED TO OVERRIDE THIS METHOD.

Most actions are handled in this base, except if you have your own action for creating a new nested filter. In this case, override getNewFilterAction()

Specified by:
getFilterActions in interface SubSystemFactory

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 SubSystemFactory

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 SubSystemFactory

getAdditionalFilterActions

protected Vector getAdditionalFilterActions(SystemFilter selectedFilter,
                                            Shell shell)
Overridable entry for child classes to contribute filter actions beyond the default supplied actions.

By default, this returns null.

Returns:
Vector of IAction objects.
See Also:
getFilterActions(SystemFilter,Shell)

getFilterReferenceActions

public IAction[] getFilterReferenceActions(SystemFilterReference selectedFilterRef,
                                           Shell shell)
Returns a list of actions for the popup menu when user right clicks on a filter reference object within a subsystem of this factory. Only supported and used by subsystems that support filters.

YOU DO NOT NEED TO OVERRIDE THIS METHOD.

Most actions are handled in this base, except if you have your own action for creating a new filter. In this case, override getNewFilterAction() To add additional actions, override getAdditionalFilterReferenceActions(SystemFilterReference, Shell).

Specified by:
getFilterReferenceActions in interface SubSystemFactory
Parameters:
selectedFilterRef - the currently selected filter reference
shell - parent shell of viewer where the popup menu is being constructed

getAdditionalFilterReferenceActions

protected Vector getAdditionalFilterReferenceActions(SystemFilterReference selectedFilterRef,
                                                     Shell shell)
Overridable entry for child classes to contribute filter reference actions beyond the default supplied actions.

By default, this returns null.

Parameters:
selectedFilterRef - the currently selected filter reference
shell - parent shell of viewer where the popup menu is being constructed
Returns:
Vector of IAction objects.

createServerLauncher

public ServerLauncher createServerLauncher(SubSystem ss)
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() 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 IBMServerLauncher, but override to create your own ServerLauncher instance if you have your own class.


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() returns true.

We return com.ibm.etools.systems.core.ui.widgets.ServerLauncherForm. Override if appropriate.

Specified by:
getServerLauncherForm in interface SubSystemFactory

save

public boolean save()
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:
save in interface SubSystemFactory

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(SystemConnection 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(SubSystem 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 SubSystemFactory
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(SystemFilterPoolManager 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

restore

public boolean restore(SystemConnection connection)
Restores all information from disk for a given connection. Called by the framework for each active connection.

Handled for you!


restoreSubSystems

protected SubSystem[] restoreSubSystems(SystemConnection connection)
                                 throws Exception
Restore all subsystems from disk, for a given connection.

Throws:
Exception

subSystemsHaveBeenRestored

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


restoreSubSystem

protected SubSystem restoreSubSystem(SystemConnection connection,
                                     String fileName)
                              throws Exception
Restore a saved subsystem instance from disk, for a given connection. The connection and the unqualified file name of the saved subsystem is given to us.

After restoring the saved names of the referenced pools, we then resolve those names into memory references.

Throws:
Exception

restoreAllFilterPoolManagersForAllProfiles

public SystemFilterPoolManager[] 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.


getSubSystemsFolder

protected IFolder getSubSystemsFolder(SystemConnection connection)
Return the subsystems folder for a given connection


setConnection

public void setConnection(SystemConnection 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 SubSystemFactory

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 SubSystemFactory

handleException

protected void handleException(String msg,
                               Exception exc)

initMOF

protected SubsystemsFactory initMOF()
Initialize the EMF package. Need only be done once. This does not need to be, and should not be, overridden by subclasses.


initSubSystemMOF

protected void initSubSystemMOF()
If you use EMF you must override this method and instantiate your EMF xxxFactoryImpl() and xxxxPackageImpl(xxxfactory) objects.

If you do no use MEF, then simpy override to do nothing. noteThis method should be abstract but MOF doesn't allow abstract impl classes at this point


getMOFHelpers

protected SystemMOFHelpers getMOFHelpers()
Return EMF helpers instance.


getSSMOFfactory

public static SubsystemsFactory getSSMOFfactory()
Return the EMF factory


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)
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 EList getSubSystemList()
Description copied from interface: SubSystemFactory
Private. Do not call or use.

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

getFilterPoolManagerList

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

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

eInverseRemove

public NotificationChain eInverseRemove(InternalEObject otherEnd,
                                        int featureID,
                                        Class baseClass,
                                        NotificationChain msgs)


eGet

public Object eGet(EStructuralFeature eFeature,
                   boolean resolve)


eSet

public void eSet(EStructuralFeature eFeature,
                 Object newValue)


eUnset

public void eUnset(EStructuralFeature eFeature)


eIsSet

public boolean eIsSet(EStructuralFeature eFeature)


Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.