AdventNet Web NMS 4 API Specification

com.adventnet.nms.util
Class NmsUiAPI

java.lang.Object
  |
  +--com.adventnet.nms.util.NmsUiAPI

public final class NmsUiAPI
extends java.lang.Object

NmsUiAPI is one of the core APIs in Web NMS Java Client Framework, which is used in Tree and Custom View related customizations from the client side. Apart from the above mentioned purpose, this class also provides API methods for customizing some of the UI aspects of the client. The various areas where NmsUiAPI can be put to use, is discussed below.

NmsUiAPI and Client Tree

The basic and important component in the Web NMS client is the Tree that appears in the left hand side of the main window. NmsUiAPI API provides static methods which can be used to customize this Tree dynamically from the client side. Various customization that are possible with this class includes, Adding, Modifying, Inserting and Removing tree nodes dynamically.

com.adventnet.nms.fe.common.NmsTreeAPI is a RMI based API that can be used to perform these customizations from the server side.
The various methods present in this API that can be used for tree customizations are briefed below:

Customization briefing
API method
Add Tree node addNodesToTree(Properties[] prop,String parentNodeId, String tobeselected,boolean sync)
Modify Tree Node modifyTreeNode(String nodeId,String tobeSelected,Properties treenodeprops,boolean overWrite)
Move Tree Nodes moveTreeNode(String nodeId,String newParent,String tobeselected,int nodeIndex,boolean sync)
Insert Tree Nodes insertTreeNode(String parentNodeId,Properties prop,String tobeselected,int nodeIndex,boolean sync)
Remove Tree Nodes removeNodeFromTree(String [] nodeIds,String tobeselected,boolean sync)


NmsUiAPI and Custom Views

        A "Custom View" is defined as a view in which, a subset of data (from an entire set of data) can be viewed separately based on some criteria. As the name implies, the user can create as any number of Custom Views as required.

        Apart from the flexibility to create Custom Views from the client (through GUIs), Web NMS provides two different APIs (one from the server side and the other from the client side) for creating Custom Views. This class being the client side API for achieving all the Custom View related customizations, NmsTreeAPI forms the server side equivalent.

API Usage : The various custom view related customizations with their respective API methods is listed in the table below.

Customization briefing
API method
Add new Custom view addCustomView(String moduleId,String parentNodeId,Properties criteria,Properties treeNodeProps,boolean sync)
Modify an already existing Custom view modifyCustomView(String moduleId,String CustomViewId,Properties criteria,Properties treeNodeProps, boolean sync)
Remove a Custom View removeCustomView(String moduleId, String CustomViewId, boolean sync)
Renaming an already existing Custom View renameCustomView(String CustomViewId,String newDisplayName,String tobeSelected)

Custom View related Terminologies :

Following are the important terminologies that are to be understood before proceeding with using the API methods for Custom View related customizations.

NmsUiAPI and Temporary Custom Views

Temporary Custom Views are Custom Views which are non-persistent in nature, i.e. information related to the Custom View is not stored in the database. The Custom View remains valid only for the current session of the client and for the user who has created the Custom View.

API Usage : The various custom view related customizations with their respective API methods is listed in the table below.

Customization briefing
API method
Add new Temporary Custom view addTemporaryCustomView(String nodeId,String moduleId,Properties criteriaProps,Properties treeNodeProps, boolean addToTree,String parentNodeId)
Modify an already existing Custom view modifyTemporaryCustomView(String moduleId,String CustomViewId,Properties criteria,Properties treeNodeProps)
Remove a Custom View removeTemporaryCustomView(String cvId)


This is a client side class and hence can be used only in the JVM as that of the client.

Since:
Web NMS 2.1
See Also:
NmsTreeAPI

Method Summary
static java.lang.String addCustomView(java.lang.String moduleId, java.lang.String parentNodeId, java.util.Properties criteria, java.util.Properties treeNodeProps, boolean sync)
          Adds a Custom View whose Module is passed as the argument to moduleId, under the node whose id is parentNodeId.
static java.lang.String addCustomView(java.lang.String moduleId, java.lang.String rootCvId, java.lang.String displayName, java.util.Hashtable prop, boolean sync)
          Deprecated. The method is deprecated because it does not directly take the tree node properties as an argument. The new method is
public static String addCustomView(String moduleId,String parentNodeId,Properties criteria,Properties treeNodeProps,boolean sync)
static boolean addNodesToTree(java.util.Properties[] prop, java.lang.String parentId)
          Adds nodes to the tree under the parent parentId.
static boolean addNodesToTree(java.util.Properties[] prop, java.lang.String parentNodeId, java.lang.String tobeselected, boolean sync)
          Adds nodes to the tree under the node parentNodeId and selects the node tobeselected.
static boolean addNodesToTree(java.util.Properties[] prop, java.lang.String parentId, java.lang.String tobeselected, java.lang.String panelkey)
          Deprecated. Since the Properties object should contain "panelkey" as a key, the extra argument panelKey is not required. The new method is
public static boolean addNodesToTree (Properties[] prop,String parentNodeId, String tobeselected,boolean sync )
static java.lang.String addTemporaryCustomView(java.lang.String nodeId, java.lang.String moduleId, java.util.Properties criteriaProps, java.util.Properties treeNodeProps, boolean addToTree, java.lang.String parentNodeId)
          Adds a temporary custom view with name displayName whose module is moduleId ,under the parent node whose ID is parentNodeId , by Temporary Custom View it means that this custom view is accesible only to the client in which it is created and it wouldn't disturb the other clients But once this temporary custom view is saved it will be converted in to an permanent custom view and thereafter it will be accesible to all the clients.
static boolean addTreeNode(java.lang.String parentNodeId, java.lang.String tobeselected, java.util.Properties prop, boolean sync)
          Adds a tree node under the node parentNodeId.
static void detachPanel(java.lang.String panelKey)
          Detaches the panel whose key is panelkey.
static void detachPanelFromNodeId(java.lang.String nodeId)
          Detaches the panel whose id is nodeId.
static NmsPanel[] getAllPanelInstances(java.lang.String panelName)
          Returns all the instances corresponding to the given panelName.
static java.lang.String getCurrentCustomView()
          Returns the Current Custom View ID selected in the current Module.
static java.lang.String getCurrentModuleId()
          Returns the Module Id of the current custom view that is selected in the Nms Tree.
static java.lang.String getCurrentNodeId()
          Returns the id of the currently selected node in the Tree.
static java.awt.Cursor getCursor()
          Returns the cursor object currently set for the main frame.
static java.lang.String getCustomViewID(java.lang.String moduleId, java.lang.String displayName)
          Returns the custom view id corresponding to the displayName.
static java.util.Hashtable getCustomViewProperties(java.lang.String moduleId, java.lang.String cvID)
          This method fetches the properties of a Custom View with id cvID whose module is moduleId.
static java.lang.String getCustomViewRoot(java.lang.String moduleId, java.lang.String cvID)
          Returns the name of the root node which contains the given cvID whose module is moduleId.
static java.lang.String[] getCustomViews(java.lang.String moduleId)
          Returns the Ids of the Custom Views present under a module, given its Module Id(moduleId).
static javax.swing.JDesktopPane getDesktopPane()
          Returns the reference of the main DesktopPane.
static javax.swing.JFrame getDetachedFrame(java.lang.String panelKey)
          Returns the JFrame reference for the given panelkey.
static javax.swing.JFrame getDetachedFrameFromNodeId(java.lang.String nodeId)
          Returns the JFrame reference for the given nodeId.
static javax.swing.JInternalFrame getInternalFrame(java.lang.String panelKey)
          Returns the InternalFrame reference for the given panelKey.
static javax.swing.JInternalFrame getInternalFrameFromNodeId(java.lang.String nodeId)
          Returns the InternalFrame reference for the given nodeId.
static javax.swing.JMenuBar getJMenuBar()
          Deprecated. This method does not give the menubar corresponding to the panelkey present. So deprecated.
static javax.swing.JApplet getMainApplet()
          Returns the reference to the the JApplet instance that is shown by the Web NMS client.
static java.util.Vector getMenuVector(java.lang.String panelKey)
          Retuns a vector of JMenu for the given panelKey.
static java.lang.String[] getModuleIds()
          Returns the list of ModuleIds for all the client side modules present in Web NMS.
static NmsPanel getNmsPanel(java.lang.String moduleId)
          Returns the NmsPanel of the associated module given the moduleId.
static NmsPanel getNmsPanelInstance(java.lang.String panelKey)
          Returns the NmsPanelInstance whose key is panelkey.
static javax.swing.JTree getNmsTree()
          Returns the reference to the tree component used in the WebNMS client.
static long getTimeOut()
          Returns the current time interval set for the client to timeout on synchronous requests sent to the server.
static java.util.Properties getTreeNodeProperties(java.lang.String id)
          Returns the properties of the node whose id is passed as the argument.
static java.lang.String[] getTreeNodesCorrespondingToPanelKey(java.lang.String panelKey)
          Returns all the node ids corresponding to the given panelkey.
static XMLNode getXMLNode(java.lang.String nodeId)
          Returns the actual reference of the XMLNode whose id is nodeId.
static XMLNode[] getXMLNodes(java.lang.String displayName)
          Returns the XMLNodes array corresponding to the displayName .
static boolean insertTreeNode(java.lang.String parentNodeId, java.util.Properties prop, java.lang.String tobeselected, int nodeIndex, boolean sync)
          Inserts a new tree node at the specified index under the given parentNodeId.
static boolean isCustomViewSupported(java.lang.String moduleId)
          Checks whether the given module id is a valid one and whether the module can contain Custom Views.
static boolean isPanelInitialized(java.lang.String panelKey)
          Returns whether the panel corresponding to the given panelKey is instantiated or not.
static boolean isPanelInitializedFromNodeId(java.lang.String nodeId)
          Returns whether the panel corresponding to the given nodeId is instantiated or not.
static boolean modifyCustomView(java.lang.String moduleId, java.lang.String cvID, java.util.Hashtable prop, boolean sync)
          Deprecated. This method is deprecated because it does not directly take the TreeNodeProperties as a parameter and tobeselected is also not present. The new method is
public static boolean modifyCustomView (String moduleId,String CustomViewId,Properties criteria,Properties treeNodeProps, boolean sync)
static boolean modifyCustomView(java.lang.String moduleId, java.lang.String CustomViewId, java.util.Properties criteria, java.util.Properties treeNodeProps, boolean sync)
          Modifies the custom view whose Id is CustomViewId and whose module is moduleId.The new properties for the node should be given in the treeNodePropsargument.
static boolean modifyTemporaryCustomView(java.lang.String moduleId, java.lang.String CustomViewId, java.util.Properties criteria, java.util.Properties treeNodeProps)
          Modifies the properties of a temporary custom view with id CustomViewId whose module is moduleId , the new criteria properties of the custom view to be updated should be given in criteriaProps and the new tree node properties of the temporary custom view to be updated has to be given in treeNodeProps .
static boolean modifyTreeNode(java.lang.String nodeId, java.lang.String tobeSelected, java.util.Properties treenodeprops, boolean overWrite)
          Modifies the properties of the tree node whose id is nodeId.
static boolean moveTreeNode(java.lang.String nodeId, java.lang.String newParent, java.lang.String tobeselected, int nodeIndex, boolean sync)
          Moves the node with id nodeId under the specified newParnet at the specified nodeIndex.
static boolean removeCustomView(java.lang.String moduleId, java.lang.String CustomViewId, boolean sync)
          Removes a Custom View with given id cvID whose module is moduleId.
static void removeNodeFromTree(java.lang.String[] nodeIds, java.lang.String tobeselected, boolean sync)
          Removes all the nodes present in the array nodeIds[] from the tree.
static void removeNodeFromTree(java.lang.String parent, java.lang.String id)
          Deprecated. This is deprecated because this method does not take tobeselected as an argument and the method name is as if it supports for more than one node for the operation. The new method is
public static void removeNodeFromTree(String [] nodeIds,String tobeselected,boolean sync)
static boolean removeTemporaryCustomView(java.lang.String cvId)
          Removes the temporary custom view with ID cvId .
static boolean removeTreeNode(java.lang.String nodeId, java.lang.String tobeselected, boolean sync)
          Removes the node from the tree whose id is nodeId.
static boolean renameCustomView(java.lang.String CustomViewId, java.lang.String newDisplayName, java.lang.String tobeSelected)
          Renames a custom view with newDisplayName and selects the tobeSelected node.
static boolean renameCustomView(java.lang.String moduleId, java.lang.String cvID, java.lang.String oldDisplayName, java.lang.String newDisplayName)
          Deprecated. This method is deprecated because it takes oldDisplayName and moduleid as arguments.Since custom view ID is unique in the tree, the module Id and old display name are not necessary. The new method is
public static boolean renameCustomView(String CustomViewId,String newDisplayName,String tobeSelected)
static boolean saveCustomView(java.lang.String moduleId, java.lang.String cvID, boolean sync)
          Deprecated. As of WebNMS2.3. This is because if any customview is created, then by default it will be saved in 2.3.
static boolean saveTemporaryCustomView(java.lang.String customViewId)
          Saves the temporary custom view with the ID custViewId by which it means that it has been converted to a permanent custom view .
static void selectNode(java.lang.String moduleId, java.lang.String cvID)
          Deprecated. This is deprecated since it takes an argument moduleId. Since custom view id is unique the argument moduleId is not necessary.The new method is
public static void selectTreeNode (String nodeId,boolean showPanel)
static void selectTreeNode(java.lang.String nodeId, boolean showPanel)
          Selects the node whose id is nodeId and changes the panel if showPanel is set to true.
static void setCursor(java.awt.Cursor cur)
          Sets the given cursor cur to the main frame.
static void setMenuVector(java.lang.String panelkey, java.util.Vector menusVector)
          Sets the menus that are present in the menusVector to the panel whose key is panelKey.
static void setSelectionRow(int row)
          Selects the node whose index from the top of the tree is row.
static void setTheStatusOnLabel(java.lang.String panelKey, java.lang.String text, java.lang.String color)
          Sets the text on status bar of the given panelKey's frame.
static void setTimeOut(long timeOut)
          Sets the time interval for the client to time out for the requests sent to the server through synchronous mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getModuleIds

public static java.lang.String[] getModuleIds()
Returns the list of ModuleIds for all the client side modules present in Web NMS. This will be equivalent to the Module Ids as specified for the modules in Tree.xml file.
Returns:
The String Array of all the Module Ids in Web NMS client or null if no Module Id exists.

getCustomViews

public static java.lang.String[] getCustomViews(java.lang.String moduleId)
Returns the Ids of the Custom Views present under a module, given its Module Id(moduleId). User should be aware that the method will return null for the modules which cannot have Custom Views. For eg., Mib Manager Module cannot have any Custom View. Currently NmsPanels which are instanceof NmsCustomPanel can have Custom Views.
Parameters:
moduleId - Module Id of the module
Returns:
String array containing all the Custom View IDs for this module or null if no Custom View exist.

addCustomView

public static java.lang.String addCustomView(java.lang.String moduleId,
                                             java.lang.String rootCvId,
                                             java.lang.String displayName,
                                             java.util.Hashtable prop,
                                             boolean sync)
Deprecated. The method is deprecated because it does not directly take the tree node properties as an argument. The new method is
public static String addCustomView(String moduleId,String parentNodeId,Properties criteria,Properties treeNodeProps,boolean sync)

Adds a Custom View with name displayName whose module is moduleId.The module refers to the type of custom view. The rootID parameter will mention the name of the parent Custom View under which the new Custom View will be added.The properties of the new Custom View should be mentioned in the property Object parameter prop. The sync parameter should be set to true if this method should make a synchronous call to the server, in which case the method will return only after the request gets processed by the server and a reply comes back. If sync parameter is set to false the method call will be asynchronous where the method will return back immediately after placing the request to the server. In asynchronous mode the return value of truewill not gurantee the addition of the custom View on the server. It just conveys the succesfull placement of request to the server.

On successfull addition of the Custom View the focus will be changed to the newly added Custom view in the Nms Tree.

Parameters:
moduleId - Module refers to the type of Custom view that is going to be added. Eg. Network Database, Events, Alerts etc.
rootCvId - The ID of the parent Custom View under which which the new Custom View should be added. An invalid value will result in the failure of this method call.
displayName - The name of the new Custom View to be added. The user should be aware that any white space character in displayName will be replaced by underscore character '_'. The users are suggested to use names without white space character embedded in them.
prop - The hashtable object which mentions the properties of the new Custom View with property Name as the key and the property value as the Value. The Hashtable should contain a Properties object, that contains the tree node properties. The hashtable should contain the criteria for the custom view. Eg.
          Hashtable h=new Hashtable();
          Properties p=new Properties();
          p.put("TREE-NAME","Example");
          p.put("MENU-FILE-NAME","alertsmenu.xml");
          p.put("ICON-FILE","images/reddot.png");
          h.put("attributeList",p);
          h.put("FieldsWanted","Status=severity;Source=entity");
          
sync - The variable mentions whether the call should be synchronous or asynchronous. A value of true makes it a synchronous call and false asynchronous
Returns:
The method returns the unique ID if the call had been successfull and null if it had been unsucessfull.
See Also:
removeCustomView(java.lang.String, java.lang.String, boolean), modifyCustomView(java.lang.String, java.lang.String, java.util.Hashtable, boolean)

renameCustomView

public static boolean renameCustomView(java.lang.String moduleId,
                                       java.lang.String cvID,
                                       java.lang.String oldDisplayName,
                                       java.lang.String newDisplayName)
Deprecated. This method is deprecated because it takes oldDisplayName and moduleid as arguments.Since custom view ID is unique in the tree, the module Id and old display name are not necessary. The new method is
public static boolean renameCustomView(String CustomViewId,String newDisplayName,String tobeSelected)

Renames a custom view whose module is moduleId and whose custom view id is cvID. By renaming we mean that display name or the treename can be renamed. The id for a custom view remains the same. The new name is reflected in the NMSTree.
Parameters:
cvID - the custom view ID whose displayName is to be changed
moduleId - The type of custom view. Eg.Network Database or Events etc.,
oldDisplayName - the present display name of the Custom View
newDisplayName - the new display name of the Custom View
Returns:
trueif the rename has been sucessfull else returns false

removeCustomView

public static boolean removeCustomView(java.lang.String moduleId,
                                       java.lang.String CustomViewId,
                                       boolean sync)
Removes a Custom View with given id cvID whose module is moduleId.

The sync parameter should be set to true if this method should make a synchronous call to the server, in which case the method will return only after the request gets processed by the server and a reply comes back. If sync is set false the method call will be asynchronous where the method will return back immediately after placing the request to the server. In asynchronous mode the return value of true will not gurantee the removal of the Custom View on the server. It just conveys the succesfull placement of request to the server.

Parameters:
moduleId - Module of the Custom view that was given during addition of custom view.
CustomViewId - The id of the Custom View to be removed
sync - The sync variable mentions whether the call should be synchronous or asynchronous. A value of true makes it a synchronous call and false asynchronous.
Returns:
The method returns true if the call had been successfull else false.
See Also:
addCustomView(java.lang.String, java.lang.String, java.lang.String, java.util.Hashtable, boolean), modifyCustomView(java.lang.String, java.lang.String, java.util.Hashtable, boolean)

saveCustomView

public static boolean saveCustomView(java.lang.String moduleId,
                                     java.lang.String cvID,
                                     boolean sync)
Deprecated. As of WebNMS2.3. This is because if any customview is created, then by default it will be saved in 2.3.

Saves a Custom View with the given id cvID whose module is moduleId.

The sync parameter should be set to true if this method should make a synchronous call to the server, in which case the method will return only after the request gets processed by the server and a reply comes back. If sync is set false the method call will be asynchronous where the method will return back immediately after placing the request to the server. In asynchronous mode the return value of truewill not gurantee that the custom View has been saved on the server. It just conveys the succesfull placement of request to the server.

Parameters:
moduleId - Module id of the Module under which the Custom View is present.
cvID - The id of the Custom View to be saved
sync - The sync variable mentions whether the call should be synchronous or asynchronous. A value of true makes it a synchronous call and false asynchronous.
Returns:
The method returns true if the call had been successfull else false.

modifyCustomView

public static boolean modifyCustomView(java.lang.String moduleId,
                                       java.lang.String cvID,
                                       java.util.Hashtable prop,
                                       boolean sync)
Deprecated. This method is deprecated because it does not directly take the TreeNodeProperties as a parameter and tobeselected is also not present. The new method is
public static boolean modifyCustomView (String moduleId,String CustomViewId,Properties criteria,Properties treeNodeProps, boolean sync)

Modifies the properties of a Custom View with id cvID whose module is moduleId. The prop object should contain the properties of the Custom View with which it should be updated.

The sync parameter should be set to true if this method should be a synchronous call to the server, in which case the method will return only after the request gets processed by the server and a reply comes back. If sync is set false the method call will be asynchronous where the method will return back immediately after placing the request to the server. In asynchronous mode the return value of true will not gurantee the addition of the custom View on the server. It just conveys the succesfull placement of request to the server.

On successfull modification of the custom view the modified Custom view will be selected in the Nms Tree

Parameters:
moduleId - Module id of the Module under which the Custom View is present.
cvID - The id of the Custom View to be modified.
prop - The Hashtable object containing the properties of the Custom View as key value pair with which the Custom View will be updated. It cannot be null. The Hashtable should contain a Properties object that contains the tree node properties. The Hashtable should contain the criteria for the custom view. Eg.
          Hashtable h=new Hashtable();
          Properties p=new Properties();
          p.put("TREE-NAME","Example");
          p.put("MENU-FILE-NAME","alertsmenu.xml");
          p.put("ICON-FILE","images/reddot.png");
          h.put("attributeList",p);
          h.put("FieldsWanted","Source=entity");
          
sync - The sync variable mentions whether the call should be synchronous or asynchronous. A value of true makes ita synchronous call and false asynchronous.
Returns:
The method returns true if the call had been successfull to update the Custom View else false.
See Also:
addCustomView(java.lang.String, java.lang.String, java.lang.String, java.util.Hashtable, boolean), removeCustomView(java.lang.String, java.lang.String, boolean)

getCustomViewProperties

public static java.util.Hashtable getCustomViewProperties(java.lang.String moduleId,
                                                          java.lang.String cvID)
This method fetches the properties of a Custom View with id cvID whose module is moduleId. The method is always a synchronous call to the server.

Parameters:
moduleId - Module refers to the type of custom view. Eg.Network Database, Events etc.
cvID - The id of the Custom View to be modified.
Returns:
The method returns a Hashtable object containing the properties of the the Custom View as (key,value) pair. The user should be aware that the values of the properties will be a String object. null will be returned in case of error or if the Custom View or module Id specified is invalid
See Also:
modifyCustomView(java.lang.String, java.lang.String, java.util.Hashtable, boolean)

getCurrentModuleId

public static java.lang.String getCurrentModuleId()
Returns the Module Id of the current custom view that is selected in the Nms Tree.
Returns:
Module Id of the selected custom view.
See Also:
getCurrentCustomView()

getCurrentCustomView

public static java.lang.String getCurrentCustomView()
Returns the Current Custom View ID selected in the current Module. It will return null otherwise. The user should be aware that only modules which can contain Custom Views will be taken into consideration by this method to get the Current Custom View.
Returns:
The ID of the Current Custom View else null.
See Also:
getCurrentModuleId()

getCustomViewRoot

public static java.lang.String getCustomViewRoot(java.lang.String moduleId,
                                                 java.lang.String cvID)
Returns the name of the root node which contains the given cvID whose module is moduleId. Returns null if either the given moduleId is not present or the given cvID is not of the type of moduleId.
Parameters:
moduleId - The type of custom view.
cvID - The Id of the Custom View whose root is needed.
Returns:
The method returns a String representation of the CustomViewRoot if one exists else null.
See Also:
addCustomView(java.lang.String, java.lang.String, java.lang.String, java.util.Hashtable, boolean)

isCustomViewSupported

public static boolean isCustomViewSupported(java.lang.String moduleId)
Checks whether the given module id is a valid one and whether the module can contain Custom Views. At present only modules (NmsPanel) which are instances of NmsCustomPanel can have Custom Views. The method returns true if valid else false.
Parameters:
moduleId - The module ID
Returns:
true if the moduleid is valid and if the corresponding module can contain Custom Views, else it returns false.

setCursor

public static void setCursor(java.awt.Cursor cur)
Sets the given cursor cur to the main frame.
Parameters:
cur - The cursor to be set for the main frame
See Also:
getCursor()

getCursor

public static java.awt.Cursor getCursor()
Returns the cursor object currently set for the main frame.
Returns:
the Cursor of the WebNMS main Frame
See Also:
setCursor(java.awt.Cursor)

getNmsTree

public static javax.swing.JTree getNmsTree()
Returns the reference to the tree component used in the WebNMS client.
Returns:
the reference to the JTree present in the WebNMS client

selectNode

public static void selectNode(java.lang.String moduleId,
                              java.lang.String cvID)
Deprecated. This is deprecated since it takes an argument moduleId. Since custom view id is unique the argument moduleId is not necessary.The new method is
public static void selectTreeNode (String nodeId,boolean showPanel)

Selects the NmsPanel whose module is the moduleId and identified by the name cvID.
Parameters:
moduleId - Refers to the type of custom view.
cvID - Specifies the name of the CustomView to be selected. If passed null the rootNode of the module will be selected
See Also:
selectTreeNode(java.lang.String, boolean)

setSelectionRow

public static void setSelectionRow(int row)
Selects the node whose index from the top of the tree is row.
Parameters:
row - Specifies the row to be selected in the WebNms tree. The nodes that are present under a collapsed node are not taken into consideration.

getJMenuBar

public static javax.swing.JMenuBar getJMenuBar()
Deprecated. This method does not give the menubar corresponding to the panelkey present. So deprecated.

Returns the reference to the Main frame's Menu Bar.
Returns:
main frame's menu bar reference.

getNmsPanel

public static NmsPanel getNmsPanel(java.lang.String moduleId)
Returns the NmsPanel of the associated module given the moduleId.
Parameters:
moduleId - The moduleId of the module whose NmsPanel instance should be returned.
Returns:
the NmsPanel instance of the module given by the moduleId.

getMainApplet

public static javax.swing.JApplet getMainApplet()
Returns the reference to the the JApplet instance that is shown by the Web NMS client.
Returns:
the reference to JApplet that is shown in the Web NMS client.

setTimeOut

public static void setTimeOut(long timeOut)
Sets the time interval for the client to time out for the requests sent to the server through synchronous mode.
Parameters:
timeOut - The timeout interval to be set in milliseconds
See Also:
getTimeOut()

getTimeOut

public static long getTimeOut()
Returns the current time interval set for the client to timeout on synchronous requests sent to the server.
Returns:
a long value which will be the current timeout interval in milliseconds.
See Also:
setTimeOut(long)

getCustomViewID

public static java.lang.String getCustomViewID(java.lang.String moduleId,
                                               java.lang.String displayName)
Returns the custom view id corresponding to the displayName. In case more than one custom view exist then the id of the first ocuring node is given. This method is useful when the display name of the Custom Views in the whole of NMS tree is unique.
Parameters:
moduleId - The Module Custom View.
displayName - The name as displayed on the tree. It is the name with which the user added the custom view
Returns:
the cv id of the first occurence of the displayName. If the displayName is not present then null is returned.

getXMLNodes

public static XMLNode[] getXMLNodes(java.lang.String displayName)
Returns the XMLNodes array corresponding to the displayName . For a given displayName corresponding XMLNode is given. If more than one custom view has the same name then the method returns the XMLNodes of all the custom view that has this displayName.
Parameters:
displayName - the display Name of the Custom View
Returns:
an arrayof XMLNodes if the displayName exist. Else returns null.
See Also:
XMLNode

addNodesToTree

public static boolean addNodesToTree(java.util.Properties[] prop,
                                     java.lang.String parentId)
Adds nodes to the tree under the parent parentId. The user can add any number of nodes under a given parent. The prop array should contain the properties of the tree nodes that are to be added. The parentId is the Id of the parent node under which the nodes are to be added.
Parameters:
prop - Property array of all nodes to be added. Each property should contain the attributes of the particular node.

keys -> newleafs : id of the node.
TREE-NAME : the actual display name of the node on the tree
ICON-FILE : icon to be displayed for the node in the tree
like wise other properties like MENU-FILE-NAME, TREE-POPUP-MENU and any of the user property also. *If the following attributes are not present in the properties object for any node then false value will be returned
"newleafs" , "TREE-NAME" ,"panelkey"

parentId - the parent Node ID under which the nodes are to be added.
Returns:
true if successful else returns false

addNodesToTree

public static boolean addNodesToTree(java.util.Properties[] prop,
                                     java.lang.String parentId,
                                     java.lang.String tobeselected,
                                     java.lang.String panelkey)
Deprecated. Since the Properties object should contain "panelkey" as a key, the extra argument panelKey is not required. The new method is
public static boolean addNodesToTree (Properties[] prop,String parentNodeId, String tobeselected,boolean sync )

Adds nodes to the tree under the node parentId and selects the node tobeselected. The user can add any number of nodes under a given parentparentId.
Parameters:
prop - Property array of all nodes to be added. Each property should contain the attributes of the particular node.

keys -> newleafs : id of the node.
TREE-NAME : the actual display name of the node on the tree
ICON-FILE : icon to be displayed for the node in the tree
like wise other properties and any of the user property also. If the following attributes are not present in the properties object for any node then false value is returned
"newleafs" -- id of the treenode to be added
"TREE-NAME" -- Display name of the tree-node
"panelkey" -- The panelkey of the panel that is to be shown.

parentId - the parent Node ID under which the nodes are to be added.
tobeselected - the node that is to be selected after adding the given node.
panelkey - the key of the panel to be selected.
Returns:
true if successful else returns false

addNodesToTree

public static boolean addNodesToTree(java.util.Properties[] prop,
                                     java.lang.String parentNodeId,
                                     java.lang.String tobeselected,
                                     boolean sync)
Adds nodes to the tree under the node parentNodeId and selects the node tobeselected. The user can add any number of nodes under a given parent.The prop array should contain the propertis of all the nodes that are to be added. The parentNodeId is the id of the node under which the nodes are to be added. The parameter sync is used to make calls to the server synchronously or asynchronously.
Parameters:
prop - Property array of all nodes to be added. Each property should contain all the attributes of the particular node.

keys -> newleafs : id of the node.
TREE-NAME : the actual display name of the node on the tree
ICON-FILE : icon to be displayed for the node in the tree
like wise other properties and any of the user property also. If the following attributes are not present in the properties object for any node then false value is returned
"newleafs" -- id of the treenode to be added
"TREE-NAME" -- Display name of the tree-node
"panelkey" -- The panelkey of the panel that is to be shown.

parentNodeId - the parent Node ID under which the nodes are to be added.
tobeselected - the node that is to be selected after adding the given node.
sync - This argument specifies whether the call to the server should be synchronous or not. The value true specifies synchronous call else asynchronous.
Returns:
true if successful else returns false

removeNodeFromTree

public static void removeNodeFromTree(java.lang.String parent,
                                      java.lang.String id)
Deprecated. This is deprecated because this method does not take tobeselected as an argument and the method name is as if it supports for more than one node for the operation. The new method is
public static void removeNodeFromTree(String [] nodeIds,String tobeselected,boolean sync)

Deletes a node from the tree whose id is id and whose parent is parent.
Parameters:
parent - Id of the parent node of the node to be deleted.
id - Id of the node to be removed.

getTreeNodeProperties

public static java.util.Properties getTreeNodeProperties(java.lang.String id)
Returns the properties of the node whose id is passed as the argument.
Parameters:
id - The id of the node
Returns:
The properties of the node whose id is passed as the argument. Returns null if the node is not present.

removeTreeNode

public static boolean removeTreeNode(java.lang.String nodeId,
                                     java.lang.String tobeselected,
                                     boolean sync)
Removes the node from the tree whose id is nodeId. After removing the node, the node that is passed as an argument to tobeselected will be selected. If the tobeselected node is not present in the tree then the parent node of the deleted node will be selected.The parameter sync specifies whether the call to the server should be synchronous or not.
Parameters:
nodeId - The Id of the node to be deleted.
tobeselected - The node that is to be selected after removing the node.
sync - This argument specifies whether the call to the server should be synchronous or not. The value true specifies synchronous else asynchronous.
Returns:
Whether the tree node has been removed or not.

addCustomView

public static java.lang.String addCustomView(java.lang.String moduleId,
                                             java.lang.String parentNodeId,
                                             java.util.Properties criteria,
                                             java.util.Properties treeNodeProps,
                                             boolean sync)
Adds a Custom View whose Module is passed as the argument to moduleId, under the node whose id is parentNodeId. The criteria object contains the criteria for the for the custom view like, the columns that should be present in the table, etc. The properties of the tree node should be specified in the treeNodeProps parameter. The sync parameter should be set to true if the method should make synchronous call to the server. The method will return only after the request gets processed by the server and reply comes back. If sync parameter is set false, the method will return immediately after placing request to the server. In asynchronous mode the return value true conveys the successful placement of request to the server and does not guarantee addition of custom view.
Parameters:
moduleId - Module refers to the type of custom view that is to be added. Eg.Network Database, Events, Alerts etc.
parentNodeId - The Id of the node under which the custom view is to be added.
criteria - The criteria for the custom view. For example, if the custom view should contain only two table columns then the criteria property can contain the key and value as
"FieldsWanted" "Status=severity;Source=entity"
Here the Status, Source specifies the headings of the table columns. severity, entity are the properties of the managed object.
treeNodeProps - The Property object that contains the tree node properties. If the custom view should be displayed as "Test" then the property should contain the key "TREE-NAME" "Test"
Other properties like MENU-FILE-NAME, TREE-POPUP-MENU, TABLE-POPUP-MENU, tobeselected etc., can also be specified in the treenodeProps
sync - This parameter specifies whether the call to the server should be synchronous or not.
Returns:
the custom view id of the added custom view.

addTreeNode

public static boolean addTreeNode(java.lang.String parentNodeId,
                                  java.lang.String tobeselected,
                                  java.util.Properties prop,
                                  boolean sync)
Adds a tree node under the node parentNodeId. After adding the node, the tobeselected node will be selected. The prop object should contain the properties of the node. The sync parameter specifies whether the call to the server should be synchronous or not.
Parameters:
parentNodeId - The id of the node under which a node is to be added.
tobeselected - The id of the node that is to be selected after adding the node. If the specified node is not present in the tree then the currently selected node in the Nms will be retained.
prop - The properties of the node that is to be added. The properties object can contain the following keys.
"ID" - Id of the node (If this key is not present, a default ID will be generated for the node.)
"TREE-NAME" - The name that should be displayed in the tree. (If this key is not present, the Id of the node will be taken as Tree Name.
"PANEL-NAME" - The user defined class name that should appear when the added node is selected. (This class should extend AbstractBaseNmsPanel or should implement NmsPanel)
"ICON-FILE","MENU-FILE-NAME", "TREE-POPUP-MENU" etc. Menu files are present in the directory WebNMS/html/defaultToAllUsers
Icon files should be present in the directory WebNMS/images
sync - This parameter specifies whether the call to the server should be synchronous or not.
Returns:
true if the node is successfully added else false

insertTreeNode

public static boolean insertTreeNode(java.lang.String parentNodeId,
                                     java.util.Properties prop,
                                     java.lang.String tobeselected,
                                     int nodeIndex,
                                     boolean sync)
Inserts a new tree node at the specified index under the given parentNodeId. After inserting the node, the tobeselected node will be selected. The prop object should contain the properties of the node. The parameter sync specifies whether the call to the server should be synchronous or not.
Parameters:
parentNodeId - The id of the node under which a node is to be added.
tobeselected - The id of the node that is to be selected after adding the node. If the specified node is not present in the tree then the currently selected node in the Nms will be retained.
prop - The properties of the node that is to be added. The properties object can contain the following keys.
"ID" - Id of the node (If this key is not present, a default ID will be generated for the node.)
"TREE-NAME" - The name that should be displayed in the tree. (If this key is not present, the Id of the node will be taken as Tree Name.
"PANEL-NAME" - The user defined class name that should appear when the added node is selected. (This class should extend AbstractBaseNmsPanel or should implement NmsPanel)
"MENU-FILE-NAME", "TREE-POPUP-MENU" etc.
nodeIndex - The index at which the node is to be inserted. The index starts from 0.
sync - This parameter specifies whether the call to the server should be synchronous or not.
Returns:
true if the insertion is successful else false

getMenuVector

public static java.util.Vector getMenuVector(java.lang.String panelKey)
Retuns a vector of JMenu for the given panelKey.
Parameters:
panelKey - The key of the panel whose JMenus are required. Eg.EventBrowser, AlertApplet etc.
Returns:
a Vector containing JMenus for the specified panel key.
Returns null if the panel key is invalid.
See Also:
setMenuVector(java.lang.String, java.util.Vector)

setMenuVector

public static void setMenuVector(java.lang.String panelkey,
                                 java.util.Vector menusVector)
Sets the menus that are present in the menusVector to the panel whose key is panelKey. The menusVector should be a vector containing JMenu.
Parameters:
panelkey - The key of the panel. Eg.EventBrowser, AlertApplet etc.
menusVector - The vector containing JMenus that should appear for the given panel.
See Also:
getMenuVector(java.lang.String)

modifyCustomView

public static boolean modifyCustomView(java.lang.String moduleId,
                                       java.lang.String CustomViewId,
                                       java.util.Properties criteria,
                                       java.util.Properties treeNodeProps,
                                       boolean sync)
Modifies the custom view whose Id is CustomViewId and whose module is moduleId.The new properties for the node should be given in the treeNodePropsargument. The criteria object should contain the criteria for the custom view. The parameter sync specifies whether the call to the server should be synchronous or not.
Parameters:
moduleId - The Module under which the custom view was added.
CustomViewId - The id of the custom view that is to be modified.
criteria - This parameter specifies the criteria for the panel. For example, if only one column is needed in the table, then the criteria object can contain the key and value as
"FieldsWanted" "Status=severity"
Here the Status specifies the table column header and severity specifies the Managed object property.
treeNodeProps - If tree node properties are to be modified, this object should contain the properties of the tree node like "TREE-NAME", "TREE-POPUP-MENU","MENU-FILE-NAME","ICON-FILE" etc.
sync - This parameter specifies whether the call to the server should be synchronous or not.
Returns:
true if the custom view is modified else false. Returns false if the specified custom view id is not present.

removeNodeFromTree

public static void removeNodeFromTree(java.lang.String[] nodeIds,
                                      java.lang.String tobeselected,
                                      boolean sync)
Removes all the nodes present in the array nodeIds[] from the tree. The array should contain the Ids of the nodes.
Parameters:
nodeIds - A String array that should contain the Ids of the nodes that are to be removed.
tobeselected - The id of the node that is to be selected after removing the nodes. If the specified node is not present, the currently selected node in the Nms will be retained.
sync - This parameter specifies whether the call to the server should be synchronous or not.

renameCustomView

public static boolean renameCustomView(java.lang.String CustomViewId,
                                       java.lang.String newDisplayName,
                                       java.lang.String tobeSelected)
Renames a custom view with newDisplayName and selects the tobeSelected node.
Parameters:
CustomViewId - The id of the custom view which should be renamed.
newDisplayName - The new name for the custom view.
tobeSelected - The node that is to be selected after renaming the custom view.
Returns:
true if the custom view is renamed successfully else returns false Returns false if the CustomViewId is invalid.

selectTreeNode

public static void selectTreeNode(java.lang.String nodeId,
                                  boolean showPanel)
Selects the node whose id is nodeId and changes the panel if showPanel is set to true.
Parameters:
nodeId - The id of the node that is to be selected.
showPanel - If this parameter is true, then the specified node will be selected and its corresponding panel will be shown. If it is false, then the node will be selected but its corresponding panel will not be shown. If the nodeId is invalid, then the node Adventnet will be selected.

getNmsPanelInstance

public static NmsPanel getNmsPanelInstance(java.lang.String panelKey)
Returns the NmsPanelInstance whose key is panelkey. This method returns null when the corresponding panel is not yet instantiated (when INIT_ON_STARTUP is set to false or when the panel is disposed)
Parameters:
panelKey - The key for the panel whose instance is needed. Eg. AlertApplet, EventBrowser etc.
Returns:
Returns the instance of NmsPanel whose key is panelKey
See Also:
NmsPanel

getAllPanelInstances

public static NmsPanel[] getAllPanelInstances(java.lang.String panelName)
Returns all the instances corresponding to the given panelName.
Parameters:
panelName - The fully qualified class name whose instances are needed. Eg. com.adventnet.nms.util.ImagePanel
When the nodes Fault, Configuration, Performance, AdminTool etc, are selected, instances of ImagePanel will be created. These panels will be instantied only after the selection of these nodes.
Returns:
the currently instantiated instances of the given panel. Returns null if the panelName is invalid.
See Also:
NmsPanel

getXMLNode

public static XMLNode getXMLNode(java.lang.String nodeId)
Returns the actual reference of the XMLNode whose id is nodeId. Every node in the tree is an instance of XMLNode.
Parameters:
nodeId - The id of the node whose XMLNode instance is needed.
Returns:
The XMLNode reference for the nodeId. Returns null if the nodeid is invalid.
See Also:
XMLNode

getDesktopPane

public static javax.swing.JDesktopPane getDesktopPane()
Returns the reference of the main DesktopPane.
Returns:
The reference to the main DesktopPane

getInternalFrameFromNodeId

public static javax.swing.JInternalFrame getInternalFrameFromNodeId(java.lang.String nodeId)
Returns the InternalFrame reference for the given nodeId.
Parameters:
nodeId - The id of the node whose internal frame reference is needed.
Returns:
The reference to the Internal frame of the given node id. Returns null if the node id is invalid.

getInternalFrame

public static javax.swing.JInternalFrame getInternalFrame(java.lang.String panelKey)
Returns the InternalFrame reference for the given panelKey.
Parameters:
panelKey - The key of the panel whose internal frame reference is needed. Eg.AlertApplet, EventBrowser etc.
Returns:
The reference to the Internal frame of the given panelKey. Returns null if the panelKey is invalid.

getDetachedFrameFromNodeId

public static javax.swing.JFrame getDetachedFrameFromNodeId(java.lang.String nodeId)
Returns the JFrame reference for the given nodeId. If the frame is not in detached state the method will return null.
Parameters:
nodeId - The id of the node whose JFrame instance is needed.
Returns:
The reference to JFrame of the given node id. Returns null if the node id is invalid or the panel corresponding to the node id is not detached.

getDetachedFrame

public static javax.swing.JFrame getDetachedFrame(java.lang.String panelKey)
Returns the JFrame reference for the given panelkey. If the frame is not in detached state the method will return null.
Parameters:
panelKey - The key of the panel whose JFrame instance is needed.
Returns:
The reference to JFrame of the given panelKey. Returns null if the panelKey is invalid or the panel corresponding to the panelKey is not detached.

detachPanelFromNodeId

public static void detachPanelFromNodeId(java.lang.String nodeId)
Detaches the panel whose id is nodeId. If the panel is not yet instantiated, the method will do nothing.
Parameters:
nodeId - The id of the node whose panel is to be detached. If the panel is not yet instantiated, the method will do nothing.

detachPanel

public static void detachPanel(java.lang.String panelKey)
Detaches the panel whose key is panelkey. If the frame is already detached then it brings the frame to front. If the panel is not yet instantiated, the method will do nothing.
Parameters:
panelKey - The key of the panel that is to be detached.

isPanelInitializedFromNodeId

public static boolean isPanelInitializedFromNodeId(java.lang.String nodeId)
Returns whether the panel corresponding to the given nodeId is instantiated or not.
Parameters:
nodeId - The id of the node
Returns:
true if the panel is instantiated else false.

isPanelInitialized

public static boolean isPanelInitialized(java.lang.String panelKey)
Returns whether the panel corresponding to the given panelKey is instantiated or not.
Parameters:
panelKey - The key of the panel. Eg. AlertApplet, EventBrowser etc.
Returns:
true if the panel is instantiated else false.

setTheStatusOnLabel

public static void setTheStatusOnLabel(java.lang.String panelKey,
                                       java.lang.String text,
                                       java.lang.String color)
Sets the text on status bar of the given panelKey's frame. If the frame corresponding to the panel key is not detached, but the internal frame being viewed is the given panel key's internal frame then the text will be set on the status bar, and its background color will change.
Parameters:
panelKey - The key of the panel. Eg.AlertApplet, EventBrowser etc. If the panelKey is invalid the method will do nothing.
text - The text that should be displayed in the status bar.
color - The background color of the status bar. The value is the RGB value of the color. Eg. "255-150-175"

getTreeNodesCorrespondingToPanelKey

public static java.lang.String[] getTreeNodesCorrespondingToPanelKey(java.lang.String panelKey)
Returns all the node ids corresponding to the given panelkey. For Example, if the panelKey is NmsListView, then the method will return an array containing the ids
Network Database
Network Database.Networks
Network Database.Nodes
Network Database.Interfaces.
Parameters:
panelKey - The key of the panel.
Returns:
A String array containing the node ids corresponding to the given panelKey.

modifyTreeNode

public static boolean modifyTreeNode(java.lang.String nodeId,
                                     java.lang.String tobeSelected,
                                     java.util.Properties treenodeprops,
                                     boolean overWrite)
Modifies the properties of the tree node whose id is nodeId. The treenodeprops argument should contain the new properties of the tree node. The ID and parent of the node cannot be changed. If the parameter overWrite is false the old properties will only be updated, i.e., the keys that are not present in the newly given properties, but present in old properties will be retained. If this parameter is true, then all the old properties of the tree node will be removed and the newly given properties will be applied to the node.
Parameters:
nodeId - The id of the node whose properties are to be modified.
tobeSelected - The node that is to be selected after modifying the node.
treenodeprops - The new properties for the node.
overWrite - If true all the old properties for the node will be removed and new properties will be applied. If this value is false, the old values will be retained for the keys that are not present in the new properties.
Returns:
true if the node is modified successfully else returns false.

moveTreeNode

public static boolean moveTreeNode(java.lang.String nodeId,
                                   java.lang.String newParent,
                                   java.lang.String tobeselected,
                                   int nodeIndex,
                                   boolean sync)
Moves the node with id nodeId under the specified newParnet at the specified nodeIndex. After moving the node the tobeselected node will be selected. The sync parameter specifies whether the call to the server should be synchronous or not.
Parameters:
nodeId - The id of the node that is to be moved.
newParent - The id of the node under which the node is to be moved.
tobeselected - The node that is to be selected after the node has been moved.
nodeIndex - The index at which the node is to be placed. The index starts from zero.
sync - This parameter specifies whether the call to the server should be synchronous or not.
Returns:
true if the node is moved successfully, else returns false.

getCurrentNodeId

public static java.lang.String getCurrentNodeId()
Returns the id of the currently selected node in the Tree.
Returns:
The id of the node that is currently selected in the Tree.

addTemporaryCustomView

public static java.lang.String addTemporaryCustomView(java.lang.String nodeId,
                                                      java.lang.String moduleId,
                                                      java.util.Properties criteriaProps,
                                                      java.util.Properties treeNodeProps,
                                                      boolean addToTree,
                                                      java.lang.String parentNodeId)
Adds a temporary custom view with name displayName whose module is moduleId ,under the parent node whose ID is parentNodeId , by Temporary Custom View it means that this custom view is accesible only to the client in which it is created and it wouldn't disturb the other clients But once this temporary custom view is saved it will be converted in to an permanent custom view and thereafter it will be accesible to all the clients. On successfull addition of the Custom View the focus will be changed to the newly added Custom view in the Nms Tree.

Parameters:
nodeId - ID of the Node over which the temporary custom view has to to be created.This parameter is vaild only incase when the parameter addToTree is set to false .You are required to pass a null value if no node is existing in the tree for the given moduleid, so that a new panel is opened without adding a node in the tree. But, if null is passed for this parameter and if a node for the given moduleid exists then, the temporary custom view gets created over that node.
moduleId - Module refers to the type of Custom view that is going to be added. Eg. Network Database, Events, Alerts etc.
criteriaProps - The criteria for the custom view. For example, if the custom view should contain only two table columns then the criteria property can contain the * key and value as
"FieldsWanted" "Status=severity;Source=entity"
Here the Status, Source specifies the headings of the table columns. severity, entity are the propertie of the managed object.
treeNodeProps - The Property object that contains the tree node properties. If the custom view should be displayed as "Test" then the property should contain the key "TREE-NAME" "Test"
Other properties like MENU-FILE-NAME, TREE-POPUP-MENU, TABLE-POPUP-MENU, tobeselected etc., can also be specified in the treenodeProps
addToTree - This is used to denote whether the temporary custom view has to be added to the tree or whether it has to be created over another existing custom view.if addToTree is true then the custom view will be added to the tree under the node whose ID is parentNodeId . if addToTree is false then it will created over the customview corresponding to the nodeId .
parentNodeId - The ID of the parent Custom View under which which the new Custom View should be added. An invalid value will result in the failure of this method call.This is not taken in to account when addToTree is false
Returns:
The method returns the unique ID if the call had been successfull and null if it had been unsucessfull.
See Also:
saveTemporaryCustomView(java.lang.String)

modifyTemporaryCustomView

public static boolean modifyTemporaryCustomView(java.lang.String moduleId,
                                                java.lang.String CustomViewId,
                                                java.util.Properties criteria,
                                                java.util.Properties treeNodeProps)
Modifies the properties of a temporary custom view with id CustomViewId whose module is moduleId , the new criteria properties of the custom view to be updated should be given in criteriaProps and the new tree node properties of the temporary custom view to be updated has to be given in treeNodeProps . On successfull modification of the custom view the modified Custom view will be selected in the Nms Tree

Parameters:
CustomViewId - ID of the temporary custom view to be modified
moduleId - Module refers to the type of Custom view that is going to be added. Eg. Network Database, Events, Alerts etc.
criteria - The criteria for the custom view. For example, if the custom view should contain only two table columns then the criteria property can contain the * key and value as
"FieldsWanted" "Status=severity;Source=entity"
Here the Status, Source specifies the headings of the table columns. severity, entity are the propertie of the managed object.
treeNodeProps - The Property object that contains the tree node properties. If the custom view should be displayed as "Test" then the property should contain the key "TREE-NAME" "Test"
Other properties like MENU-FILE-NAME, TREE-POPUP-MENU, TABLE-POPUP-MENU, tobeselected etc., can also be specified in the treenodeProps
Returns:
The method returns true if the call had been successfull to update the Custom View else false.

saveTemporaryCustomView

public static boolean saveTemporaryCustomView(java.lang.String customViewId)
Saves the temporary custom view with the ID custViewId by which it means that it has been converted to a permanent custom view .
Parameters:
customViewId - ID of the temporary custom view to be modified
Returns:
The method returns true if the call had been successfull to save the temporary custom view else false.
See Also:
addTemporaryCustomView(java.lang.String, java.lang.String, java.util.Properties, java.util.Properties, boolean, java.lang.String)

removeTemporaryCustomView

public static boolean removeTemporaryCustomView(java.lang.String cvId)
Removes the temporary custom view with ID cvId .
Parameters:
cvId - ID of the temporary custom view to be removed
Returns:
The method returns true if the call had been successfull else false.

AdventNet Web NMS 4 API Specification