Remote Systems
v6.4.1

com.ibm.etools.systems.core
Class SystemPlugin

java.lang.Object
  extended byAbstractUIPlugin
      extended bycom.ibm.etools.systems.core.SystemBasePlugin
          extended bycom.ibm.etools.systems.core.SystemPlugin

public class SystemPlugin
extends SystemBasePlugin

Plugin for the core remote systems support.

See Also:
Serialized Form

Field Summary
static String copyright
           
static String HELPPREFIX
           
static boolean INCLUDE_LOCAL_NO
           
static boolean INCLUDE_LOCAL_YES
           
static String PLUGIN_ID
           
 
Fields inherited from class com.ibm.etools.systems.core.SystemBasePlugin
ICON_PATH, log
 
Constructor Summary
SystemPlugin()
          Constructor for SystemsPlugin
 
Method Summary
 void closeViews()
          Close or reset views prior to full refresh after team synch
protected  void disconnectAll(boolean doSave)
          Disconnect all subsystems
 SystemType[] getAllSystemTypes(boolean refresh)
          Return all system type objects.
 CommandView getCommandView()
           
static SystemPlugin getDefault()
          Return singleton.
 SystemMessageFile getDefaultMessageFile(String messageFileName)
          Load a default message file for this plugin for cases where messages haven't been translated.
static String getLocalMachineIPAddress()
          Return the local user's IP address
static String getLocalMachineName()
          Return the local user's machine name
 SystemMessageFile getMessageFile(String messageFileName)
          Load a message file for this plugin.
static SystemMessage getPluginMessage(String msgId)
          Retrieve a message from this plugin's message file
static SystemMessage getPluginMessage(String msgId, Object subsVar)
          Retrieve a message from this plugin's message file and do single substitution on it.
static SystemMessage getPluginMessage(String msgId, Object[] subsVars)
          Retrieve a message from this plugin's message file and do multiple substitution on it.
static SystemMessageFile getPluginMessageFile()
          Return this plugin's message file.
 SystemPropertyPageExtension[] getPropertyPageExtensions()
          Return an array of SystemPropertyPageExtension objects.
 IProject getRemoteSystemsProject()
          Return the project used to hold all the Remote System Framework files
static ResourceBundle getResourceBundle()
          Return this plugin's resource bundle
 SystemShowPreferencesPageAction[] getShowPreferencePageActions()
          Return an array of action objects registered via our com.ibm.etools.systems.core.remoteSystemsViewPreferencesActions extension point.
 boolean getShowProfilePageInitially()
          Returns whether to show profile page initially, i.e. during the first new connection creation.
static String getString(String key)
          Get a string from this plugin's resource bundle
static String getString(String key, String defaultString)
          Get a string from this plugin's resource bundle, specifying an english string to use as a default if the requested string is not found in the plugin.
 ISubSystemFactoryProxy[] getSubSystemFactoryProxies()
          Return an array of SubSystemFactoryProxy objects.
 ISystemFileTransferModeRegistry getSystemFileTransferModeRegistry()
          Get the file transfer mode registry
 SystemRegistry getSystemRegistry()
          Return the SystemRegistry singleton
 SystemType getSystemType(String name)
          Return the system type that matches the name.
 boolean getSystemTypeEnableOffline(String name)
          Return whether the system type is enabled for offline support.
 ImageDescriptor getSystemTypeImage(String name, boolean connected)
          Return the image for a given system type name.
 String[] getSystemTypeNames()
          Convenience method to return an array of names-only for registered SystemType * extension point implementers.
 String[] getSystemTypeNames(boolean includeLocal)
          Convenience method to return an array of names-only for registered SystemType extension point implementers.
 SystemType[] getSystemTypes()
          Return an array of SystemType objects.
 SystemViewAdapterFactory getSystemViewAdapterFactory()
          For pathpath access to our adapters for non-local objects in our model.
 SystemViewFileAdapterFactory getSystemViewFileAdapterFactory()
          For pathpath access to our adapters for remote universal file objects.
 SystemViewOutputAdapterFactory getSystemViewOutputAdapterFactory()
          For pathpath access to our adapters for viewable remote output objects.
 SystemViewSearchResultAdapterFactory getSystemViewSearchResultAdapterFactory()
          For pathpath access to our adapters for searchable result output objects.
 SystemViewSearchResultSetAdapterFactory getSystemViewSearchResultSetAdapterFactory()
          For pathpath access to our adapters for searchable result output objects.
static SystemProfileManager getTheSystemProfileManager()
          A static version for convenience Returns the master profile manager singleton.
static SystemRegistry getTheSystemRegistry()
          A static version for convenience Returns the master registry singleton.
static SystemType[] getTheSystemTypes(boolean includeLocal)
          A static version for convenience.
 void initializeDefaultPreferences()
          Initializes default preferences.
protected  void initializeImageRegistry()
          Initialize the image registry by declaring all of the required * graphics.
 boolean isSystemRegistryActive()
          Returns true if the SystemRegistry has been instantiated already.
static boolean isTheSystemRegistryActive()
          A static version for convenience
 void openViews()
          Restore views prior to full refresh after team synch
protected  void registerArchiveHandlers()
          Initializes the Archive Handler Manager, by registering archive \ file types with their handlers.
protected  void registerDynamicPopupMenuExtensions()
          Initializes the System View Adapter Menu Extension Manager, by registering menu extensions
protected  void registerKeystoreProviders()
           
 void registerViewSupplier(ISystemViewSupplier vs)
          Register a view supplier so we can ask them to participate in team synchs
 void restart()
          Restart the whole thing after a team synchronization
 void setCommandView(CommandView view)
           
 void setSystemTypes(SystemType[] systemTypes)
          Reset the system types objects to the given array.
 void start(org.osgi.framework.BundleContext context)
           
 void stop(org.osgi.framework.BundleContext context)
           
 void unRegisterViewSupplier(ISystemViewSupplier vs)
          UnRegister a previously registered view supplier
 
Methods inherited from class com.ibm.etools.systems.core.SystemBasePlugin
getActiveWorkbenchShell, getActiveWorkbenchWindow, getBaseDefault, getIconPath, getImage, getImageDescriptor, getImageDescriptorFromIDE, getInstallLocation, getLogger, getMessage, getPluginImage, getPluginImage, getString, getString, getSymbolicName, getWorkbench, getWorkspace, getWorkspaceRoot, isHeadless, loadDefaultMessageFile, loadDefaultMessageFile, loadDefaultResourceBundle, loadDefaultResourceBundle, loadMessageFile, loadMessageFile, loadPluginResourceBundle, loadResourceBundle, loadResourceBundle, logDebugMessage, logError, logError, logInfo, logMessage, logMessage, logWarning, printMessages, putImageInRegistry, scanForDuplicateMessages, showProgrammerErrorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

PLUGIN_ID

public static final String PLUGIN_ID
See Also:
Constant Field Values

HELPPREFIX

public static final String HELPPREFIX
See Also:
Constant Field Values

INCLUDE_LOCAL_YES

public static final boolean INCLUDE_LOCAL_YES
See Also:
Constant Field Values

INCLUDE_LOCAL_NO

public static final boolean INCLUDE_LOCAL_NO
See Also:
Constant Field Values
Constructor Detail

SystemPlugin

public SystemPlugin()
Constructor for SystemsPlugin

Method Detail

getDefault

public static SystemPlugin getDefault()
Return singleton. Same as inherited getBaseDefault but returned object * is typed as SystemPlugin versus SystemBasePlugin.


getString

public static String getString(String key)
Get a string from this plugin's resource bundle. * If not found, stack trace info is placed in the * plugin's log file to help pinpoint the offending code.


getString

public static String getString(String key,
                               String defaultString)
Get a string from this plugin's resource bundle, specifying an english string to use as a default if the requested string is not found in the plugin.

If not found, stack trace info is placed in the plugin's log file to help pinpoint the offending code.


initializeDefaultPreferences

public void initializeDefaultPreferences()
Initializes default preferences.


getShowProfilePageInitially

public boolean getShowProfilePageInitially()
Returns whether to show profile page initially, i.e. during the first new connection creation.

Returns:
true to show profile page initially, false otherwise.

initializeImageRegistry

protected void initializeImageRegistry()
Initialize the image registry by declaring all of the required * graphics.

Specified by:
initializeImageRegistry in class SystemBasePlugin

start

public void start(org.osgi.framework.BundleContext context)
           throws Exception
Overrides:
start in class SystemBasePlugin
Throws:
Exception
See Also:
BundleActivator.start(org.osgi.framework.BundleContext)

getSystemViewAdapterFactory

public SystemViewAdapterFactory getSystemViewAdapterFactory()
For pathpath access to our adapters for non-local objects in our model. Exploits the knowledge we use singleton adapters.


getSystemViewFileAdapterFactory

public SystemViewFileAdapterFactory getSystemViewFileAdapterFactory()
For pathpath access to our adapters for remote universal file objects. Exploits the knowledge we use singleton adapters.


getSystemViewOutputAdapterFactory

public SystemViewOutputAdapterFactory getSystemViewOutputAdapterFactory()
For pathpath access to our adapters for viewable remote output objects. Exploits the knowledge we use singleton adapters.


getSystemViewSearchResultSetAdapterFactory

public SystemViewSearchResultSetAdapterFactory getSystemViewSearchResultSetAdapterFactory()
For pathpath access to our adapters for searchable result output objects. Exploits the knowledge we use singleton adapters.


getSystemViewSearchResultAdapterFactory

public SystemViewSearchResultAdapterFactory getSystemViewSearchResultAdapterFactory()
For pathpath access to our adapters for searchable result output objects. Exploits the knowledge we use singleton adapters.


restart

public void restart()
Restart the whole thing after a team synchronization


closeViews

public void closeViews()
Close or reset views prior to full refresh after team synch


openViews

public void openViews()
Restore views prior to full refresh after team synch


getRemoteSystemsProject

public IProject getRemoteSystemsProject()
Return the project used to hold all the Remote System Framework files


stop

public void stop(org.osgi.framework.BundleContext context)
          throws Exception
Overrides:
stop in class SystemBasePlugin
Throws:
Exception
See Also:
BundleActivator.stop(org.osgi.framework.BundleContext)

disconnectAll

protected void disconnectAll(boolean doSave)
Disconnect all subsystems


getResourceBundle

public static ResourceBundle getResourceBundle()
Return this plugin's resource bundle. * Called by all code in this plugin.


setSystemTypes

public void setSystemTypes(SystemType[] systemTypes)
Reset the system types objects to the given array. Called by preferences page when Defaults is pressed, and then OK/Apply.


getAllSystemTypes

public SystemType[] getAllSystemTypes(boolean refresh)
Return all system type objects. Unlike getSystemTypes(), this method returns all registered system types, not just those currently enabled.

Parameters:
refresh - - true if to force a re-read from disk. If specified, then the read is not effective, but rather is only returned. To affectively revert back, you must call setSystemTypes. This is used by the preferences page.
Returns:
array of SystemType objects, one for every systemtype extension

getSystemTypes

public SystemType[] getSystemTypes()
Return an array of SystemType objects. These are name and image pairs registered * via plugin.xml extension points.


getSystemType

public SystemType getSystemType(String name)
Return the system type that matches the name. Don't worry about enabled state.

Parameters:
name - the system type name

getTheSystemTypes

public static SystemType[] getTheSystemTypes(boolean includeLocal)
A static version for convenience.


getSystemTypeNames

public String[] getSystemTypeNames()
Convenience method to return an array of names-only for registered SystemType * extension point implementers.


getSystemTypeNames

public String[] getSystemTypeNames(boolean includeLocal)
Convenience method to return an array of names-only for registered SystemType extension point implementers.

Parameters:
includeLocal - true if returned names should include "local"

getSystemTypeImage

public ImageDescriptor getSystemTypeImage(String name,
                                          boolean connected)
Return the image for a given system type name.


getSystemTypeEnableOffline

public boolean getSystemTypeEnableOffline(String name)
Return whether the system type is enabled for offline support.

Since:
RSE 6.0

getSubSystemFactoryProxies

public ISubSystemFactoryProxy[] getSubSystemFactoryProxies()
Return an array of SubSystemFactoryProxy objects. These represent all extensions to our subsystemfactory extension point.


isSystemRegistryActive

public boolean isSystemRegistryActive()
Returns true if the SystemRegistry has been instantiated already. Use this when you don't want to start the system registry as a side effect of retrieving it.


getSystemRegistry

public SystemRegistry getSystemRegistry()
Return the SystemRegistry singleton


getTheSystemRegistry

public static SystemRegistry getTheSystemRegistry()
A static version for convenience Returns the master registry singleton.


getTheSystemProfileManager

public static SystemProfileManager getTheSystemProfileManager()
A static version for convenience Returns the master profile manager singleton.


isTheSystemRegistryActive

public static boolean isTheSystemRegistryActive()
A static version for convenience


setCommandView

public void setCommandView(CommandView view)

getCommandView

public CommandView getCommandView()

getPropertyPageExtensions

public SystemPropertyPageExtension[] getPropertyPageExtensions()
Return an array of SystemPropertyPageExtension objects. These represent all extensions to our propertyPage extension point.


getShowPreferencePageActions

public SystemShowPreferencesPageAction[] getShowPreferencePageActions()
Return an array of action objects registered via our com.ibm.etools.systems.core.remoteSystemsViewPreferencesActions extension point.
This may return null if there are no extenders.


getMessageFile

public SystemMessageFile getMessageFile(String messageFileName)
Load a message file for this plugin.

Parameters:
messageFileName - - the name of the message xml file. Will look for it in this plugin's install folder.
Returns:
a message file object containing the parsed contents of the message file, or null if not found.

getDefaultMessageFile

public SystemMessageFile getDefaultMessageFile(String messageFileName)
Load a default message file for this plugin for cases where messages haven't been translated.

Parameters:
messageFileName - - the name of the message xml file. Will look for it in this plugin's install folder.
Returns:
a message file object containing the parsed contents of the message file, or null if not found.

getPluginMessageFile

public static SystemMessageFile getPluginMessageFile()
Return this plugin's message file. Assumes it has already been loaded via a call to getMessageFile.


getPluginMessage

public static SystemMessage getPluginMessage(String msgId)
Retrieve a message from this plugin's message file

Parameters:
msgId - - the ID of the message to retrieve. This is the concatenation of the message's component abbreviation, subcomponent abbreviation, and message ID as declared in the message xml file.

getPluginMessage

public static SystemMessage getPluginMessage(String msgId,
                                             Object[] subsVars)
Retrieve a message from this plugin's message file and do multiple substitution on it.

Parameters:
msgId - - the ID of the message to retrieve. This is the concatenation of the message's component abbreviation, subcomponent abbreviation, and message ID as declared in the message xml file.
subsVars - - an array of objects to substitute in for %1, %2, etc

getPluginMessage

public static SystemMessage getPluginMessage(String msgId,
                                             Object subsVar)
Retrieve a message from this plugin's message file and do single substitution on it.

Parameters:
msgId - - the ID of the message to retrieve. This is the concatenation of the message's component abbreviation, subcomponent abbreviation, and message ID as declared in the message xml file.

getLocalMachineName

public static String getLocalMachineName()
Return the local user's machine name


getLocalMachineIPAddress

public static String getLocalMachineIPAddress()
Return the local user's IP address


registerViewSupplier

public void registerViewSupplier(ISystemViewSupplier vs)
Register a view supplier so we can ask them to participate in team synchs


unRegisterViewSupplier

public void unRegisterViewSupplier(ISystemViewSupplier vs)
UnRegister a previously registered view supplier


getSystemFileTransferModeRegistry

public ISystemFileTransferModeRegistry getSystemFileTransferModeRegistry()
Get the file transfer mode registry


registerArchiveHandlers

protected void registerArchiveHandlers()
Initializes the Archive Handler Manager, by registering archive \ file types with their handlers.


registerDynamicPopupMenuExtensions

protected void registerDynamicPopupMenuExtensions()
Initializes the System View Adapter Menu Extension Manager, by registering menu extensions


registerKeystoreProviders

protected void registerKeystoreProviders()

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

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