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