|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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 |
public static final int FOCUS_NONE
(FOCUS_NONE = 0)
public static final int FOCUS_TREE
(FOCUS_TREE = 1)
public static final int FOCUS_VIEW
(FOCUS_VIEW = 2)
public static final java.lang.String MENU_INSERTION_POINT
(MENU_INSERTION_POINT = Resources.getString("MenuInsertionPointTokenKey", "%"))
public static final SNAPIN_PAGE
(SNAPIN_PAGE = new ConsoleOneSnapinType(1))
public static final SNAPIN_VIEW
(SNAPIN_VIEW = new ConsoleOneSnapinType(2))
public static final SNAPIN_MENU
(SNAPIN_MENU = new ConsoleOneSnapinType(3))
public static final SNAPIN_TOOLBARITEM
(SNAPIN_TOOLBARITEM = new ConsoleOneSnapinType(4))
public static final SNAPIN_STATUSBARITEM
(SNAPIN_STATUSBARITEM = new ConsoleOneSnapinType(5))
public static final SNAPIN_SERVICE
(SNAPIN_SERVICE = new ConsoleOneSnapinType(6))
public static final SNAPIN_NAMESPACE
(SNAPIN_NAMESPACE = new ConsoleOneSnapinType(7))
public static final SNAPIN_DISPLAYNAME
(SNAPIN_DISPLAYNAME = new ConsoleOneSnapinType(9))
public static final SNAPIN_DISPLAYICON
(SNAPIN_DISPLAYICON = new ConsoleOneSnapinType(10))
public static final SNAPIN_POPUP_MENU
(SNAPIN_POPUP_MENU = new ConsoleOneSnapinType(11))
public static final SNAPIN_PERSISTENCE
(SNAPIN_PERSISTENCE = new ConsoleOneSnapinType(12))
public static final SNAPIN_DYNAMIC
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))
public static final SNAPIN_MAP_OBJECTENTRY
(SNAPIN_MAP_OBJECTENTRY = new ConsoleOneSnapinType(14))
public static final SNAPIN_RESULTMODIFIER
(SNAPIN_RESULTMODIFIER = new ConsoleOneSnapinType(15))
public static final SNAPIN_INITIALIZATION
(SNAPIN_INITIALIZATION = new ConsoleOneSnapinType(16))
public static final SNAPIN_PLACEHOLDER
(SNAPIN_PLACEHOLDER = new ConsoleOneSnapinType(17))
public static final java.lang.String PLACEHOLDER_NAMESPACE_UNIQUE_ID
This can be used in registration to register items against placeholder objects.
public static final java.lang.String CONSOLE_VIEW
public static final java.lang.String 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")
public static final java.lang.String CONSOLE_VIEW_UNIQUE_ID
| Method Detail |
public java.lang.String getDisplayVersion()
public java.lang.String getMajorVersion()
public java.lang.String getMinorVersion()
public java.lang.String getRevision()
public java.lang.String getBuildDate()
public int getDSAccessMethod()
public void synchronizeHelp()
public java.lang.String getHelpPath(java.lang.String dirName)
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.
dirName - The name of the help directory or the relative path to the help
directory for which to get the fully qualified path.public int launchMsgBox(java.lang.String title,
java.lang.String message,
int type)
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.
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.launchMsgBox(String, String, int, String),
launchMsgBox(String, String, int, String, String),
launchMsgBox(SnapinException)public int launchMsgBox(java.lang.String title,
java.lang.String message,
int type,
java.lang.String helpSetName,
java.lang.String helpID)
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.
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 helphelpID - The help id to be used for helplaunchMsgBox(String, String, int),
launchMsgBox(String, String, int, String),
launchMsgBox(SnapinException),
launchHelp(String)public int launchMsgBox(java.lang.String title,
java.lang.String message,
int type,
java.lang.String helpSetName)
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.
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.launchMsgBox(String, String, int),
launchMsgBox(String, String, int, String, String),
launchMsgBox(SnapinException),
launchHelp(String)public int launchMsgBox(SnapinException exception)
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.
exception - The snapin exception to display the message for.launchMsgBox(String, String, int),
launchMsgBox(String, String, int, String),
launchMsgBox(String, String, int, String, String),
launchHelp(String)public boolean helpExists(java.lang.String helpSetName,
java.lang.String helpID)
This method can be called to determine if a help set and HelpID within the help set exists
helpSetName - The jHelp file containing the help content.helpID - The Help ID for a specific topic within the helpsetlaunchMsgBox(String, String, int)public void launchHelp(java.lang.String helpSetName,
java.lang.String helpID,
java.awt.Window parent)
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.
helpSetName - The jHelp file containing the help content.helpID - The Help ID for a specific topic within the helpsetparent - The parent Window to be used for the help dialog.launchMsgBox(String, String, int)public void launchHelp(java.lang.String helpSetName,
java.lang.String helpID)
public void launchHelp(java.lang.String helpSetName,
java.awt.Window parent)
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.
helpSetName - The jHelp file containing the help content.launchMsgBox(String, String, int)public void launchHelp(java.lang.String helpSetName)
public NamespaceSnapin getTreeSelectionNamespace()
If the current tree selection is the root object in the tree, null is returned.
public ObjectEntry getTreeSelection()
If the current tree selection is the root object in the tree, null is returned.
This method returns null if no item is selected.
public ObjectEntryCollection getViewSelections()
This method will never return null. If no item is selected, the returned ObjectEntryCollection will provide an empth enumeration.
public void refreshEntireTree()
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.
refreshCurrentTreeSelection(),
refreshTreeEntry(com.novell.application.console.snapin.ObjectEntry),
refreshParentTreeSelection()public void refreshParentTreeSelection()
This method is the same as refreshEntireTree(), except it only refreshes the parent of the current selection and the parent's subordinates.
refreshEntireTree(),
refreshCurrentTreeSelection()public void refreshTreeEntry(ObjectEntry refreshEntry)
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.
refreshEntry - The ObjectEntry to locate in the tree.refreshEntireTree()public void refreshCurrentView()
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.
public ObjectEntryCollection getCurrentSelections()
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.
public int getFocusState()
This method returns an integer of type FocusState. The defined focus states are:
public void refreshCurrentTreeSelection()
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.
refreshEntireTree(),
refreshParentTreeSelection()public void postShellEvent(ShellEvent event)
The shell will then send the posted event to snap-ins that are listening for that type of event.
event - The event that will be posted in the shell.public void postShellSelectionEvent(ShellSelectionEvent event)
The shell will then send the posted selection event to snap-ins that are listening for that type of event.
event - The event that will be posted in the shell.public void postShellLifecycleEvent(ShellLifecycleEvent event)
The shell will then send the posted lifecycle event to snap-ins that are listening for that type of event.
event - The event that will be posted in the shell.public void postPropertyBookEvent(PropertyBookEvent event)
The shell will then send the posted event to snap-ins that are listening for property book events.
event - The property book event that will be posted.public java.util.Locale getLocale()
public javax.swing.JPopupMenu getPopupMenu(ObjectEntryCollection entries)
Views may use this method to get the pop-up menu to display when the user right clicks on the ObjectEntry.
entries - The ObjectEntryCollection that contains the
entries for which the pop-up menu is needed.getViewPopupMenu(String, String)public javax.swing.JPopupMenu getViewPopupMenu(java.lang.String namespace,
java.lang.String view)
Views may use this method to get the pop-up menu to display when the user right clicks on the ObjectEntry.
namespace - The namespace for which the pop-up menu is needed.view - The view for which the pop-up menu is needed.getPopupMenu(ObjectEntryCollection)public javax.swing.Icon getDisplayIcon(java.lang.String namespace,
java.lang.String 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.
namespace - The namespace of the object type for the desired
display icon.type - The name of the ObjectType for which to get the icon.getDisplayIcon(com.novell.application.console.snapin.ObjectEntry),
DisplayIconSnapin.getDisplayIcon(String, String)public javax.swing.Icon getDisplayIcon(ObjectEntry objectEntry)
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.
objectEntry - The specified ObjectEntry for which to get the icon
that will be displayed in the tree or view.getDisplayIcon(String, String),
DisplayIconSnapin.getDisplayIcon(com.novell.application.console.snapin.ObjectEntry)public boolean containsObject(java.lang.String key)
key - The key of the object to check for.public java.lang.Object removeObject(java.lang.String key)
key - The key of the object to remove.public void setObject(java.lang.String key,
java.io.Serializable obj)
key - The key of the object to serialize to the snapin persistance store.obj - The object to be serialized. Must implement the Serializable interface.public java.lang.Object getObject(java.lang.String key)
key - The key of the object to deserialize from the snapin persistance store.public void saveSnapinPreferences()
public void setProperty(java.lang.String name,
java.lang.String values)
name - The full name of the propery under which to store the values.values - The values of the property to store.getProperty(java.lang.String)public java.lang.String getProperty(java.lang.String name)
name - The full name of the property from which to read values.setProperty(java.lang.String, java.lang.String)public void removeProperty(java.lang.String name)
name - The full name of the property from which to remove values.setProperty(java.lang.String, java.lang.String)public void saveProperties()
setProperty(java.lang.String, java.lang.String)public void showDetails(ObjectEntryCollection objectCollection,
boolean modal)
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.showDetails(com.novell.application.console.snapin.ObjectEntryCollection,
com.novell.application.console.snapin.PageSnapin[], boolean)public void showDetails(ObjectEntryCollection objectCollection,
PageSnapin[] pages,
boolean modal)
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.showDetails(com.novell.application.console.snapin.ObjectEntryCollection, boolean)public void launchConfigurator()
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.
public java.util.Vector getSnapins(Scope theScope)
loadSnapins() instead.public Snapin[] loadSnapins(Scope theScope)
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.
theScope - The scope of the snap-ins to return.public Snapin[] loadSnapins(Scope[] scopes)
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.
scopes - The scope of the snap-ins to return.public Snapin[] loadSnapins(Scope[] scopes,
SnapinContext context)
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().
scopes - The scope of the snap-ins to return.context - The snapin context to be passed to any dynamic snapins loaded.public Snapin[] loadPageSnapins(ObjectEntry objectEntry)
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.
objectEntry - The object entry to get the page snapins on.public boolean checkSnapins(Scope scope)
public java.lang.String getDisplayName(ObjectEntry object)
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.
object - The specified ObjectEntry for which to get the name that will be
displayed in the tree or view.getDisplayName(java.lang.String, java.lang.String),
DisplayNameSnapin.getDisplayName(com.novell.application.console.snapin.ObjectEntry)public java.lang.String getDisplayName(ObjectEntry object,
int displayStyle)
The MainShell interface gets this name from DisplayNameSnapin snap-ins that have been registered against the passed in ObjectEntry.
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.DisplayNameSnapinpublic java.lang.String getDisplayName(java.lang.String namespace,
java.lang.String 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.
namespace - The namespace for which to get the display name.type - The name of the ObjectType for which to get the display name.getDisplayName(com.novell.application.console.snapin.ObjectEntry),
DisplayNameSnapin.getDisplayName(java.lang.String, java.lang.String)public void addPropertyBookListener(PropertyBookListener l)
l - The property book listener to be added.public void removePropertyBookListener(PropertyBookListener l)
l - The property book listener to be removed.public void addShellListener(ShellListener l)
l - The shell listener to be added.public void removeShellListener(ShellListener l)
l - The shell listener to be removed.public void addShellSelectionListener(ShellSelectionListener l)
l - The shell selection listener to be added.public void removeShellSelectionListener(ShellSelectionListener l)
l - The shell selection listener to be removed.public void addShellLifecycleListener(ShellLifecycleListener l)
l - The shell lifecycle listener to be added.public void removeShellLifecycleListener(ShellLifecycleListener l)
l - The shell lifecycle listener to be removed.public void addShellFocusListener(ShellFocusListener l)
l - The shell focus listener to be added.public void removeShellFocusListener(ShellFocusListener l)
l - The shell focus listener to be removed.public void addInvalidateCacheListener(InvalidateCacheListener l)
l - The tree refresh listener to be added.public void removeInvalidateCacheListener(InvalidateCacheListener l)
l - The tree refresh listener to be removed.public void addSnapinListener(SnapinListener l,
java.lang.String[] filter)
l - The snap-in listener to be added.filter - The events for which to listen.public void removeSnapinListener(SnapinListener l)
l - The snap-in listener to be removed.public void postVetoableSnapinEvent(SnapinEvent event)
throws SnapinVetoException
event - The vetoable snap-in event to be posted.public void postSnapinEvent(SnapinEvent event)
event - The snap-in event to be posted.public void addVetoableSnapinListener(VetoableSnapinListener l,
java.lang.String[] filter)
l - The vetoable snap-in listener to be added.filter - The vetoable events for which to listen.public void removeVetoableSnapinListener(VetoableSnapinListener l)
l - The vetoable snap-in listener to be removed.public javax.swing.JFrame getShellFrame()
The shell Frame may be needed when snap-ins create dialogs. It should not be manipulated or changed directly by snap-ins.
public ViewSnapin getCurrentViewSnapin()
public java.awt.Component getCurrentView()
setCurrentView(java.lang.String)public boolean setCurrentView(java.lang.String viewName)
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.
viewName - The uniqueID of a view that is available in the view menu.getCurrentView()public void exit(int status)
Use the exit() method so that the shell can properly shut down all snap-ins before exiting.
status - Integer returned to the caller that instantiated the shell.public void setTreeSelection(ObjectEntry selection)
selection - The object selected to be set.public void setViewSelections(ObjectEntryCollection selections)
selections - The objects to be set as the view selection.public void addViewSelections(ObjectEntryCollection selections)
selections - The objects to be added to the selection.public void clearViewSelection()
public void selectAllViewSelection()
public void ensureViewObjectIsVisible(ObjectEntry object)
object - The object to make visible.public boolean isContainer(ObjectEntry entry)
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.
entry - The ObjectEntry about which to query.public ObjectEntryEnumeration getChildren(ObjectEntry entry)
throws SnapinException
public ObjectEntryEnumeration getChildren(ObjectEntry entry,
ResultModifier resultModifier)
throws SnapinException
entry - The ObjectEntry for which to get children.resultModifier - the modifier for which to change an enumeration result.public ObjectEntryEnumeration getChildContainers(ObjectEntry entry,
ResultModifier resultModifier)
throws SnapinException
entry - The ObjectEntry for which to get children that should appear in the tree.resultModifier - The modifier for which to change an enumeration result.public ObjectType[] getObjectTypes(ObjectEntry referenceContext)
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.ObjectTypepublic boolean executeDefaultPopupMenuItemAction(ObjectEntry entry)
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.
entry - The object on which to execute default action.public void addObjectEntryToTreeRoot(ObjectEntry entry,
boolean persist)
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.
entry - The ObjectEntry to add to the root level of the tree.persist - No longer used by ConsoleOneremoveObjectEntryFromTreeRoot(ObjectEntry)public void removeObjectEntryFromTreeRoot(ObjectEntry entry)
Only dynamically added object entries can be removed.
entry - The ObjectEntry to remove.addObjectEntryToTreeRoot(ObjectEntry, boolean)public ObjectEntry[] getRootTreeList()
public NamespaceSnapin[] getAllNamespaceSnapins()
public NamespaceSnapin getNamespaceSnapin(java.lang.String uniqueID)
uniqueID - The string identifying the namespace.public void launchHelpIndex()
public void viewGainedFocus()
public void addTranslatedStringResourceBundle(java.lang.String namespaceUniqueID,
java.lang.String resBundleName)
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)public void addImagePoolDirectory(java.lang.String namespaceUniqueID,
java.lang.String directoryName)
namespaceUniqueID - The namespace to associate this resouce bundle with.directoryName - The full path to the directory which contains the icons.public java.lang.String getTranslatedString(java.lang.String namespaceUniqueID,
java.lang.String key)
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.).public javax.swing.Icon getIcon(java.lang.String namespaceUniqueID,
java.lang.String imageName)
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.).public ObjectEntry[] mapObjectEntry(ObjectEntry entry)
throws SnapinException
entry - The original entry that is to be mapped to other namespaces.public ObjectEntry mapObjectEntryToNamespace(ObjectEntry entry,
java.lang.String namespaceUniqueID)
throws SnapinException
entry - The original entry that is to be mapped to the target namespace.namespaceUniqueID - The target namespace to map the passed in ObjectEntry to.public void setCurrentSelectionAsRoot()
public void setMyWorldAsRoot()
public void goUpOneLevel()
public boolean isTreeReRooted()
public void launchFind(java.lang.Object userObject)
userObject - The userObject that defines how the snap-in is initializedpublic void launchFilter(java.lang.Object userObject)
userObject - The userObject that defines how the snap-in is initializedpublic void setSearchResultModifier(java.lang.String namespaceUniqueID,
java.lang.String resultModifierName,
ResultModifier rm)
public void setFilterResultModifier(java.lang.String namespaceUniqueID,
java.lang.String resultModifierName,
ResultModifier rm)
public ResultModifier getSearchResultModifier(java.lang.String namespaceUniqueID,
java.lang.String resultModifierName)
public ResultModifier getFilterResultModifier(java.lang.String namespaceUniqueID,
java.lang.String resultModifierName)
public void launchPreferences()
public void setCursor(java.awt.Cursor cursor)
cursor - Cursor to set.public java.awt.Cursor getCursor()
public void setBusy(java.lang.Object busyObject,
boolean busy,
int busyCategory)
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.public void replaceTreeEntry(ObjectEntry oldEntry,
ObjectEntry newEntry)
oldEntry - The ObjectEntry in the tree to be replaced.newEntry - The ObjectEntry that will replace the oldEntry in the tree.public void handleSnapinException(SnapinException exception)
exception - The snapin exception to be handled.public void refreshTreeEntryNameAndIcon(ObjectEntry entry)
entry - The ObjectEntry of the item in the tree to be refreshed.public boolean displayURL(java.lang.String url)
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://".
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||