|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.rse.core.subsystems.SubSystemConfiguration
Abstract base class for subsystem factory extension points. Child classes must implement the methods:
A factory will maintain in memory a list of all subsystem objects it has. This list should be initialize from disk at restore time, and maintained as the subsystems are created and deleted throughout the session. At save time, each subsystem in the list is asked to save itself. The getSubSystems method should return this list.
To help with maintaining this list, this base class contains a Vector instance variable named subsystems. It is returned by the getSubSystems method in this base class. For this to be accurate you though, you should:
| Field Summary | |
|---|---|
protected boolean |
_isDirty
|
protected static IHost |
currentlyProcessingConnection
|
protected static SubSystemConfiguration |
currentlyProcessingSubSystemConfiguration
|
protected Object[] |
currentlySelected
|
protected IHost |
currentlySelectedConnection
|
protected SubSystemFilterNamingPolicy |
filterNamingPolicy
|
protected List |
filterPoolManagerList
|
protected ISystemFilterPoolManager[] |
filterPoolManagers
|
protected Hashtable |
filterPoolManagersPerProfile
|
protected Hashtable |
imageTable
|
protected List |
subSystemList
|
| Fields inherited from interface org.eclipse.rse.core.subsystems.ISubSystemConfiguration |
|---|
FORCE_INTO_MEMORY, LAZILY |
| Constructor Summary | |
|---|---|
SubSystemConfiguration()
Constructor |
|
| Method Summary | |
|---|---|
protected void |
addFilterPoolManager(ISystemProfile profile,
ISystemFilterPoolManager mgr)
Add the given filter pool manager object to internal lists |
protected void |
addSubSystem(ISubSystem subsys)
Helper method to allow child classes to add a subsystem object to the in-memory list maintained and returned by this base class. |
void |
changingSystemProfileActiveStatus(ISystemProfile profile,
boolean newStatus)
Called by SystemRegistry when we have toggled the active-status of a profile |
protected SystemResourceChangeEvent |
cloneEvent(SystemResourceChangeEvent event,
Object parent)
|
ISubSystem |
cloneSubSystem(ISubSystem oldSubsystem,
IHost newConnection,
boolean copyProfileOperation)
Clone a given subsystem into the given connection. |
boolean |
commit()
Saves absolutely everything to disk. |
void |
configureNewFilterAction(SystemNewFilterAction newFilterAction,
Object callerData)
There is a reasonable amount of processing needed to configure filter wizards. |
ISystemFilterPoolManager |
copyFilterPoolManager(ISystemProfile oldProfile,
ISystemProfile newProfile)
Copy the filter pool manager and return a new one. |
protected void |
copySubSystemData(ISubSystem oldSubSystem,
ISubSystem newSubSystem)
Copy unique subsystem data after a copy operation. |
protected ISystemFilterPool |
createDefaultFilterPool(ISystemFilterPoolManager mgr)
Overridable lifecycle method. |
protected SystemResourceChangeEvent |
createEvent(Object[] src,
int eventId,
Object parent)
Helper method to create a multi-source event |
protected SystemResourceChangeEvent |
createEvent(Object[] src,
int eventId,
Object parent,
int delta)
Helper method to create a multi-source event |
protected SystemResourceChangeEvent |
createEvent(Object src,
int eventId,
Object parent)
Helper method to create a single-source event |
IServerLauncherProperties |
createServerLauncher(IConnectorService connectorService)
Overridable entry for child classes to contribute a server launcher instance for a given subsystem. |
ISubSystem |
createSubSystem(IHost conn,
boolean creatingConnection,
ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
Creates a new subsystem instance that is associated with the given connection object. |
ISubSystem |
createSubSystemAfterTheFact(IHost conn)
|
abstract ISubSystem |
createSubSystemInternal(IHost conn)
Method called by default implementation of createSubSystem method in AbstractSubSystemConfiguration. |
protected void |
deleteFilterPoolManager(ISystemProfile profile)
Delete the filter pool manager associated with the given profile |
boolean |
deleteSubSystem(ISubSystem subsystem)
Deletes a given subsystem instance from the list maintained by this factory. |
void |
deleteSubSystemsByConnection(IHost conn)
Called by SystemRegistry's deleteConnection method to ensure we delete all our subsystems for a given connection. |
void |
deletingSystemProfile(ISystemProfile profile)
Called by SystemRegistry when we are about to delete a profile. |
void |
disconnectAllSubSystems()
Disconnect all subsystems currently connected. |
protected boolean |
doPostRestoreProcessing(ISystemFilterPoolManager restoredFilterPoolMgr)
Do post-restore-processing of an existing filter pool manager. |
void |
filterEventFilterCreated(ISystemFilter newFilter)
A new filter has been created |
void |
filterEventFilterDeleted(ISystemFilter oldFilter)
A filter has been deleted |
void |
filterEventFilterPoolCreated(ISystemFilterPool newPool)
A new filter pool has been created |
void |
filterEventFilterPoolDeleted(ISystemFilterPool oldPool)
A filter pool has been deleted |
void |
filterEventFilterPoolRenamed(ISystemFilterPool pool,
String oldName)
A filter pool has been renamed |
void |
filterEventFilterPoolsRePositioned(ISystemFilterPool[] pools,
int delta)
One or more filter pools have been re-ordered within their manager |
void |
filterEventFilterRenamed(ISystemFilter filter,
String oldName)
A filter has been renamed |
void |
filterEventFiltersRePositioned(ISystemFilter[] filters,
int delta)
One or more filters have been re-ordered within their pool or filter (if nested) |
void |
filterEventFilterStringCreated(ISystemFilterString newFilterString)
A new filter string has been created |
void |
filterEventFilterStringDeleted(ISystemFilterString oldFilterString)
A filter string has been deleted |
void |
filterEventFilterStringsRePositioned(ISystemFilterString[] filterStrings,
int delta)
One or more filters have been re-ordered within their filter |
void |
filterEventFilterStringUpdated(ISystemFilterString filterString)
A filter string has been updated |
void |
filterEventFilterUpdated(ISystemFilter filter)
A filter's strings have been updated |
protected void |
fireEvent(Object[] multiSrc,
int eventId,
Object parent,
int delta)
Helper method to create and then fire an event with a position or delta... |
protected void |
fireEvent(Object src,
int eventId,
Object parent)
Helper method to create and then fire an event... |
protected void |
fireEvent(SystemResourceChangeEvent event)
Helper method to fire an event... |
protected void |
fireSubSystemEvent(SystemResourceChangeEvent event)
Fire given event to all currently known subsystems |
protected void |
fireSubSystemEvent(SystemResourceChangeEvent event,
ISubSystem subsystem)
Fire given event to the given subsystem |
protected void |
fireSubSystemEvent(SystemResourceChangeEvent event,
ISystemProfile profile)
Fire given event to all subsystems in the given profile |
protected void |
fireSubSystemFilterEvent(int eventId,
ISystemFilter filter)
Fire an event of a given id to subsystems that hold a reference to the given filter |
protected void |
fireSubSystemFilterEvent(int eventId,
ISystemFilter[] filters)
Fire an event of a given id to subsystems that hold a reference to the given filter |
protected void |
fireSubSystemFilterEvent(int eventId,
ISystemFilterString filterString)
|
protected void |
fireSubSystemFilterEvent(int eventId,
ISystemFilterString[] filterStrings,
int delta)
|
protected void |
fireSubSystemFilterEvent(SystemResourceChangeEvent event,
ISystemFilter filter)
Fire an event of a given id to subsystems that hold a reference to the given filter |
protected void |
fireSubSystemFilterEvent(SystemResourceChangeEvent event,
ISystemFilterString filterString)
|
ISystemFilterPoolManager[] |
getActiveFilterPoolManagers()
Get the filter pool managers for the active profiles. |
Object |
getAdapter(Class adapterType)
|
String |
getCategory()
Return the category this subsystem factory subscribes to. |
static String |
getConnectingMessage(String hostName,
int port)
Helper method to return the message "Connecting to &1..." |
ISystemFilterPool |
getDefaultFilterPool(ISystemProfile profile,
String oldProfileName)
Return the default filter pool for the given profile... |
static String |
getDefaultFilterPoolName(String profileName,
String factoryId)
Return the translated name of a default filter pool for a given profile |
ISystemFilterPool |
getDefaultSystemFilterPool(ISubSystem subsys)
Given a subsystem, return the first (hopefully only) default pool for this subsystem's profile. |
ISystemFilterPool |
getDefaultSystemFilterPool(ISystemProfile profile)
Given a profile, return the first (hopefully only) default pool for this profile. |
String |
getDescription()
Return name of this factory. |
static String |
getDisconnectingMessage(String hostName,
int port)
Helper method to return the message "Disconnecting from &1..." |
ISystemFilterPool |
getFilterPool(ISystemProfile profile,
String name)
Returns a filter pool, given its profile and pool name |
protected ISystemFilterPoolManager |
getFilterPoolManager(IHost conn)
Get the filter pool manager for the given connection |
protected ISystemFilterPoolManager |
getFilterPoolManager(ISystemFilterContainer poolOrFilter)
Get the filter pool manager for the given filter pool or filter |
protected ISystemFilterPoolManager |
getFilterPoolManager(ISystemFilterContainerReference poolOrFilterReference)
Get the filter pool manager for the given reference to a filter pool or filter |
protected ISystemFilterPoolManager |
getFilterPoolManager(ISystemFilterPool pool)
Get the filter pool manager for the given filter pool |
ISystemFilterPoolManager |
getFilterPoolManager(ISystemProfile profile)
Get the filter pool manager for the given profile |
List |
getFilterPoolManagerList()
Private. |
protected String |
getFilterPoolManagerName(ISystemProfile profile)
Return the name of the filter pool manager, given the profile. |
ISystemFilterPoolManager[] |
getFilterPoolManagers()
Return an array of all filter pool managers owned by this subsystem factory. |
ISystemFilterPool[] |
getFilterPools(ISystemProfile profile)
Returns an array of filter pool objects within a profile. |
Image |
getGraphicsImage()
Return actual graphics Image of this factory. |
Image |
getGraphicsLiveImage()
Return actual graphics LiveImage of this factory. |
String |
getId()
Return unique id of this factory. |
ImageDescriptor |
getImage()
Return image descriptor of this factory. |
ImageDescriptor |
getLiveImage()
Return image to use when this susystem is connection. |
String |
getName()
Return name of this factory. |
protected SystemFilterPoolWrapperInformation |
getNewFilterWizardPoolWrapperInformation()
Overridable entry for child classes to supply their own flavour of ISystemFilterPoolWrapperInformation for the new filter wizards. |
ISystemFilterPoolManager[] |
getReferencableSystemFilterPoolManagers(ISystemFilterPoolReferenceManager refMgr)
Return all the manager objects this provider owns, to which it wants to support referencing from the given filter reference manager. |
IServerLauncherForm |
getServerLauncherForm(Shell shell,
ISystemMessageLine msgLine)
Return the form used in the property page, etc for this server launcher. |
ISubSystemConfigurationProxy |
getSubSystemConfigurationProxy()
The following is here for completeness but should never be needed. |
List |
getSubSystemList()
Private. |
ISystemSubSystemPropertyPageCoreForm |
getSubSystemPropertyPageCoreFrom(ISystemMessageLine msgLine,
Object caller)
|
protected List |
getSubSystemPropertyPages()
Gets the list of property pages applicable for a subsystem associated with this factory |
ISubSystem[] |
getSubSystems(boolean force)
Return list of all subsystems. |
ISubSystem[] |
getSubSystems(IHost conn,
boolean force)
Returns a list of subsystem objects existing for the given connection. |
ISubSystem[] |
getSubSystems(ISystemFilterPool pool)
Returns a list of subsystem objects existing in memory, which contain a reference to the given filter pool. |
ISubSystem[] |
getSubSystems(ISystemProfile profile)
Returns a list of subsystem objects existing for all the connections in the given profile. |
ISystemFilterPool |
getSystemFilterPoolForBrokenReference(ISystemFilterPoolReferenceManager callingRefMgr,
String missingPoolMgrName,
String missingPoolName)
Last chance call, by a filter pool reference manager, when a reference to a filter pool is found but the referenced master filter pool is not found in those the reference manager by getSystemFilterPoolManagers(). |
ISystemFilterPoolManager |
getSystemFilterPoolManager(String mgrName)
Get the filter pool manager for the given profile. |
ISystemFilterPoolManager[] |
getSystemFilterPoolManagers()
Get the filter pool manager for the given profile. |
protected ISystemProfile |
getSystemProfile(ISystemFilter filter)
Get a profile object given a filter object |
ISystemProfile |
getSystemProfile(ISystemFilterPool pool)
Get owning profile object given a filter pool object |
protected ISystemProfile |
getSystemProfile(ISystemFilterPoolManager poolMgr)
Get a profile object given a filter pool manager object |
ISystemProfile |
getSystemProfile(String name)
Get a profile object given its name |
protected String |
getSystemProfileName(ISystemFilterPoolManager manager)
Return the name of the profile, given the filter pool manager |
String[] |
getSystemTypes()
Return the system types this subsystem factory supports. |
String |
getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
Return the translated string to show in the property sheet for the type property. |
ISystemValidator |
getUserIdValidator()
Return the validator for the userId. |
String |
getVendor()
Return vendor of this factory. |
protected void |
handleException(String msg,
Exception exc)
|
protected void |
initializeSubSystem(ISubSystem ss,
ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
Overridable method to initialize subsystems after creation. |
protected String |
internalGetSubSystemName(ISubSystem subsys)
Overridable. |
protected ISubSystem[] |
internalGetSubSystems(IHost conn)
Private method to subset master list of all subsystems by a given connection |
void |
invalidateFilterCache()
Invalidate any internal caches related to filters |
protected void |
invalidateSubSystemCache(IHost conn)
Invalidate internal cached array of subsystems. |
boolean |
isCaseSensitive()
Tell us if filter strings are case sensitive. |
boolean |
isDirty()
An object is dirty if a change has been made to it that requires it to be persisted. |
boolean |
isFactoryFor(Class subSystemType)
Determines whether this factory is responsible for the creation of subsytems of the specified type Subsystem factories should override this to indicate which subsystems they support. |
boolean |
isPortEditable()
Return true (default) or false to indicate if subsystems of this factory support user-editable port numbers. |
boolean |
isSubSystemsDeletable()
Returns true if this factory allows users to delete instances of subsystem objects. |
protected boolean |
isUserPrivateProfile(ISystemFilterPoolManager mgr)
Return true if the given filter pool manager maps to the private profile for this user. |
protected boolean |
needsUpdate(ISubSystem subsystem,
boolean updateUserId,
String userId,
boolean updatePort,
int port)
Used by child classes that override updateSubSystem to establish if anything really needs to be changed. |
void |
preTestRenameSubSystemProfile(String oldProfileName)
Called by SystemRegistry's renameSystemProfile method to pre-test if we are going to run into errors on a profile rename, due to file or folder in use. |
boolean |
providesCustomDropInFilters()
Return true if filters of this subsystem factory provide a custom implementation of drop support. |
protected void |
removeSubSystem(ISubSystem subsys)
Helper method to allow child classes to remove a subsystem object from the in-memory list maintained and returned by this base class. |
void |
renameFilterPoolManager(ISystemProfile profile)
Rename the filter pool manager associated with the given profile |
void |
renameSubSystem(ISubSystem subsystem,
String newName)
Renames a subsystem. |
void |
renameSubSystemProfile(ISubSystem ss,
String oldProfileName,
String newProfileName)
Called by SystemRegistry's renameSystemProfile method to ensure we update our subsystem names within each subsystem. |
void |
renameSubSystemsByConnection(IHost conn,
String newConnectionName)
Called by SystemRegistry's renameConnection method to ensure we update our connection names within each subsystem. |
void |
reset()
Reset for a full refresh from disk, such as after a team synch. |
ISystemFilterPoolManager[] |
restoreAllFilterPoolManagersForAllProfiles()
Get all the filter pool managers for all the profiles, active or not. |
boolean |
saveFilterPools()
Saves all filter information to disk for all profiles. |
void |
saveFilterPools(ISystemFilterPoolManager mgr)
Saves all filter information to disk for the given profile. |
void |
saveSubSystem(ISubSystem subsys)
Attempt to save single subsystem to disk. |
void |
saveSubSystems()
Save all subsystems for all connections to disk. |
void |
saveSubSystems(IHost conn)
Save all subsystems for a given connection to disk. |
void |
setConnection(IHost connection)
Called by adapters prior to asking for actions, in case the connection of the currently selected object is required by the action. |
void |
setCurrentSelection(Object[] selection)
Called by adapters prior to asking for actions. |
void |
setDirty(boolean flag)
An object is dirty if a change has been made to it that requires it to be persisted. |
void |
setShowFilterPools(boolean show)
If we support filters, should we show filter pools in the remote system explorer? |
void |
setSubSystemConfigurationProxy(ISubSystemConfigurationProxy proxy)
The following is called for you by the SubSystemConfigurationProxy, after starting this object via the extension point mechanism |
void |
setSubSystemPort(ISubSystem subsystem,
int port)
Update the port for the given subsystem instance. |
void |
setSubSystemUserId(ISubSystem subsystem,
String userId)
Update the user ID for the given subsystem instance. |
void |
setWasRestored(boolean flag)
The the "restored" state of the object. |
boolean |
showChangeFilterStringsPropertyPage(ISystemFilter filter)
Given a filter, decide whether to show the Filter Strings property page for this filter. |
boolean |
showFilterPools()
If we support filters, should we show filter pools in the remote system explorer? |
boolean |
showGenericShowInTableOnFilter()
Return true if we should show the show in table action in the popup for the given element. |
boolean |
showRefreshOnFilter()
Return true if we should show the refresh action in the popup for the given element. |
protected boolean |
subSystemsHaveBeenRestored(IHost connection)
Return true if the subsystems for a given connection have been restored yet or not |
boolean |
supportsCommands()
Return true if subsystem instances from this factory support remote command execution RETURNS FALSE BY DEFAULT. |
boolean |
supportsCompileActions()
Return true if you support compile actions for the remote system objects returned from expansion of subsystems created by this subsystem factory. |
boolean |
supportsDropInFilters()
Return true if filters of this subsystem factory support dropping into. |
boolean |
supportsDuplicateFilterStrings()
Tell us if duplicate filter strings are supported. |
boolean |
supportsFileTypes()
Return true if you support user-defined/managed named file types RETURNS false BY DEFAULT |
boolean |
supportsFilterCaching()
Required method for subsystem factory child classes. |
boolean |
supportsFilterChildren()
Indicates whether the subsystem supports displaying children under its filters. |
boolean |
supportsFilters()
Return true if you support filters, false otherwise. |
boolean |
supportsFilterStringExport()
Return true if the subsystem supports the exporting of filter strings from it's filters RETURNS true BY DEFAULT |
boolean |
supportsMultipleFilterStrings()
Required method for subsystem factory child classes. |
boolean |
supportsMultiStringFilters()
Return true if the subsystem supports more than one filter string RETURNS true BY DEFAULT |
boolean |
supportsNestedFilters()
Required method for subsystem factory child classes if returning true from supportsFilters. |
boolean |
supportsProperties()
Return true if subsystem instances from this factory support getting and setting properties RETURNS FALSE BY DEFAULT. |
boolean |
supportsQuickFilters()
Return true if you support quick filters. |
boolean |
supportsServerLaunchProperties(IHost host)
Tell us if this subsystem factory supports server launch properties, which allow the user to configure how the server-side code for these subsystems are started. |
boolean |
supportsServerLaunchType(ServerLaunchType serverLaunchType)
If supportsServerLaunchProperties(IHost) returns true, this method may be called by
the server launcher to decide if a given remote server launch type is supported or not.
|
boolean |
supportsSubSystemConnect()
Return true if instance of this factory's subsystems support connect and disconnect actions. |
boolean |
supportsTargets()
Tell us if this subsystem factory supports targets, which are destinations for pushes and builds. |
boolean |
supportsUserDefinedActions()
Return true if you support user-defined actions for the remote system objects returned from expansion of subsystems created by this subsystem factory RETURNS false BY DEFAULT |
boolean |
supportsUserDefinedActions(ISelection selection)
Return true if you support user-defined actions for the remote system objects explicitly given. |
ISubSystem[] |
testForActiveReferences(ISystemProfile profile)
Test if any filter pools in the given profile are referenced by other profiles, which are active. |
String |
toString()
Return object as printable string. |
void |
updateSubSystem(ISubSystem subsystem,
boolean updateUserId,
String userId,
boolean updatePort,
int port)
Updates userid and/or port of an existing subsystem instance. |
boolean |
wasRestored()
An object was restored if it originated from a persistent form. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.rse.core.subsystems.ISubSystemConfiguration |
|---|
getConnectorService |
| Field Detail |
protected SubSystemFilterNamingPolicy filterNamingPolicy
protected ISystemFilterPoolManager[] filterPoolManagers
protected Hashtable filterPoolManagersPerProfile
protected Hashtable imageTable
protected IHost currentlySelectedConnection
protected Object[] currentlySelected
protected static IHost currentlyProcessingConnection
protected static SubSystemConfiguration currentlyProcessingSubSystemConfiguration
protected List subSystemList
protected List filterPoolManagerList
protected boolean _isDirty
| Constructor Detail |
public SubSystemConfiguration()
| Method Detail |
public void reset()
reset in interface ISubSystemConfigurationpublic boolean supportsSubSystemConnect()
supportsSubSystemConnect in interface ISubSystemConfigurationpublic boolean isPortEditable()
isPortEditable in interface ISubSystemConfigurationpublic boolean supportsCommands()
RETURNS FALSE BY DEFAULT.
supportsCommands in interface ISubSystemConfigurationpublic boolean supportsProperties()
RETURNS FALSE BY DEFAULT.
supportsProperties in interface ISubSystemConfigurationpublic boolean supportsFilters()
supportsFilters in interface ISubSystemConfigurationpublic boolean supportsFilterChildren()
supportsFilterChildren in interface ISubSystemConfigurationpublic boolean supportsFilterCaching()
Returns true in default implementation.
supportsFilterCaching in interface ISubSystemConfigurationpublic boolean supportsMultipleFilterStrings()
Returns TRUE by default.
supportsMultipleFilterStrings in interface ISubSystemConfigurationpublic boolean supportsNestedFilters()
RETURNS supportsFilters() BY DEFAULT.
supportsNestedFilters in interface ISubSystemConfigurationpublic boolean supportsQuickFilters()
RETURNS supportsFilters() BY DEFAULT.
THIS IS NOT SUPPORTED BY THE FRAMEWORK YET
supportsQuickFilters in interface ISubSystemConfigurationpublic boolean supportsDropInFilters()
supportsDropInFilters in interface ISubSystemConfigurationpublic boolean providesCustomDropInFilters()
providesCustomDropInFilters in interface ISubSystemConfigurationpublic boolean supportsUserDefinedActions()
RETURNS false BY DEFAULT
supportsUserDefinedActions in interface ISubSystemConfigurationsupportsUserDefinedActions(ISelection),
#getActionSubSystem(ISubSystem),
#createActionSubSystem()public boolean supportsUserDefinedActions(ISelection selection)
#getActionSubSystem(ISubSystem),
#createActionSubSystem(),
#addCommonRemoteActions(SystemMenuManager, IStructuredSelection, Shell, String, ISubSystem)public boolean supportsCompileActions()
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
supportsCompileActions in interface ISubSystemConfiguration#getCompileManager(),
#createCompileManager()public boolean supportsFileTypes()
RETURNS false BY DEFAULT
supportsFileTypes in interface ISubSystemConfigurationpublic boolean supportsMultiStringFilters()
RETURNS true BY DEFAULT
supportsMultiStringFilters in interface ISubSystemConfigurationpublic boolean supportsFilterStringExport()
RETURNS true BY DEFAULT
supportsFilterStringExport in interface ISubSystemConfigurationpublic boolean isCaseSensitive()
isCaseSensitive in interface ISubSystemConfigurationpublic boolean supportsDuplicateFilterStrings()
public boolean supportsTargets()
supportsTargets in interface ISubSystemConfigurationpublic boolean supportsServerLaunchProperties(IHost host)
If you return true here, you may also want to override supportsServerLaunchType(ServerLaunchType).
By default we return false here. This is overridden in UniversalFileSubSystemConfiguration though.
supportsServerLaunchProperties in interface ISubSystemConfigurationpublic boolean supportsServerLaunchType(ServerLaunchType serverLaunchType)
supportsServerLaunchProperties(IHost) returns true, this method may be called by
the server launcher to decide if a given remote server launch type is supported or not.
supportsServerLaunchType in interface ISubSystemConfigurationServerLaunchType,
getServerLauncherForm(Shell, ISystemMessageLine)public boolean isFactoryFor(Class subSystemType)
isFactoryFor in interface ISubSystemConfigurationsubSystemType - type of subsystem
public ISystemSubSystemPropertyPageCoreForm getSubSystemPropertyPageCoreFrom(ISystemMessageLine msgLine,
Object caller)
protected List getSubSystemPropertyPages()
public boolean showFilterPools()
showFilterPools in interface ISubSystemConfigurationpublic void setShowFilterPools(boolean show)
setShowFilterPools in interface ISubSystemConfigurationpublic void setSubSystemConfigurationProxy(ISubSystemConfigurationProxy proxy)
setSubSystemConfigurationProxy in interface ISubSystemConfigurationpublic ISubSystemConfigurationProxy getSubSystemConfigurationProxy()
getSubSystemConfigurationProxy in interface ISubSystemConfigurationpublic String getVendor()
getVendor in interface ISubSystemConfigurationpublic String getName()
getName in interface ISubSystemConfigurationpublic String getDescription()
getDescription in interface ISubSystemConfigurationpublic String getId()
getId in interface ISubSystemConfigurationpublic ImageDescriptor getImage()
public Image getGraphicsImage()
public ImageDescriptor getLiveImage()
public Image getGraphicsLiveImage()
public String getCategory()
getCategory in interface ISubSystemConfigurationISubSystemConfigurationCategoriespublic String[] getSystemTypes()
getSystemTypes in interface ISubSystemConfigurationpublic ISystemProfile getSystemProfile(String name)
getSystemProfile in interface ISubSystemConfigurationprotected ISystemProfile getSystemProfile(ISystemFilterPoolManager poolMgr)
public ISystemProfile getSystemProfile(ISystemFilterPool pool)
getSystemProfile in interface ISubSystemConfigurationprotected ISystemProfile getSystemProfile(ISystemFilter filter)
public void deletingSystemProfile(ISystemProfile 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.
deletingSystemProfile in interface ISubSystemConfiguration
public void changingSystemProfileActiveStatus(ISystemProfile profile,
boolean newStatus)
changingSystemProfileActiveStatus in interface ISubSystemConfigurationpublic ISystemValidator getUserIdValidator()
This must be castable to ICellEditorValidator for the property sheet support.
public void renameSubSystemProfile(ISubSystem ss,
String oldProfileName,
String newProfileName)
This is called AFTER changing the profile's name!!
renameSubSystemProfile in interface ISubSystemConfiguration
public void preTestRenameSubSystemProfile(String oldProfileName)
throws Exception
preTestRenameSubSystemProfile in interface ISubSystemConfigurationException
public ISystemFilterPool getDefaultFilterPool(ISystemProfile profile,
String oldProfileName)
getDefaultFilterPool in interface ISubSystemConfiguration
public void renameSubSystemsByConnection(IHost conn,
String newConnectionName)
Must be called prior to changing the connection's name!!
renameSubSystemsByConnection in interface ISubSystemConfigurationpublic void deleteSubSystemsByConnection(IHost conn)
deleteSubSystemsByConnection in interface ISubSystemConfigurationprotected void invalidateSubSystemCache(IHost conn)
public ISubSystem[] getSubSystems(boolean force)
getSubSystems in interface ISubSystemConfigurationforce - true if we should force all the subsystems to be restored from disk if not already
public ISubSystem[] getSubSystems(IHost conn,
boolean force)
getSubSystems in interface ISubSystemConfigurationconn - System connection to retrieve subsystems forforce - true if we should force all the subsystems to be restored from disk if not alreadyprotected ISubSystem[] internalGetSubSystems(IHost conn)
public ISubSystem[] getSubSystems(ISystemProfile profile)
public ISubSystem[] getSubSystems(ISystemFilterPool pool)
protected void addSubSystem(ISubSystem subsys)
protected void removeSubSystem(ISubSystem subsys)
public ISubSystem createSubSystem(IHost conn,
boolean creatingConnection,
ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
This method doe sthe following:
createSubSystemInternal(IHost) to create the subsystem
supportsFilters(), creates a ISystemFilterPoolReferenceManager for the
subsystem to manage references to filter pools
createServerLauncher(IConnectorService), to create
the server launcher instance to associate with this subsystem. This can be subsequently
retrieved via calling subsystem's ISubSystem#getRemoteServerLauncher().
initializeSubSystem(ISubSystem, ISystemNewConnectionWizardPage[]) so subclasses can
do their thing to initialize the subsystem.
createSubSystem in interface ISubSystemConfigurationconn - The connection to create a subsystem forcreatingConnection - true if we are creating a connection, false if just creating
another subsystem for an existing connection.yourNewConnectionWizardPages - The wizard pages you supplied to the New Connection wizard, via the
ISubSystemConfigurationAdapter.getNewConnectionWizardPages(ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)
method or null if you didn't override this method.
Note there may be more pages than you originally supplied as it is all pages contributed by
this factory object, including subclasses.
public ISubSystem cloneSubSystem(ISubSystem oldSubsystem,
IHost newConnection,
boolean copyProfileOperation)
throws Exception
cloneSubSystem in interface ISubSystemConfigurationoldSubsystem - The subsystem to be clonednewConnection - The connection into which to create and clone the old subsystemcopyProfileOperation - Pass true if this is an profile-copy operation versus a connection-copy operation
Exceptionprotected String internalGetSubSystemName(ISubSystem subsys)
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()
public abstract ISubSystem createSubSystemInternal(IHost conn)
createSubSystemInternal in interface ISubSystemConfiguration
protected void initializeSubSystem(ISubSystem ss,
ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages)
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.
ss - - The subsystem that was created via createSubSystemInternalyourNewConnectionWizardPages - - The wizard pages you supplied to the New Connection wizard, via the
SubSystemConfigurationAdapter.getNewConnectionWizardPages(org.eclipse.rse.core.subsystems.ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)
method or null if you didn't override this method.
Note there may be more pages than you originally supplied, as you are passed all pages contributed
by this factory object, including subclasses. This is null when this method is called other than
for a New Connection operation.
protected void copySubSystemData(ISubSystem oldSubSystem,
ISubSystem newSubSystem)
public void updateSubSystem(ISubSystem subsystem,
boolean updateUserId,
String userId,
boolean updatePort,
int port)
If you have your own attributes and own GUI to prompt for these, then call your own method to set your attributes, and call this method via super().
The changes to the subsystem configuration will be saved to disk. Further, it will be asked to disconnect as this data affects the connection.
updateSubSystem in interface ISubSystemConfigurationsubsystem - target of the update actionupdateUserId - true if we are updating the userId, else false to ignore userIduserId - new local user Id. Ignored if updateUserId is falseupdatePort - true if we are updating the port, else false to ignore portport - new local port value. Ignored if updatePort is false
public void setSubSystemPort(ISubSystem subsystem,
int port)
#updateSubSystem(Shell, ISubSystem, boolean, String, boolean, int)
setSubSystemPort in interface ISubSystemConfiguration
public void setSubSystemUserId(ISubSystem subsystem,
String userId)
#updateSubSystem(Shell, ISubSystem, boolean, String, boolean, int)
setSubSystemUserId in interface ISubSystemConfiguration
protected boolean needsUpdate(ISubSystem subsystem,
boolean updateUserId,
String userId,
boolean updatePort,
int port)
public boolean isSubSystemsDeletable()
isSubSystemsDeletable in interface ISubSystemConfigurationpublic boolean deleteSubSystem(ISubSystem subsystem)
In former case, this is only called if the factory supports user-deletable subsystems.
Handled for you!
deleteSubSystem in interface ISubSystemConfiguration
public void renameSubSystem(ISubSystem subsystem,
String newName)
renameSubSystem in interface ISubSystemConfiguration
public void configureNewFilterAction(SystemNewFilterAction newFilterAction,
Object callerData)
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
protected SystemFilterPoolWrapperInformation getNewFilterWizardPoolWrapperInformation()
public void disconnectAllSubSystems()
throws Exception
disconnectAllSubSystems in interface ISubSystemConfigurationExceptionprotected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
By default we create an empty filter pool with a generated name, and no pre-defined filters. If you don't want that behaviour, override this method and do one of the following:
protected boolean isUserPrivateProfile(ISystemFilterPoolManager mgr)
public ISystemFilterPool getDefaultSystemFilterPool(ISubSystem subsys)
getDefaultSystemFilterPool in interface ISubSystemConfigurationpublic ISystemFilterPool getDefaultSystemFilterPool(ISystemProfile profile)
public void invalidateFilterCache()
public ISystemFilterPoolManager[] getFilterPoolManagers()
public ISystemFilterPoolManager[] getActiveFilterPoolManagers()
public ISystemFilterPoolManager getFilterPoolManager(ISystemProfile profile)
getFilterPoolManager in interface ISubSystemConfigurationprotected boolean doPostRestoreProcessing(ISystemFilterPoolManager restoredFilterPoolMgr)
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.
public ISystemFilterPoolManager copyFilterPoolManager(ISystemProfile oldProfile,
ISystemProfile newProfile)
throws Exception
copyFilterPoolManager in interface ISubSystemConfigurationExceptionpublic ISystemFilterPoolManager getSystemFilterPoolManager(String mgrName)
getSystemFilterPoolManager in interface ISystemFilterPoolManagerProviderpublic ISystemFilterPoolManager[] getSystemFilterPoolManagers()
getSystemFilterPoolManagers in interface ISystemFilterPoolManagerProviderpublic ISystemFilterPoolManager[] getReferencableSystemFilterPoolManagers(ISystemFilterPoolReferenceManager refMgr)
Called by SystemFilterPoolReferenceManager.
REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
getReferencableSystemFilterPoolManagers in interface ISystemFilterPoolManagerProvider
public ISystemFilterPool getSystemFilterPoolForBrokenReference(ISystemFilterPoolReferenceManager callingRefMgr,
String missingPoolMgrName,
String missingPoolName)
If this returns null, then this broken reference will be deleted
REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE
getSystemFilterPoolForBrokenReference in interface ISystemFilterPoolManagerProvider
protected void addFilterPoolManager(ISystemProfile profile,
ISystemFilterPoolManager mgr)
protected ISystemFilterPoolManager getFilterPoolManager(ISystemFilterPool pool)
protected ISystemFilterPoolManager getFilterPoolManager(ISystemFilterContainer poolOrFilter)
protected ISystemFilterPoolManager getFilterPoolManager(ISystemFilterContainerReference poolOrFilterReference)
protected ISystemFilterPoolManager getFilterPoolManager(IHost conn)
protected String getFilterPoolManagerName(ISystemProfile profile)
protected String getSystemProfileName(ISystemFilterPoolManager manager)
protected void deleteFilterPoolManager(ISystemProfile profile)
public void renameFilterPoolManager(ISystemProfile profile)
renameFilterPoolManager in interface ISubSystemConfigurationprotected void fireEvent(SystemResourceChangeEvent event)
protected void fireEvent(Object src,
int eventId,
Object parent)
protected void fireEvent(Object[] multiSrc,
int eventId,
Object parent,
int delta)
protected SystemResourceChangeEvent createEvent(Object src,
int eventId,
Object parent)
protected SystemResourceChangeEvent createEvent(Object[] src,
int eventId,
Object parent)
protected SystemResourceChangeEvent createEvent(Object[] src,
int eventId,
Object parent,
int delta)
protected void fireSubSystemEvent(SystemResourceChangeEvent event,
ISubSystem subsystem)
protected void fireSubSystemEvent(SystemResourceChangeEvent event)
protected void fireSubSystemEvent(SystemResourceChangeEvent event,
ISystemProfile profile)
protected void fireSubSystemFilterEvent(int eventId,
ISystemFilter filter)
protected void fireSubSystemFilterEvent(int eventId,
ISystemFilter[] filters)
protected void fireSubSystemFilterEvent(SystemResourceChangeEvent event,
ISystemFilter filter)
protected SystemResourceChangeEvent cloneEvent(SystemResourceChangeEvent event,
Object parent)
protected void fireSubSystemFilterEvent(int eventId,
ISystemFilterString filterString)
protected void fireSubSystemFilterEvent(int eventId,
ISystemFilterString[] filterStrings,
int delta)
protected void fireSubSystemFilterEvent(SystemResourceChangeEvent event,
ISystemFilterString filterString)
public void filterEventFilterPoolCreated(ISystemFilterPool newPool)
filterEventFilterPoolCreated in interface ISystemFilterPoolManagerProviderpublic void filterEventFilterPoolDeleted(ISystemFilterPool oldPool)
filterEventFilterPoolDeleted in interface ISystemFilterPoolManagerProvider
public void filterEventFilterPoolRenamed(ISystemFilterPool pool,
String oldName)
filterEventFilterPoolRenamed in interface ISystemFilterPoolManagerProvider
public void filterEventFilterPoolsRePositioned(ISystemFilterPool[] pools,
int delta)
filterEventFilterPoolsRePositioned in interface ISystemFilterPoolManagerProviderpublic void filterEventFilterCreated(ISystemFilter newFilter)
filterEventFilterCreated in interface ISystemFilterPoolManagerProviderpublic void filterEventFilterDeleted(ISystemFilter oldFilter)
filterEventFilterDeleted in interface ISystemFilterPoolManagerProvider
public void filterEventFilterRenamed(ISystemFilter filter,
String oldName)
filterEventFilterRenamed in interface ISystemFilterPoolManagerProviderpublic void filterEventFilterUpdated(ISystemFilter filter)
filterEventFilterUpdated in interface ISystemFilterPoolManagerProvider
public void filterEventFiltersRePositioned(ISystemFilter[] filters,
int delta)
filterEventFiltersRePositioned in interface ISystemFilterPoolManagerProviderpublic void filterEventFilterStringCreated(ISystemFilterString newFilterString)
filterEventFilterStringCreated in interface ISystemFilterPoolManagerProviderpublic void filterEventFilterStringDeleted(ISystemFilterString oldFilterString)
filterEventFilterStringDeleted in interface ISystemFilterPoolManagerProviderpublic void filterEventFilterStringUpdated(ISystemFilterString filterString)
filterEventFilterStringUpdated in interface ISystemFilterPoolManagerProvider
public void filterEventFilterStringsRePositioned(ISystemFilterString[] filterStrings,
int delta)
filterEventFilterStringsRePositioned in interface ISystemFilterPoolManagerProvider
public ISystemFilterPool getFilterPool(ISystemProfile profile,
String name)
public ISystemFilterPool[] getFilterPools(ISystemProfile profile)
public boolean showChangeFilterStringsPropertyPage(ISystemFilter filter)
showChangeFilterStringsPropertyPage in interface ISubSystemConfigurationpublic ISubSystem[] testForActiveReferences(ISystemProfile profile)
Called when user tries to make a profile inactive. We prevent this if there exists active references.
testForActiveReferences in interface ISubSystemConfigurationprofile - The profile being tested
public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
getTranslatedFilterTypeProperty in interface ISubSystemConfigurationpublic boolean showRefreshOnFilter()
showRefreshOnFilter in interface ISubSystemConfigurationpublic boolean showGenericShowInTableOnFilter()
showGenericShowInTableOnFilter in interface ISubSystemConfigurationpublic IServerLauncherProperties createServerLauncher(IConnectorService connectorService)
Create an instance of ServerLauncher, and add it to the given subsystem.
When a subsystem is created, and supportsServerLaunchProperties(IHost)
returns true, this method is called to create the server launcher instance
associated with the subsystem. The default implementation is to create an
instance of IRemoteServerLauncher, but override to create your own
ServerLauncher instance if you have your own class.
createServerLauncher in interface ISubSystemConfiguration
public IServerLauncherForm getServerLauncherForm(Shell shell,
ISystemMessageLine msgLine)
supportsServerLaunchProperties(IHost) returns true.
We return RemoteServerLauncherForm.
Override if appropriate.
public boolean commit()
Totally handled for you!
Calls saveSubSystems() and saveFilterPools()
Exceptions are swallowed since we can deal with them on shutdown anyway!
commit in interface ISubSystemConfiguration
public void saveSubSystems()
throws Exception
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.
Exception
public void saveSubSystems(IHost conn)
throws Exception
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.
Exception
public void saveSubSystem(ISubSystem subsys)
throws Exception
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!
saveSubSystem in interface ISubSystemConfigurationException
public boolean saveFilterPools()
throws Exception
This method is handled for you. If you do override, please call super.saveFilterPools.
Exception
public void saveFilterPools(ISystemFilterPoolManager mgr)
throws Exception
This method is handled for you. If you do override, please call super.saveFilterPools.
Exceptionpublic ISubSystem createSubSystemAfterTheFact(IHost conn)
createSubSystemAfterTheFact in interface ISubSystemConfigurationprotected boolean subSystemsHaveBeenRestored(IHost connection)
public ISystemFilterPoolManager[] restoreAllFilterPoolManagersForAllProfiles()
public void setConnection(IHost connection)
setConnection in interface ISubSystemConfigurationpublic void setCurrentSelection(Object[] selection)
setCurrentSelection in interface ISubSystemConfiguration
protected void handleException(String msg,
Exception exc)
public static String getConnectingMessage(String hostName,
int port)
public static String getDisconnectingMessage(String hostName,
int port)
public static String getDefaultFilterPoolName(String profileName,
String factoryId)
public String toString()
public List getSubSystemList()
ISubSystemConfiguration
getSubSystemList in interface ISubSystemConfigurationpublic List getFilterPoolManagerList()
ISubSystemConfiguration
getFilterPoolManagerList in interface ISubSystemConfigurationpublic Object getAdapter(Class adapterType)
getAdapter in interface IAdaptablepublic boolean isDirty()
org.eclipse.rse.core.persistance.IRSEPersistableContainer
isDirty in interface org.eclipse.rse.core.persistance.IRSEPersistableContainerpublic void setDirty(boolean flag)
org.eclipse.rse.core.persistance.IRSEPersistableContainer
setDirty in interface org.eclipse.rse.core.persistance.IRSEPersistableContainerflag - true if the object must be persisted.public boolean wasRestored()
org.eclipse.rse.core.persistance.IRSEPersistableContainer
wasRestored in interface org.eclipse.rse.core.persistance.IRSEPersistableContainerpublic void setWasRestored(boolean flag)
org.eclipse.rse.core.persistance.IRSEPersistableContainer
setWasRestored in interface org.eclipse.rse.core.persistance.IRSEPersistableContainerflag - true if the object was restored.
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||