com.novell.application.console.snapin
Interface Shell


public interface Shell

Defines generic methods that any participating snap-ins can call.

Participating snap-ins can call the methods defined in the Shell interface either to find out information about the shell, or to have the shell perform certain operations.


Field Summary
static java.lang.String CONSOLE_VIEW
          Deprecated. Use CONSOLE_VIEW_CLASS_NAME instead.
static java.lang.String CONSOLE_VIEW_CLASS_NAME
          Defines the console view class name.
static java.lang.String CONSOLE_VIEW_UNIQUE_ID
           
static int FOCUS_NONE
          Defines the static final int used to indicate a non-focus state in the console.
static int FOCUS_TREE
          Defines the static final int used to indicate that the tree has focus in the console.
static int FOCUS_VIEW
          Defines the static final int used to indicate that the view has focus in the console.
static java.lang.String MENU_INSERTION_POINT
          Placeholder to be used in snap-in menus to specify where later menus will snap in.
static java.lang.String PLACEHOLDER_NAMESPACE_UNIQUE_ID
          Defines the placeholder namespace id name.
static  SNAPIN_DISPLAYICON
          Defines the DisplayIcon snap-in type.
static  SNAPIN_DISPLAYNAME
          Defines the DisplayName snap-in type.
static  SNAPIN_DYNAMIC
          Defines the Dynamic snap-in type.
static  SNAPIN_INITIALIZATION
          Defines the Initialization snap-in type.
static  SNAPIN_MAP_OBJECTENTRY
          Defines the MapObjectEntry snap-in type.
static  SNAPIN_MENU
          Defines the Menu snap-in type.
static  SNAPIN_NAMESPACE
          Defines the Namespace snap-in type.
static  SNAPIN_PAGE
          Defines the PropertyBook page snap-in type.
static  SNAPIN_PERSISTENCE
          Defines Persistence snap-in type.
static  SNAPIN_PLACEHOLDER
          Defines the Placeholder snap-in type.
static  SNAPIN_POPUP_MENU
          Defines the PopUpMenu snap-in type.
static  SNAPIN_RESULTMODIFIER
          Defines ResultModifier snap-in type.
static  SNAPIN_SERVICE
          Defines the Service snap-in type.
static  SNAPIN_STATUSBARITEM
          Defines the Status Bar snap-in type.
static  SNAPIN_TOOLBARITEM
          Defines the Toolbar snap-in type.
static  SNAPIN_VIEW
          Defines the View snap-in type.
 
Method Summary
 void addImagePoolDirectory(java.lang.String namespaceUniqueID, java.lang.String directoryName)
          Adds a path to a list of paths to get icons from using getIcon().
 void addInvalidateCacheListener(InvalidateCacheListener l)
          Adds a tree refresh listener to the shell.
 void addObjectEntryToTreeRoot(ObjectEntry entry, boolean persist)
          NOTE: The persist parameter is no longer recognized.
 void addPropertyBookListener(PropertyBookListener l)
          Adds a property book listener to the shell.
 void addShellFocusListener(ShellFocusListener l)
          Adds a shell focus listener to the shell.
 void addShellLifecycleListener(ShellLifecycleListener l)
          Adds a shell lifecycle listener to the shell.
 void addShellListener(ShellListener l)
          Deprecated. Replaced with addShellSelectionListener
 void addShellSelectionListener(ShellSelectionListener l)
          Adds a shell selection listener to the shell.
 void addSnapinListener(SnapinListener l, java.lang.String[] filter)
          Adds a snap-in listener to the shell.
 void addTranslatedStringResourceBundle(java.lang.String namespaceUniqueID, java.lang.String resBundleName)
          Adds a resource bundle to list of resource bundles from which to get translated strings using getTranslatedString().
 void addVetoableSnapinListener(VetoableSnapinListener l, java.lang.String[] filter)
          Adds a vetoable snap-in event listener to the shell.
 void addViewSelections(ObjectEntryCollection selections)
          Adds the indicated entries to the current view selection.
 boolean checkSnapins(Scope scope)
          Checks the registry for the existance of snapins based on a scope
 void clearViewSelection()
          Clears the current view selection.
 boolean containsObject(java.lang.String key)
          Used to implement the ConsoleOne snapin persistance mechanism.
 boolean displayURL(java.lang.String url)
          Displays a URL in the system browser.
 void ensureViewObjectIsVisible(ObjectEntry object)
          Ensures the indicated object is visible in the current view.
 boolean executeDefaultPopupMenuItemAction(ObjectEntry entry)
          Executes the default action on an ObjectEntry.
 void exit(int status)
          Shuts down all snap-ins before the shell exits.
 NamespaceSnapin[] getAllNamespaceSnapins()
          Returns the current instances of all namespaces that are loaded.
 java.lang.String getBuildDate()
          Gets the date (YYMMDD{+}) when the console was built.
 ObjectEntryEnumeration getChildContainers(ObjectEntry entry, ResultModifier resultModifier)
          Returns an ObjectEntry's children that should appear in the tree.
 ObjectEntryEnumeration getChildren(ObjectEntry entry)
          Deprecated. As of ConsoleOne version 1.2, use Shell.getChildren(ObjectEntry, ResultModifier) instead.
 ObjectEntryEnumeration getChildren(ObjectEntry entry, ResultModifier resultModifier)
          Returns the enumeration of children for an ObjectEntry.
 ObjectEntryCollection getCurrentSelections()
          Returns the ObjectEntry array in the panel that has the focus.
 java.awt.Component getCurrentView()
          Returns the current view Component in the console.
 ViewSnapin getCurrentViewSnapin()
          Returns the current view snap-in in the console.
 java.awt.Cursor getCursor()
          Returns the cursor of the shell.
 javax.swing.Icon getDisplayIcon(ObjectEntry objectEntry)
          Returns the snap-in icon associated with the specified ObjectEntry in the tree.
 javax.swing.Icon getDisplayIcon(java.lang.String namespace, java.lang.String type)
          Returns the snap-in icon associated with the specified namespace and object type.
 java.lang.String getDisplayName(ObjectEntry object)
          Returns the display name associated with the specified ObjectEntry in the tree.
 java.lang.String getDisplayName(ObjectEntry object, int displayStyle)
          Returns the display name associated with the specified ObjectEntry.
 java.lang.String getDisplayName(java.lang.String namespace, java.lang.String type)
          Returns the display name associated with the specified namespace and object type.
 java.lang.String getDisplayVersion()
          Gets the console display version in the following formats: M.m.r if in release mode, or M.m.r (bYYMMDD{+}) if in development mode The '+' appears if the build is an interim (not checkpointed) build which is usually not saved and cannot be repeated.
 int getDSAccessMethod()
          Gets the access method to be used to access NDS.
 ResultModifier getFilterResultModifier(java.lang.String namespaceUniqueID, java.lang.String resultModifierName)
          Gets a named filter result modifier for the specified namespace.
 int getFocusState()
          Returns the current FocusState of the console.
 java.lang.String getHelpPath(java.lang.String dirName)
          Returns the fully qualified, locale-sensitive path to the help directory, based on the directory name or relative path name specified in the dirName parameter.
 javax.swing.Icon getIcon(java.lang.String namespaceUniqueID, java.lang.String imageName)
          Returns the images associated with a namespace from directories registered with addImagePoolDirectory().
 java.util.Locale getLocale()
          Returns the locale in which the shell is running.
 java.lang.String getMajorVersion()
          Gets the console major version.
 java.lang.String getMinorVersion()
          Gets the console minor version.
 NamespaceSnapin getNamespaceSnapin(java.lang.String uniqueID)
          Returns the namespace specified by its uniqueID string.
 java.lang.Object getObject(java.lang.String key)
          Used to implement the ConsoleOne snapin persistance mechanism.
 ObjectType[] getObjectTypes(ObjectEntry referenceContext)
          Returns an array of object types contained by the name space.
 javax.swing.JPopupMenu getPopupMenu(ObjectEntryCollection entries)
          Returns the pop-up menu associated with the view.
 java.lang.String getProperty(java.lang.String name)
          Deprecated. see #getObject()
 java.lang.String getRevision()
          Gets the console version revision.
 ObjectEntry[] getRootTreeList()
          Returns the ObjectEntry array currently making up the root level of the tree.
 ResultModifier getSearchResultModifier(java.lang.String namespaceUniqueID, java.lang.String resultModifierName)
          Gets a named search result modifier for the specified namespace.
 javax.swing.JFrame getShellFrame()
          Returns the shell Frame as a JFrame object.
 java.util.Vector getSnapins(Scope theScope)
          Deprecated. As of ConsoleOne version 1.2. Use loadSnapins() instead.
 java.lang.String getTranslatedString(java.lang.String namespaceUniqueID, java.lang.String key)
          Returns the translated strings associated with a namespace from resource bundles registered with addTranslatedStringResourceBundle().
 ObjectEntry getTreeSelection()
          Returns the ObjectEntry associated with the item selected in the left panel of the shell tree.
 NamespaceSnapin getTreeSelectionNamespace()
          Returns the namespace currently being browsed by the user.
 javax.swing.JPopupMenu getViewPopupMenu(java.lang.String namespace, java.lang.String view)
          Returns the view pop-up menu associated with the given ObjectEntry array.
 ObjectEntryCollection getViewSelections()
          Returns the ObjectEntryCollection that contains the currently selected entries in the right panel of the shell view.
 void goUpOneLevel()
          Sets the root of the tree as the parent of the current root item.
 void handleSnapinException(SnapinException exception)
          Takes the appropriate action for a snap-in exception, such as reporting the error to the user if neccessary, or exiting if the error is fatal.
 boolean helpExists(java.lang.String helpSetName, java.lang.String helpID)
          Checks if a Help ID exists in a specified HelpSet
 boolean isContainer(ObjectEntry entry)
          Checks to see if an object is a container.
 boolean isTreeReRooted()
          Indicates whether the tree has been re-rooted to an object other than MyWorld.
 void launchConfigurator()
          Launches a generic snap-in configurator.
 void launchFilter(java.lang.Object userObject)
          Starts the filter dialog to process and apply filter requests to the current view.
 void launchFind(java.lang.Object userObject)
          Starts the search dialog to process the search requests and display results.
 void launchHelp(java.lang.String helpSetName)
          Deprecated. Use the launchHelp that takes a parent window.
 void launchHelp(java.lang.String helpSetName, java.lang.String helpID)
          Deprecated. Use the launchHelp that takes a parent window.
 void launchHelp(java.lang.String helpSetName, java.lang.String helpID, java.awt.Window parent)
          Loads a JavaHelp help set displaying the appropriate topic
 void launchHelp(java.lang.String helpSetName, java.awt.Window parent)
          Loads a JavaHelp help set dispalying from the default topic.
 void launchHelpIndex()
          Deprecated. As of ConsoleOne version 1.2
 int launchMsgBox(SnapinException exception)
          Launches a message box that displays an error message based on a SnapinException.
 int launchMsgBox(java.lang.String title, java.lang.String message, int type)
          Launches a message box that displays an error message without help.
 int launchMsgBox(java.lang.String title, java.lang.String message, int type, java.lang.String helpSetName)
          Launches a message box that displays an error message with help.
 int launchMsgBox(java.lang.String title, java.lang.String message, int type, java.lang.String helpSetName, java.lang.String helpID)
          Launches a message box that displays an error message with context sensitive help.
 void launchPreferences()
          Launch preferences PropertyBook
 Snapin[] loadPageSnapins(ObjectEntry objectEntry)
          Returns an array of page snap-ins based on the object entry parameter.
 Snapin[] loadSnapins(Scope theScope)
          Returns an array of snap-ins based on the Scope parameter.
 Snapin[] loadSnapins(Scope[] scopes)
          Returns an array of snap-ins based on the scopes parameter.
 Snapin[] loadSnapins(Scope[] scopes, SnapinContext context)
          Returns an array of snap-ins based on the scopes parameter.
 ObjectEntry[] mapObjectEntry(ObjectEntry entry)
          Returns the ObjectEntries that from other namespaces that this entry maps to.
 ObjectEntry mapObjectEntryToNamespace(ObjectEntry entry, java.lang.String namespaceUniqueID)
          Returns the ObjectEntry from a given namespace that this entry maps to.
 void postPropertyBookEvent(PropertyBookEvent event)
          Posts an event to all interesed property book listeners.
 void postShellEvent(ShellEvent event)
          Deprecated. Replaced with postShellEvent()
 void postShellLifecycleEvent(ShellLifecycleEvent event)
          Posts a lifecycle event in the shell.
 void postShellSelectionEvent(ShellSelectionEvent event)
          Posts a selection event in the shell.
 void postSnapinEvent(SnapinEvent event)
          Posts a snap-in event.
 void postVetoableSnapinEvent(SnapinEvent event)
          Posts a vetoable snap-in event.
 void refreshCurrentTreeSelection()
          Refreshes the subordinates of the currently selected object in the tree.
 void refreshCurrentView()
          Brings the current view up to date with the actual data.
 void refreshEntireTree()
          Brings the tree view up to date with the actual data.
 void refreshParentTreeSelection()
          Refreshes the peers of the currently selected object in the tree.
 void refreshTreeEntry(ObjectEntry refreshEntry)
          Brings the tree view up to date with the actual data at the point where the ObjectEntry exists in the tree.
 void refreshTreeEntryNameAndIcon(ObjectEntry entry)
          Refreshes the name and icon for an object in the tree.
 void removeInvalidateCacheListener(InvalidateCacheListener l)
          Removes a tree refresh listener from the shell.
 java.lang.Object removeObject(java.lang.String key)
          Used to implement the ConsoleOne snapin persistance mechanism.
 void removeObjectEntryFromTreeRoot(ObjectEntry entry)
          Removes an ObjectEntry from the root level of the tree if it is there.
 void removeProperty(java.lang.String name)
          Deprecated. see #removeObject()
 void removePropertyBookListener(PropertyBookListener l)
          Removes a property book listener from the shell.
 void removeShellFocusListener(ShellFocusListener l)
          Removes a shell focus listener from the shell.
 void removeShellLifecycleListener(ShellLifecycleListener l)
          Removes a shell lifecycle listener from the shell.
 void removeShellListener(ShellListener l)
          Deprecated. Replaced with removeShellSelectionListener
 void removeShellSelectionListener(ShellSelectionListener l)
          Removes a shell selection listener from the shell.
 void removeSnapinListener(SnapinListener l)
          Removes a snap-in listener from the shell.
 void removeVetoableSnapinListener(VetoableSnapinListener l)
          Removes a vetoable snap-in listener from the shell.
 void replaceTreeEntry(ObjectEntry oldEntry, ObjectEntry newEntry)
          Replaces an item in the tree with a new entry because of renaming or other actions.
 void saveProperties()
          Deprecated. see #saveSnapinProperties()
 void saveSnapinPreferences()
          Save the snapin properties to the snapin persistance store.
 void selectAllViewSelection()
          Add all entries to the current view selection.
 void setBusy(java.lang.Object busyObject, boolean busy, int busyCategory)
          Sets the Console to the busy state.
 void setCurrentSelectionAsRoot()
          Re-roots the tree to the item currently selected.
 boolean setCurrentView(java.lang.String viewName)
          Set the current view based on its unique ID as a String name.
 void setCursor(java.awt.Cursor cursor)
          Sets the cursor for all of ConsoleOne.
 void setFilterResultModifier(java.lang.String namespaceUniqueID, java.lang.String resultModifierName, ResultModifier rm)
          Saves a named filter result modifier for the specified namespace.
 void setMyWorldAsRoot()
          Changes the root of the tree to MyWorld.
 void setObject(java.lang.String key, java.io.Serializable obj)
          Used to implement the ConsoleOne snapin persistance mechanism.
 void setProperty(java.lang.String name, java.lang.String values)
          Deprecated. see #setObject()
 void setSearchResultModifier(java.lang.String namespaceUniqueID, java.lang.String resultModifierName, ResultModifier rm)
          Saves a named search result modifier for the specified namespace.
 void setTreeSelection(ObjectEntry selection)
          Sets the current selection to a particular object in the tree.
 void setViewSelections(ObjectEntryCollection selections)
          Sets the current selection to a set of objects in the view.
 void showDetails(ObjectEntryCollection objectCollection, boolean modal)
          Launches a property book showing the details of an ObjectEntry array.
 void showDetails(ObjectEntryCollection objectCollection, PageSnapin[] pages, boolean modal)
          Launches a property book page dialog showing the details of an ObjectEntry array.
 void synchronizeHelp()
          Deprecated. As of ConsoleOne version 1.2
 void viewGainedFocus()
          Causes the proper notifications to take place and the tree to lose focus.
 

Field Detail

FOCUS_NONE

public static final int FOCUS_NONE
Defines the static final int used to indicate a non-focus state in the console.

(FOCUS_NONE = 0)


FOCUS_TREE

public static final int FOCUS_TREE
Defines the static final int used to indicate that the tree has focus in the console.

(FOCUS_TREE = 1)


FOCUS_VIEW

public static final int FOCUS_VIEW
Defines the static final int used to indicate that the view has focus in the console.

(FOCUS_VIEW = 2)


MENU_INSERTION_POINT

public static final java.lang.String MENU_INSERTION_POINT
Placeholder to be used in snap-in menus to specify where later menus will snap in.

(MENU_INSERTION_POINT = Resources.getString("MenuInsertionPointTokenKey", "%"))


SNAPIN_PAGE

public static final  SNAPIN_PAGE
Defines the PropertyBook page snap-in type.

(SNAPIN_PAGE = new ConsoleOneSnapinType(1))


SNAPIN_VIEW

public static final  SNAPIN_VIEW
Defines the View snap-in type.

(SNAPIN_VIEW = new ConsoleOneSnapinType(2))


SNAPIN_MENU

public static final  SNAPIN_MENU
Defines the Menu snap-in type.

(SNAPIN_MENU = new ConsoleOneSnapinType(3))


SNAPIN_TOOLBARITEM

public static final  SNAPIN_TOOLBARITEM
Defines the Toolbar snap-in type.

(SNAPIN_TOOLBARITEM = new ConsoleOneSnapinType(4))


SNAPIN_STATUSBARITEM

public static final  SNAPIN_STATUSBARITEM
Defines the Status Bar snap-in type.

(SNAPIN_STATUSBARITEM = new ConsoleOneSnapinType(5))


SNAPIN_SERVICE

public static final  SNAPIN_SERVICE
Defines the Service snap-in type.

(SNAPIN_SERVICE = new ConsoleOneSnapinType(6))


SNAPIN_NAMESPACE

public static final  SNAPIN_NAMESPACE
Defines the Namespace snap-in type.

(SNAPIN_NAMESPACE = new ConsoleOneSnapinType(7))


SNAPIN_DISPLAYNAME

public static final  SNAPIN_DISPLAYNAME
Defines the DisplayName snap-in type.

(SNAPIN_DISPLAYNAME = new ConsoleOneSnapinType(9))


SNAPIN_DISPLAYICON

public static final  SNAPIN_DISPLAYICON
Defines the DisplayIcon snap-in type.

(SNAPIN_DISPLAYICON = new ConsoleOneSnapinType(10))


SNAPIN_POPUP_MENU

public static final  SNAPIN_POPUP_MENU
Defines the PopUpMenu snap-in type.

(SNAPIN_POPUP_MENU = new ConsoleOneSnapinType(11))


SNAPIN_PERSISTENCE

public static final  SNAPIN_PERSISTENCE
Defines Persistence snap-in type.

(SNAPIN_PERSISTENCE = new ConsoleOneSnapinType(12))


SNAPIN_DYNAMIC

public static final  SNAPIN_DYNAMIC
Defines the Dynamic snap-in type.

Snap-ins cannot register with the DynamicSnapin type. It is passed in the InitSnapinInfo parameter of the initSnapin() method when a Dynamic snap-in is initialized. To register as a DynamicSnapin, simply implement the DynamicSnapin interface.

(SNAPIN_DYNAMIC = new ConsoleOneSnapinType(13))


SNAPIN_MAP_OBJECTENTRY

public static final  SNAPIN_MAP_OBJECTENTRY
Defines the MapObjectEntry snap-in type.

(SNAPIN_MAP_OBJECTENTRY = new ConsoleOneSnapinType(14))


SNAPIN_RESULTMODIFIER

public static final  SNAPIN_RESULTMODIFIER
Defines ResultModifier snap-in type.

(SNAPIN_RESULTMODIFIER = new ConsoleOneSnapinType(15))


SNAPIN_INITIALIZATION

public static final  SNAPIN_INITIALIZATION
Defines the Initialization snap-in type.

(SNAPIN_INITIALIZATION = new ConsoleOneSnapinType(16))


SNAPIN_PLACEHOLDER

public static final  SNAPIN_PLACEHOLDER
Defines the Placeholder snap-in type.

(SNAPIN_PLACEHOLDER = new ConsoleOneSnapinType(17))


PLACEHOLDER_NAMESPACE_UNIQUE_ID

public static final java.lang.String PLACEHOLDER_NAMESPACE_UNIQUE_ID
Defines the placeholder namespace id name.

This can be used in registration to register items against placeholder objects.


CONSOLE_VIEW

public static final java.lang.String CONSOLE_VIEW
Deprecated. Use CONSOLE_VIEW_CLASS_NAME instead.

CONSOLE_VIEW_CLASS_NAME

public static final java.lang.String CONSOLE_VIEW_CLASS_NAME
Defines the console view class name.

This can be used in namespace registration to register the console view to a new namespace.

(CONSOLE_VIEW = "com.novell.application.console.consolesnapins.ConsoleView")


CONSOLE_VIEW_UNIQUE_ID

public static final java.lang.String CONSOLE_VIEW_UNIQUE_ID
Method Detail

getDisplayVersion

public java.lang.String getDisplayVersion()
Gets the console display version in the following formats: M.m.r if in release mode, or M.m.r (bYYMMDD{+}) if in development mode The '+' appears if the build is an interim (not checkpointed) build which is usually not saved and cannot be repeated.
Returns:
The all version info in a single string.

getMajorVersion

public java.lang.String getMajorVersion()
Gets the console major version.
Returns:
The major version.

getMinorVersion

public java.lang.String getMinorVersion()
Gets the console minor version.
Returns:
The minor version.

getRevision

public java.lang.String getRevision()
Gets the console version revision.
Returns:
The version revision.

getBuildDate

public java.lang.String getBuildDate()
Gets the date (YYMMDD{+}) when the console was built. The '+' appears if the build is an interim (usually not saved) build.
Returns:
The build date.

getDSAccessMethod

public int getDSAccessMethod()
Gets the access method to be used to access NDS.
Returns:
Integer representing the desired access method. Supported access methods are Shell.JCLIENT_ACCESS, Shell.JNDI_ACCESS and Shell.LDAP_ACCESS.

synchronizeHelp

public void synchronizeHelp()
Deprecated. As of ConsoleOne version 1.2

getHelpPath

public java.lang.String getHelpPath(java.lang.String dirName)
Returns the fully qualified, locale-sensitive path to the help directory, based on the directory name or relative path name specified in the dirName parameter.

The dirName parameter can contain either the help directory name containing the help content or the relative path portion to the help directory. If you pass in the help directory name, the fully qualified path to that directory will be returned. If you pass in the relative path to the help directory, the fully qualified path will be returned. If you pass in a blank string (""), the full path to the locale directory will be returned.

Parameters:
dirName - The name of the help directory or the relative path to the help directory for which to get the fully qualified path.
Returns:
The fully qualified path name of the directory containing the help content.

launchMsgBox

public int launchMsgBox(java.lang.String title,
                        java.lang.String message,
                        int type)
Launches a message box that displays an error message without help.

Your snap-in should call the launchMsgBox() method to display an error message with a Details button that is linked to a help topic. The message box that is launched is defined in NMsgBox.

Parameters:
title - The message box title in the title bar.
message - The message to be displayed inside the message box.
type - The pre-built message box type.
Returns:
The button pressed as an integer.
See Also:
launchMsgBox(String, String, int, String), launchMsgBox(String, String, int, String, String), launchMsgBox(SnapinException)

launchMsgBox

public int launchMsgBox(java.lang.String title,
                        java.lang.String message,
                        int type,
                        java.lang.String helpSetName,
                        java.lang.String helpID)
Launches a message box that displays an error message with context sensitive help.

Your snap-in should call the launchMsgBox() method to display an error message with a Details button that is linked to a help set file, and help ID. Besides passing in the error message information, you should pass in the help set filename and help ID for the help topic to be linked. You should only pass in the base helpset filename and the Javahelp class loader will load the proper helpset based off of the current locale.

The message box that is launched is defined in NMsgBox.

Parameters:
title - The message box title.
message - The message to be displayed inside the message box.
type - The message box type.
helpSetName - The help file to be used for help
helpID - The help id to be used for help
Returns:
The button pressed as an integer.
See Also:
launchMsgBox(String, String, int), launchMsgBox(String, String, int, String), launchMsgBox(SnapinException), launchHelp(String)

launchMsgBox

public int launchMsgBox(java.lang.String title,
                        java.lang.String message,
                        int type,
                        java.lang.String helpSetName)
Launches a message box that displays an error message with help.

Your snap-in should call the launchMsgBox() method to display an error message with a Details button that is linked to a help set file. Besides passing in the error message information, you should pass in the help set filename. You should only pass in the base helpset filename and can get the path using the getHelpPath() method. When the linked help topic is the Javahelp class loader will load the proper helpset based off of the current locale.

You can optionally include an anchor name (for example, ErrorMessages.html#err601) The message box that is launched is defined in NMsgBox.

Parameters:
title - The message box title.
message - The message to be displayed inside the message box.
type - The message box type.
helpSetName - The help file to be used for help, or null if none is available.
Returns:
The button pressed as an integer.
See Also:
launchMsgBox(String, String, int), launchMsgBox(String, String, int, String, String), launchMsgBox(SnapinException), launchHelp(String)

launchMsgBox

public int launchMsgBox(SnapinException exception)
Launches a message box that displays an error message based on a SnapinException.

Your snap-in should call the launchMsgBox() method to display an error message with a Details button that is linked to a help set file, and help ID. The help set file and help ID are obtained from the SnapinException. The body of the message displayed is the String returned from the getLocalizedMessage() method of the exception.

The message box that is launched is defined in NMsgBox.

Parameters:
exception - The snapin exception to display the message for.
Returns:
The button pressed as an integer.
See Also:
launchMsgBox(String, String, int), launchMsgBox(String, String, int, String), launchMsgBox(String, String, int, String, String), launchHelp(String)

helpExists

public boolean helpExists(java.lang.String helpSetName,
                          java.lang.String helpID)
Checks if a Help ID exists in a specified HelpSet

This method can be called to determine if a help set and HelpID within the help set exists

Parameters:
helpSetName - The jHelp file containing the help content.
helpID - The Help ID for a specific topic within the helpset
See Also:
launchMsgBox(String, String, int)

launchHelp

public void launchHelp(java.lang.String helpSetName,
                       java.lang.String helpID,
                       java.awt.Window parent)
Loads a JavaHelp help set displaying the appropriate topic

This method can be called from the various user-interface contexts of your snap-in to display an appropriate help topic. You should pass in the fully-qualified HTML filename and the help topic to be linked.

Parameters:
helpSetName - The jHelp file containing the help content.
helpID - The Help ID for a specific topic within the helpset
parent - The parent Window to be used for the help dialog.
See Also:
launchMsgBox(String, String, int)

launchHelp

public void launchHelp(java.lang.String helpSetName,
                       java.lang.String helpID)
Deprecated. Use the launchHelp that takes a parent window.

launchHelp

public void launchHelp(java.lang.String helpSetName,
                       java.awt.Window parent)
Loads a JavaHelp help set dispalying from the default topic.

This method can be called from the various user-interface contexts of your snap-in to display an appropriate help topic. You should pass in the the help set file name.

Parameters:
helpSetName - The jHelp file containing the help content.
See Also:
launchMsgBox(String, String, int)

launchHelp

public void launchHelp(java.lang.String helpSetName)
Deprecated. Use the launchHelp that takes a parent window.

getTreeSelectionNamespace

public NamespaceSnapin getTreeSelectionNamespace()
Returns the namespace currently being browsed by the user.

If the current tree selection is the root object in the tree, null is returned.

Returns:
The current namespace selected in the namespace tree, or null if the root object is selected.

getTreeSelection

public ObjectEntry getTreeSelection()
Returns the ObjectEntry associated with the item selected in the left panel of the shell tree.

If the current tree selection is the root object in the tree, null is returned.

This method returns null if no item is selected.

Returns:
The ObjectEntry selected in the tree, or null if the root object is selected.

getViewSelections

public ObjectEntryCollection getViewSelections()
Returns the ObjectEntryCollection that contains the currently selected entries in the right panel of the shell view.

This method will never return null. If no item is selected, the returned ObjectEntryCollection will provide an empth enumeration.

Returns:
The ObjectEntryCollection that contains the currently selected entries in the right panel of the shell view.

refreshEntireTree

public void refreshEntireTree()
Brings the tree view up to date with the actual data.

Requests the snap-in to read the entire tree data again. This is done to make sure the tree represents the underlying data correctly, since that data may have been changed outside of the shell.

See Also:
refreshCurrentTreeSelection(), refreshTreeEntry(com.novell.application.console.snapin.ObjectEntry), refreshParentTreeSelection()

refreshParentTreeSelection

public void refreshParentTreeSelection()
Refreshes the peers of the currently selected object in the tree.

This method is the same as refreshEntireTree(), except it only refreshes the parent of the current selection and the parent's subordinates.

See Also:
refreshEntireTree(), refreshCurrentTreeSelection()

refreshTreeEntry

public void refreshTreeEntry(ObjectEntry refreshEntry)
Brings the tree view up to date with the actual data at the point where the ObjectEntry exists in the tree.

The refreshTreeEntry() method requests the snap-in to find the specified ObjectEntry in the tree, and then refresh that ObjectEntry as well as all subordinate entries. This is done to make sure the tree represents the underlying data correctly, since that data may have been changed outside of the shell.

Parameters:
refreshEntry - The ObjectEntry to locate in the tree.
See Also:
refreshEntireTree()

refreshCurrentView

public void refreshCurrentView()
Brings the current view up to date with the actual data.

Requests the snap-in to read the data again. This is done to make sure the view represents the underlying data correctly, since that data may have been changed outside of the shell.


getCurrentSelections

public ObjectEntryCollection getCurrentSelections()
Returns the ObjectEntry array in the panel that has the focus.

The ObjectEntrys selected may be in the tree or the view, whichever currently has focus. This method returns a collection even if the selection is empty.

Returns:
The ObjectEntryCollection containing the ObjectEntrys that are currently selected in the panel that has the focus(tree or view).

getFocusState

public int getFocusState()
Returns the current FocusState of the console.

This method returns an integer of type FocusState. The defined focus states are:

Returns:
An integer representing the focus state of the console.

refreshCurrentTreeSelection

public void refreshCurrentTreeSelection()
Refreshes the subordinates of the currently selected object in the tree.

This method is the same as refreshEntireTree(), except it only refreshes the current selection and its subordinates.

Note: The first time this method is called, it erroneously adds the selected entry as a child entry of itself in the tree. Until this bug is fixed, you can work around the problem by calling the method twice.

See Also:
refreshEntireTree(), refreshParentTreeSelection()

postShellEvent

public void postShellEvent(ShellEvent event)
Deprecated. Replaced with postShellEvent()
Posts an event in the shell.

The shell will then send the posted event to snap-ins that are listening for that type of event.

Parameters:
event - The event that will be posted in the shell.

postShellSelectionEvent

public void postShellSelectionEvent(ShellSelectionEvent event)
Posts a selection event in the shell.

The shell will then send the posted selection event to snap-ins that are listening for that type of event.

Parameters:
event - The event that will be posted in the shell.

postShellLifecycleEvent

public void postShellLifecycleEvent(ShellLifecycleEvent event)
Posts a lifecycle event in the shell.

The shell will then send the posted lifecycle event to snap-ins that are listening for that type of event.

Parameters:
event - The event that will be posted in the shell.

postPropertyBookEvent

public void postPropertyBookEvent(PropertyBookEvent event)
Posts an event to all interesed property book listeners.

The shell will then send the posted event to snap-ins that are listening for property book events.

Parameters:
event - The property book event that will be posted.

getLocale

public java.util.Locale getLocale()
Returns the locale in which the shell is running.
Returns:
The shell's current locale.

getPopupMenu

public javax.swing.JPopupMenu getPopupMenu(ObjectEntryCollection entries)
Returns the pop-up menu associated with the view.

Views may use this method to get the pop-up menu to display when the user right clicks on the ObjectEntry.

Parameters:
entries - The ObjectEntryCollection that contains the entries for which the pop-up menu is needed.
Returns:
The pop-up menu associated with the entries.
See Also:
getViewPopupMenu(String, String)

getViewPopupMenu

public javax.swing.JPopupMenu getViewPopupMenu(java.lang.String namespace,
                                               java.lang.String view)
Returns the view pop-up menu associated with the given ObjectEntry array.

Views may use this method to get the pop-up menu to display when the user right clicks on the ObjectEntry.

Parameters:
namespace - The namespace for which the pop-up menu is needed.
view - The view for which the pop-up menu is needed.
Returns:
The view pop-up menu associated with the specified namespace and view.
See Also:
getPopupMenu(ObjectEntryCollection)

getDisplayIcon

public javax.swing.Icon getDisplayIcon(java.lang.String namespace,
                                       java.lang.String type)
Returns the snap-in icon associated with the specified namespace and object type.

The MainShell class gets this icon from snap-ins (that have been registered against the passed in namespace and object type), which implements the DisplayIconSnapin interface. You can return null if there is no icon being provided and you want the default icon used.

Parameters:
namespace - The namespace of the object type for the desired display icon.
type - The name of the ObjectType for which to get the icon.
Returns:
The icon to be displayed, or null if no icon is being provided.
See Also:
getDisplayIcon(com.novell.application.console.snapin.ObjectEntry), DisplayIconSnapin.getDisplayIcon(String, String)

getDisplayIcon

public javax.swing.Icon getDisplayIcon(ObjectEntry objectEntry)
Returns the snap-in icon associated with the specified ObjectEntry in the tree.

The MainShell class gets this icon from snap-ins (that have been registered against the passed in ObjectEntry), which implement the DisplayIconSnapin interface. You can return null if there is no icon being provided and you want the default icon to be used.

Parameters:
objectEntry - The specified ObjectEntry for which to get the icon that will be displayed in the tree or view.
Returns:
The icon associated with the specified ObjectEntry, or null if no icon is being provided.
See Also:
getDisplayIcon(String, String), DisplayIconSnapin.getDisplayIcon(com.novell.application.console.snapin.ObjectEntry)

containsObject

public boolean containsObject(java.lang.String key)
Used to implement the ConsoleOne snapin persistance mechanism. This function will indicate if an object is present in the snapin persistant store.
Parameters:
key - The key of the object to check for.

removeObject

public java.lang.Object removeObject(java.lang.String key)
Used to implement the ConsoleOne snapin persistance mechanism. This function will remove an object from the snapin persistant store.
Parameters:
key - The key of the object to remove.

setObject

public void setObject(java.lang.String key,
                      java.io.Serializable obj)
Used to implement the ConsoleOne snapin persistance mechanism.
Parameters:
key - The key of the object to serialize to the snapin persistance store.
obj - The object to be serialized. Must implement the Serializable interface.

getObject

public java.lang.Object getObject(java.lang.String key)
Used to implement the ConsoleOne snapin persistance mechanism.
Parameters:
key - The key of the object to deserialize from the snapin persistance store.

saveSnapinPreferences

public void saveSnapinPreferences()
Save the snapin properties to the snapin persistance store.

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String values)
Deprecated. see #setObject()
Sets the specified values for the property indicated.
Parameters:
name - The full name of the propery under which to store the values.
values - The values of the property to store.
See Also:
getProperty(java.lang.String)

getProperty

public java.lang.String getProperty(java.lang.String name)
Deprecated. see #getObject()
Returns the values of the specified property.
Parameters:
name - The full name of the property from which to read values.
Returns:
The values of the property stored under 'name'.
See Also:
setProperty(java.lang.String, java.lang.String)

removeProperty

public void removeProperty(java.lang.String name)
Deprecated. see #removeObject()
Removes the values of the specified property.
Parameters:
name - The full name of the property from which to remove values.
See Also:
setProperty(java.lang.String, java.lang.String)

saveProperties

public void saveProperties()
Deprecated. see #saveSnapinProperties()
Commits the property value changes to the persistent store.
See Also:
setProperty(java.lang.String, java.lang.String)

showDetails

public void showDetails(ObjectEntryCollection objectCollection,
                        boolean modal)
Launches a property book showing the details of an ObjectEntry array.
Parameters:
objectCollection - The ObjectEntryCollection which provides the ObjectEntrys for which details will be shown.
modal - The boolean flag indicating whether or not the property book will be modal.
See Also:
showDetails(com.novell.application.console.snapin.ObjectEntryCollection, com.novell.application.console.snapin.PageSnapin[], boolean)

showDetails

public void showDetails(ObjectEntryCollection objectCollection,
                        PageSnapin[] pages,
                        boolean modal)
Launches a property book page dialog showing the details of an ObjectEntry array.
Parameters:
objectCollection - The ObjectEntryCollection which provides the ObjectEntrys for which details will be shown.
pages - The PageSnapin array to display.
modal - The boolean flag indicating whether or not the property book will be modal.
See Also:
showDetails(com.novell.application.console.snapin.ObjectEntryCollection, boolean)

launchConfigurator

public void launchConfigurator()
Launches a generic snap-in configurator.

This allows the user to configure all snap-ins registered to ConsoleOne. After running the configurator, you may need to restart ConsoleOne to see the changes take effect.


getSnapins

public java.util.Vector getSnapins(Scope theScope)
Deprecated. As of ConsoleOne version 1.2. Use loadSnapins() instead.

loadSnapins

public Snapin[] loadSnapins(Scope theScope)
Returns an array of snap-ins based on the Scope parameter.

The loadSnapins() method asks all registrationItems to load and return their snap-ins based on a Scope. The Scope parameter allows you to specify a scope that applies to this call to the registry. The caller is responsible for calling initSnapin() and shutdownSnapin() on the snap-ins returned from this call.

Parameters:
theScope - The scope of the snap-ins to return.
Returns:
The array of snapins specified by the Scope parameter.

loadSnapins

public Snapin[] loadSnapins(Scope[] scopes)
Returns an array of snap-ins based on the scopes parameter.

The loadSnapins() method asks all registrationItems to load and return their snap-ins based on the Scope array passed in. The theScope parameter allows you to specify the array of scopes that applies to this call to the registry. The caller is responsible for calling initSnapin() and shutdownSnapin() on the snap-ins returned from this call.

Parameters:
scopes - The scope of the snap-ins to return.
Returns:
The array of snapins specified by the Scope parameter.

loadSnapins

public Snapin[] loadSnapins(Scope[] scopes,
                            SnapinContext context)
Returns an array of snap-ins based on the scopes parameter.

The loadSnapins() method asks all registrationItems to load and return their snap-ins based on the Scope array passed in. The theScope parameter allows you to specify the array of scopes that applies to this call to the registry. The caller is responsible for calling initSnapin() and shutdownSnapin() on the snap-ins returned from this call. The snapin context parameter is the context passed to all dynamic snapins that may be queried by this call to loadSnapins().

Parameters:
scopes - The scope of the snap-ins to return.
context - The snapin context to be passed to any dynamic snapins loaded.
Returns:
The array of snapins specified by the Scope parameter.

loadPageSnapins

public Snapin[] loadPageSnapins(ObjectEntry objectEntry)
Returns an array of page snap-ins based on the object entry parameter.

The loadSnapins() method asks all registrationItems to load and return their snap-ins based on the object entry passed in. The caller is responsible for calling initSnapin() and shutdownSnapin() on the snap-ins returned from this call.

Parameters:
objectEntry - The object entry to get the page snapins on.
Returns:
The array of snapins specified by the object entry parameter.

checkSnapins

public boolean checkSnapins(Scope scope)
Checks the registry for the existance of snapins based on a scope

getDisplayName

public java.lang.String getDisplayName(ObjectEntry object)
Returns the display name associated with the specified ObjectEntry in the tree.

The MainShell class gets this name from snap-ins (that have been registered against the passed in ObjectEntry), which implement the DisplayNameSnapin interface. The name of the object is displayed next to an icon representing the object. If null is returned rather than a a display name or this method is not implemented, the default display name will be used.

Parameters:
object - The specified ObjectEntry for which to get the name that will be displayed in the tree or view.
Returns:
The name as a String that will be displayed for the object, or null if no display name is being provided.
See Also:
getDisplayName(java.lang.String, java.lang.String), DisplayNameSnapin.getDisplayName(com.novell.application.console.snapin.ObjectEntry)

getDisplayName

public java.lang.String getDisplayName(ObjectEntry object,
                                       int displayStyle)
Returns the display name associated with the specified ObjectEntry.

The MainShell interface gets this name from DisplayNameSnapin snap-ins that have been registered against the passed in ObjectEntry.

Parameters:
object - The ObjectEntry for which to get the display name.
displayStyle - The format of the name to return. Options are: DisplayNameSnapin.SHORT or DisplayNameSnapin.FULLY_QUALIFIED.
Returns:
The display name of the specified ObjectEntry.
See Also:
DisplayNameSnapin

getDisplayName

public java.lang.String getDisplayName(java.lang.String namespace,
                                       java.lang.String type)
Returns the display name associated with the specified namespace and object type.

The MainShell class gets this name from snap-ins (that have implemented the DisplayNameSnapin interface), which have been registered against the passed in namespace nad object type. The shell will use the returned name to display the specified ObjectEntry in the tree or view. The name of the object is displayed next to an icon representing the object. You can return null if there is no display name being provided and you want the default display name to be used.

Parameters:
namespace - The namespace for which to get the display name.
type - The name of the ObjectType for which to get the display name.
Returns:
The name to be displayed, as a string, or null if no name is being provided.
See Also:
getDisplayName(com.novell.application.console.snapin.ObjectEntry), DisplayNameSnapin.getDisplayName(java.lang.String, java.lang.String)

addPropertyBookListener

public void addPropertyBookListener(PropertyBookListener l)
Adds a property book listener to the shell.
Parameters:
l - The property book listener to be added.

removePropertyBookListener

public void removePropertyBookListener(PropertyBookListener l)
Removes a property book listener from the shell.
Parameters:
l - The property book listener to be removed.

addShellListener

public void addShellListener(ShellListener l)
Deprecated. Replaced with addShellSelectionListener
Adds a shell listener to the shell.
Parameters:
l - The shell listener to be added.

removeShellListener

public void removeShellListener(ShellListener l)
Deprecated. Replaced with removeShellSelectionListener
Removes a shell listener from the shell.
Parameters:
l - The shell listener to be removed.

addShellSelectionListener

public void addShellSelectionListener(ShellSelectionListener l)
Adds a shell selection listener to the shell.
Parameters:
l - The shell selection listener to be added.

removeShellSelectionListener

public void removeShellSelectionListener(ShellSelectionListener l)
Removes a shell selection listener from the shell.
Parameters:
l - The shell selection listener to be removed.

addShellLifecycleListener

public void addShellLifecycleListener(ShellLifecycleListener l)
Adds a shell lifecycle listener to the shell.
Parameters:
l - The shell lifecycle listener to be added.

removeShellLifecycleListener

public void removeShellLifecycleListener(ShellLifecycleListener l)
Removes a shell lifecycle listener from the shell.
Parameters:
l - The shell lifecycle listener to be removed.

addShellFocusListener

public void addShellFocusListener(ShellFocusListener l)
Adds a shell focus listener to the shell.
Parameters:
l - The shell focus listener to be added.

removeShellFocusListener

public void removeShellFocusListener(ShellFocusListener l)
Removes a shell focus listener from the shell.
Parameters:
l - The shell focus listener to be removed.

addInvalidateCacheListener

public void addInvalidateCacheListener(InvalidateCacheListener l)
Adds a tree refresh listener to the shell.
Parameters:
l - The tree refresh listener to be added.

removeInvalidateCacheListener

public void removeInvalidateCacheListener(InvalidateCacheListener l)
Removes a tree refresh listener from the shell.
Parameters:
l - The tree refresh listener to be removed.

addSnapinListener

public void addSnapinListener(SnapinListener l,
                              java.lang.String[] filter)
Adds a snap-in listener to the shell.
Parameters:
l - The snap-in listener to be added.
filter - The events for which to listen.

removeSnapinListener

public void removeSnapinListener(SnapinListener l)
Removes a snap-in listener from the shell.
Parameters:
l - The snap-in listener to be removed.

postVetoableSnapinEvent

public void postVetoableSnapinEvent(SnapinEvent event)
                             throws SnapinVetoException
Posts a vetoable snap-in event.
Parameters:
event - The vetoable snap-in event to be posted.
Throws:
SnapinVetoException - Thrown in response to a vetoable event.

postSnapinEvent

public void postSnapinEvent(SnapinEvent event)
Posts a snap-in event.
Parameters:
event - The snap-in event to be posted.

addVetoableSnapinListener

public void addVetoableSnapinListener(VetoableSnapinListener l,
                                      java.lang.String[] filter)
Adds a vetoable snap-in event listener to the shell.
Parameters:
l - The vetoable snap-in listener to be added.
filter - The vetoable events for which to listen.

removeVetoableSnapinListener

public void removeVetoableSnapinListener(VetoableSnapinListener l)
Removes a vetoable snap-in listener from the shell.
Parameters:
l - The vetoable snap-in listener to be removed.

getShellFrame

public javax.swing.JFrame getShellFrame()
Returns the shell Frame as a JFrame object.

The shell Frame may be needed when snap-ins create dialogs. It should not be manipulated or changed directly by snap-ins.

Returns:
The Frame of the shell as a JFrame object.

getCurrentViewSnapin

public ViewSnapin getCurrentViewSnapin()
Returns the current view snap-in in the console.
Returns:
The current console view snap-in.

getCurrentView

public java.awt.Component getCurrentView()
Returns the current view Component in the console.
Returns:
The current console view as a Component.
See Also:
setCurrentView(java.lang.String)

setCurrentView

public boolean setCurrentView(java.lang.String viewName)
Set the current view based on its unique ID as a String name.

The view must already be in the view menu to be set. A boolean flag is returned; set to true if the shell is able to set the view, or false if not.

Parameters:
viewName - The uniqueID of a view that is available in the view menu.
Returns:
A boolean indicating whether or not the shell was able to set the view.
See Also:
getCurrentView()

exit

public void exit(int status)
Shuts down all snap-ins before the shell exits.

Use the exit() method so that the shell can properly shut down all snap-ins before exiting.

Parameters:
status - Integer returned to the caller that instantiated the shell.

setTreeSelection

public void setTreeSelection(ObjectEntry selection)
Sets the current selection to a particular object in the tree.
Parameters:
selection - The object selected to be set.

setViewSelections

public void setViewSelections(ObjectEntryCollection selections)
Sets the current selection to a set of objects in the view.
Parameters:
selections - The objects to be set as the view selection.

addViewSelections

public void addViewSelections(ObjectEntryCollection selections)
Adds the indicated entries to the current view selection.
Parameters:
selections - The objects to be added to the selection.

clearViewSelection

public void clearViewSelection()
Clears the current view selection.

selectAllViewSelection

public void selectAllViewSelection()
Add all entries to the current view selection.

ensureViewObjectIsVisible

public void ensureViewObjectIsVisible(ObjectEntry object)
Ensures the indicated object is visible in the current view.
Parameters:
object - The object to make visible.

isContainer

public boolean isContainer(ObjectEntry entry)
Checks to see if an object is a container.

Use this method instead of ObjectType.isContainer because, even though an object may not originally be defined as a container whithin its namespace, it may be extended. This call will return true if the entry is originally defined as a container or if it has been extended to be a conatiner by another snap-in.

Parameters:
entry - The ObjectEntry about which to query.
Returns:
A boolean set to true if the entry is a container, otherwise set to false.

getChildren

public ObjectEntryEnumeration getChildren(ObjectEntry entry)
                                   throws SnapinException
Deprecated. As of ConsoleOne version 1.2, use Shell.getChildren(ObjectEntry, ResultModifier) instead.
Throws:
SnapinException - Thrown to notify shell that getChildren failed.

getChildren

public ObjectEntryEnumeration getChildren(ObjectEntry entry,
                                          ResultModifier resultModifier)
                                   throws SnapinException
Returns the enumeration of children for an ObjectEntry.
Parameters:
entry - The ObjectEntry for which to get children.
resultModifier - the modifier for which to change an enumeration result.
Returns:
The enumeration of children object entries.
Throws:
SnapinException - Thrown to notify shell that getChildren failed.

getChildContainers

public ObjectEntryEnumeration getChildContainers(ObjectEntry entry,
                                                 ResultModifier resultModifier)
                                          throws SnapinException
Returns an ObjectEntry's children that should appear in the tree.
Parameters:
entry - The ObjectEntry for which to get children that should appear in the tree.
resultModifier - The modifier for which to change an enumeration result.
Returns:
The enumeration of children object entries.
Throws:
SnapinException - Thrown to notify shell that getChildContainers failed.

getObjectTypes

public ObjectType[] getObjectTypes(ObjectEntry referenceContext)
Returns an array of object types contained by the name space.
Parameters:
referenceContext - An ObjectEntry providing the context from which the ObjectTypes will be extracted. The context could change the returned ObjectTypes if non-global schema is encountered.
Returns:
An array of object types contained within a name space. Null will be handled but pick lists will display an empty set.
See Also:
ObjectType

executeDefaultPopupMenuItemAction

public boolean executeDefaultPopupMenuItemAction(ObjectEntry entry)
Executes the default action on an ObjectEntry.

The default action is defined as the popup menu item in the ObjectEntry's popup menu that is a DefaultMenuItem. If more than one menu item is derived from DefaultMenuItem, the first one found is executed. Snap-in views can use this method to perform the default action when an ObjectEntry is double clicked in the view.

Parameters:
entry - The object on which to execute default action.
Returns:
A boolean set to true if the DefaultMenuItem has been found and executed, or false if not.

addObjectEntryToTreeRoot

public void addObjectEntryToTreeRoot(ObjectEntry entry,
                                     boolean persist)
NOTE: The persist parameter is no longer recognized. Adds an ObjectEntry to the root level of the tree.

The ObjectEntry can be put at the root level temporarily, in which case when the shell is brought down, then back up, it will not be there.

Parameters:
entry - The ObjectEntry to add to the root level of the tree.
persist - No longer used by ConsoleOne
See Also:
removeObjectEntryFromTreeRoot(ObjectEntry)

removeObjectEntryFromTreeRoot

public void removeObjectEntryFromTreeRoot(ObjectEntry entry)
Removes an ObjectEntry from the root level of the tree if it is there.

Only dynamically added object entries can be removed.

Parameters:
entry - The ObjectEntry to remove.
See Also:
addObjectEntryToTreeRoot(ObjectEntry, boolean)

getRootTreeList

public ObjectEntry[] getRootTreeList()
Returns the ObjectEntry array currently making up the root level of the tree.
Returns:
The ObjectEntry array at the root of the tree.

getAllNamespaceSnapins

public NamespaceSnapin[] getAllNamespaceSnapins()
Returns the current instances of all namespaces that are loaded.
Returns:
The array of namespaces currently loaded.

getNamespaceSnapin

public NamespaceSnapin getNamespaceSnapin(java.lang.String uniqueID)
Returns the namespace specified by its uniqueID string.
Parameters:
uniqueID - The string identifying the namespace.
Returns:
The namespace specified by 'uniqueID'. Returns null if the namespace with the specified uniqueID is not found.

launchHelpIndex

public void launchHelpIndex()
Deprecated. As of ConsoleOne version 1.2

viewGainedFocus

public void viewGainedFocus()
Causes the proper notifications to take place and the tree to lose focus. Should be called by the view when it gains focus, such as with a mouse click. Should only be called by the current active view snapin.

addTranslatedStringResourceBundle

public void addTranslatedStringResourceBundle(java.lang.String namespaceUniqueID,
                                              java.lang.String resBundleName)
Adds a resource bundle to list of resource bundles from which to get translated strings using getTranslatedString(). These resource bundles should contain items such as translated type and property names.
Parameters:
namespaceUniqueID - The namespace to associate this resource bundle with.
resBundleName - The full package and class or file name of the resource bundle. (ie. com.novell.application.console.ConsoleResourceBundle)

addImagePoolDirectory

public void addImagePoolDirectory(java.lang.String namespaceUniqueID,
                                  java.lang.String directoryName)
Adds a path to a list of paths to get icons from using getIcon(). These paths should contain images such as generic type and property images.
Parameters:
namespaceUniqueID - The namespace to associate this resouce bundle with.
directoryName - The full path to the directory which contains the icons.

getTranslatedString

public java.lang.String getTranslatedString(java.lang.String namespaceUniqueID,
                                            java.lang.String key)
Returns the translated strings associated with a namespace from resource bundles registered with addTranslatedStringResourceBundle(). These can be translated type and property names. If no translation is found, the key is returned.
Parameters:
namespaceUniqueID - The namespace which is associated with the desired translation.
key - The key associated with the translation. This will usually be the type or property name (User, Group, Description, etc.).
Returns:
The translated string or the key if no translation was found.

getIcon

public javax.swing.Icon getIcon(java.lang.String namespaceUniqueID,
                                java.lang.String imageName)
Returns the images associated with a namespace from directories registered with addImagePoolDirectory(). These can be type and property (if there are any) icons. If an icon is not found, a default unknown icon is returned.
Parameters:
namespaceUniqueID - The namespace which is associated with the desired icon.
imageName - The key associated with the icon. This will usually be the type or property name (User, Group, Description, etc.).
Returns:
The registered icon or a default icon if no icon was found.

mapObjectEntry

public ObjectEntry[] mapObjectEntry(ObjectEntry entry)
                             throws SnapinException
Returns the ObjectEntries that from other namespaces that this entry maps to. Returns a zero length array if no ObjectEntries can be mapped to. ObjectEnries are mapped to other namespaces through registered MapObjectEntrySnapins.
Parameters:
entry - The original entry that is to be mapped to other namespaces.
Returns:
The array of mapped ObjectEntries or a zero length array if no entries could be mapped.
Throws:
SnapinException - To notify the shell that mapObjectEntry failed.

mapObjectEntryToNamespace

public ObjectEntry mapObjectEntryToNamespace(ObjectEntry entry,
                                             java.lang.String namespaceUniqueID)
                                      throws SnapinException
Returns the ObjectEntry from a given namespace that this entry maps to. If the entry is already of the asked-for namespace, it is simply returned. Returns null if no ObjectEntry can be mapped to. ObjectEnries are mapped to other namespaces through registered MapObjectEntrySnapins.
Parameters:
entry - The original entry that is to be mapped to the target namespace.
namespaceUniqueID - The target namespace to map the passed in ObjectEntry to.
Returns:
An entry from the target namespace that is associated with the passed in entry
Throws:
SnapinException - Thrown to notify shell that mapObjectEntryToNamespace failed.

setCurrentSelectionAsRoot

public void setCurrentSelectionAsRoot()
Re-roots the tree to the item currently selected. This can be the item selected in the tree or the view, whichever one is the current selection. If more than one item is selected, the first item is set as root.

setMyWorldAsRoot

public void setMyWorldAsRoot()
Changes the root of the tree to MyWorld. This restores MyWorld as the root of the tree.

goUpOneLevel

public void goUpOneLevel()
Sets the root of the tree as the parent of the current root item.

isTreeReRooted

public boolean isTreeReRooted()
Indicates whether the tree has been re-rooted to an object other than MyWorld.
Returns:
True if the tree has been re-rooted to an object other than MyWorld, otherwise false.

launchFind

public void launchFind(java.lang.Object userObject)
Starts the search dialog to process the search requests and display results. The userObject allows you to create a ResultModifier snap-in that launches its user interface in an initial state other than the default.
Parameters:
userObject - The userObject that defines how the snap-in is initialized

launchFilter

public void launchFilter(java.lang.Object userObject)
Starts the filter dialog to process and apply filter requests to the current view. The userObject allows you to create a ResultModifier snap-in that launches its user interface in an initial state other than the default.
Parameters:
userObject - The userObject that defines how the snap-in is initialized

setSearchResultModifier

public void setSearchResultModifier(java.lang.String namespaceUniqueID,
                                    java.lang.String resultModifierName,
                                    ResultModifier rm)
Saves a named search result modifier for the specified namespace.

setFilterResultModifier

public void setFilterResultModifier(java.lang.String namespaceUniqueID,
                                    java.lang.String resultModifierName,
                                    ResultModifier rm)
Saves a named filter result modifier for the specified namespace.

getSearchResultModifier

public ResultModifier getSearchResultModifier(java.lang.String namespaceUniqueID,
                                              java.lang.String resultModifierName)
Gets a named search result modifier for the specified namespace.

getFilterResultModifier

public ResultModifier getFilterResultModifier(java.lang.String namespaceUniqueID,
                                              java.lang.String resultModifierName)
Gets a named filter result modifier for the specified namespace.

launchPreferences

public void launchPreferences()
Launch preferences PropertyBook

setCursor

public void setCursor(java.awt.Cursor cursor)
Sets the cursor for all of ConsoleOne.
Parameters:
cursor - Cursor to set.

getCursor

public java.awt.Cursor getCursor()
Returns the cursor of the shell.
Returns:
Cursor

setBusy

public void setBusy(java.lang.Object busyObject,
                    boolean busy,
                    int busyCategory)
Sets the Console to the busy state.
Parameters:
busyObject - The object that is busy. Normally, the view.
busy - true if the object is entering the busy state, false otherwise.
busyCategory - The type of object that is busy. These can be any of the BUSY_CATEGORY_* Shell constants.

replaceTreeEntry

public void replaceTreeEntry(ObjectEntry oldEntry,
                             ObjectEntry newEntry)
Replaces an item in the tree with a new entry because of renaming or other actions. The caller must make sure that items subordinate to the entry are still valid. If oldEntry cannot be found, the item is not replaced.
Parameters:
oldEntry - The ObjectEntry in the tree to be replaced.
newEntry - The ObjectEntry that will replace the oldEntry in the tree.

handleSnapinException

public void handleSnapinException(SnapinException exception)
Takes the appropriate action for a snap-in exception, such as reporting the error to the user if neccessary, or exiting if the error is fatal. This method should be called by snap-ins that make any calls that throw SnapinException.
Parameters:
exception - The snapin exception to be handled.

refreshTreeEntryNameAndIcon

public void refreshTreeEntryNameAndIcon(ObjectEntry entry)
Refreshes the name and icon for an object in the tree.
Parameters:
entry - The ObjectEntry of the item in the tree to be refreshed.

displayURL

public boolean displayURL(java.lang.String url)
Displays a URL in the system browser.

Under Unix, the system browser is hard-coded to be 'netscape'. Netscape must be in your PATH for this to work.

Under Windows, this will bring up the default browser under Windows, usually either Netscape or Microsoft IE. The default browser is determined by the OS.

Examples:
shell.displayURL("http://www.novell.com")
shell.displayURL("file://c:\\docs\\index.html")

NOTE: You must include the url type -- either "http://" or "file://".

Returns:
true if the url was displayed, false if there was an error.


API Documentation Copyright © 1998-2003 Novell, Inc. All rights reserved.
ConsoleOne is a registered trademark of Novell Inc.
Generated December 9 2003 1727.