|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--com.adventnet.nms.fe.common.NmsTreeAPIImpl
A Class which implements NmsTreeAPI and to get the handle to access the DBXmlutility methods
NmsTreeAPI, Serialized Form| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
NmsTreeAPIImpl()
|
|
NmsTreeAPIImpl(java.sql.Connection con)
|
|
| Method Summary | |
boolean |
addNode(PanelTreeNode panelNode)
This method adds a node as the last child of the specified parent in the user defined tree. |
boolean |
deleteAllNodes(java.lang.String userName)
This method removes all tree nodes from the user defined tree (for the specified user). |
void |
deRegister(java.lang.String userName,
DBXMLNodeListener listener)
Removes the listener from the listeners list so that the listener will no longer get any update for the tree node operation. |
int |
getChildCount(java.lang.String userName,
java.lang.String parent)
Returns the child count of the given parent for the given userName. |
java.util.Vector |
getChildList(java.lang.String userName,
java.lang.String moduleName)
This method returns nodeId belonging to the specified module |
int |
getNodeCount(java.lang.String userName)
This method returns number of tree node that exist for a given user. |
PanelTreeNode |
getPanelTreeNode(java.lang.String userName,
java.lang.String nodeId)
Returns PanelTreeNode for the given nodeId and userName. |
java.lang.String |
getParent(java.lang.String userName,
java.lang.String nodeId)
This method returns parent NodeID for the given NodeID |
XMLNode |
getTree(java.lang.String userName,
java.lang.String id)
This method returns hierarchy of the given node (whose id is passed as an argument). |
boolean |
insertNode(PanelTreeNode panelNode)
This method inserts a node in the specified index, under the specified parent in the user defined tree. |
boolean |
modifyNode(PanelTreeNode panelNode)
This method is used to modify a tree node for a particular user or for all the users. |
boolean |
moveNode(java.lang.String nodeId,
java.lang.String userName,
java.lang.String newParent)
This method moves the specified tree node (whose nodeId is passed as argument) under the given new parent in the user defined tree. |
boolean |
moveNode(java.lang.String nodeId,
java.lang.String userName,
java.lang.String newParent,
int nodeIndex)
This method moves the specified tree node (whose nodeId is passed as argument) to the specific position (specified by the argument index) under the given new parent in the user defined tree. |
boolean |
nodeExist(java.lang.String userName,
java.lang.String nodeId)
This method returns true if the tree node is present in user defined tree. |
void |
register(java.lang.String userName,
DBXMLNodeListener listener)
All the DBXMLNodeListeners will register with the corresponding userName for getting updates on any Node operation viz.,add,delete,modify,insert etc., |
boolean |
removeNode(java.lang.String nodeId,
java.lang.String userName,
boolean deleteAllChild)
This method removes a node from the user defined tree.If deleteAllChild argument is set to true,then the entire hierarchy that means all the child nodes of the specified tree node will be removed from the user defined tree. |
boolean |
removeNode(java.lang.String nodeId,
java.lang.String userName,
java.lang.String moduleName,
boolean deleteAllChild)
This method removes a node from the user defined tree.If deleteAllChild argument is set to true,then the entire hierarchy that means all the child nodes of the specified tree node will be removed from the user defined tree. |
void |
updateUserDetail(java.lang.String userName)
This method creates/updates the tree in the database for a given user. |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public NmsTreeAPIImpl()
throws java.rmi.RemoteException,
UserTransactionException
public NmsTreeAPIImpl(java.sql.Connection con)
throws java.rmi.RemoteException
| Method Detail |
public void register(java.lang.String userName,
DBXMLNodeListener listener)
throws java.rmi.RemoteException
NmsTreeAPIregister in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPIuserName - the userName for which the updates are to be received.listener - the listener registering for the updates.
public void deRegister(java.lang.String userName,
DBXMLNodeListener listener)
throws java.rmi.RemoteException
NmsTreeAPIdeRegister in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPIuserName - the userName for which the updates were received.listener - the listener which has to be deregistered for the updates.
public boolean addNode(PanelTreeNode panelNode)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPIaddNode in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPIpanelNode - a PanelTreeNode which contains data for the nodeid to be addedNmsStorageException - if any problem occurs when adding the node.UserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public boolean insertNode(PanelTreeNode panelNode)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPIinsertNode in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPIpanelNode - a PanelTreeNode which contains data for the nodeid to be addedNmsStorageException - if any problem occurs when inserting the nodeUserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public boolean removeNode(java.lang.String nodeId,
java.lang.String userName,
boolean deleteAllChild)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPIremoveNode in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPInodeId - the unique identification for the node being removed.userName - the name of the user.deleteAllChild - if true delete all the children's of the deleted node else it moves the children as
children to the parent of deleted nodecom.adventnet.nms.util.NmsStorageException - if any problem occurs when removing the node.UserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public boolean removeNode(java.lang.String nodeId,
java.lang.String userName,
java.lang.String moduleName,
boolean deleteAllChild)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPIremoveNode in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPInodeId - the unique identification for the node being removed.userName - the name of the user.moduleName - the name of the table, from which the node is to be removed in addition to PanelTree and PanelProps tables.deleteAllChild - if true delete all the children's of the deleted node else it moves the children as children to the parent of deleted nodejava.rmi.RemoteException - if an error occurs when removing the nodeNmsStorageException - if an error occurs when removing the nodeUserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public boolean modifyNode(PanelTreeNode panelNode)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPImodifyNode in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPIpanelNode - a PanelTreeNode which contains data for
the tree node to be modified. A PanelTreeNode object is used to
define how and which tree node is to be modified.
Example PanelTreeNode Object :
// To set the panel properties
PanelTreeNode panelNode = new PanelTreeNode("Events"); // to
modify "Network Events" tree node
panelNode.setUserName("root"); // to modify "Network Events"
tree node of user "root"
Properties panelProperties = new Properties();
panelProperties.put("TREE-NAME","My Network Events");
panelProperties.put("ICON-FILE","images/pc.png");
panelProperties.put("MENU-FILE-NAME","alertsmenu.xml");
panelProperties.put("<UPDATE_ONLY>","true"); // This attribute is
very important to specify whether the given properites are to be updated
or overwritten
panelNode.setPanelProperties(panelProperties);
After constructing the PanelTreeNode object, invoke NmsTreeAPI.modifyNode()
API to modify the tree node.
Sample Code Snippet :
NmsTreeAPI.modifyNode(panelNode);
NmsStorageException - if any problem occurs when modifying the nodeUserTransactionException - If any error occurs inside the
User Transaction block.
This is applicable only when this API is executed within the context of
a User Transaction.UserTransactionException,
PanelTreeNode
public void updateUserDetail(java.lang.String userName)
throws java.rmi.RemoteException,
com.adventnet.nms.fe.common.CustomViewException,
UserTransactionException
NmsTreeAPIupdateUserDetail in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPIuserName - UserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public boolean moveNode(java.lang.String nodeId,
java.lang.String userName,
java.lang.String newParent)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPImoveNode in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPInodeId - the unique identification for the node being modified.userName - the name of the user.newParent - the parent under which the node is to be moved.NmsStorageException - if any problemUserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public boolean moveNode(java.lang.String nodeId,
java.lang.String userName,
java.lang.String newParent,
int nodeIndex)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPImoveNode in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPInodeId - the unique identification for the node being modified.userName - the name of the user.newNodeIndex - the node index to which node is to be moved.newParent - the parent under which the node is to be moved.NmsStorageException - if any problemUserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public int getChildCount(java.lang.String userName,
java.lang.String parent)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPIgetChildCount in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPIuserName - the name of the userparent - the parent for you need the child countUserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public java.util.Vector getChildList(java.lang.String userName,
java.lang.String moduleName)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPIgetChildList in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPIuserName - moduleName - for which nodeId list is requiredNmsStorageException - for any database errorUserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public java.lang.String getParent(java.lang.String userName,
java.lang.String nodeId)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPIgetParent in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPINODEID: - IDuserName - NmsStorageException - for any database errorUserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public PanelTreeNode getPanelTreeNode(java.lang.String userName,
java.lang.String nodeId)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPI PanelTreeNode for the given nodeId and userName.getPanelTreeNode in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPINODEID: - IDuserName - NmsStorageException - for any database errorUserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public boolean deleteAllNodes(java.lang.String userName)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPIdeleteAllNodes in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPIuserName - represents the name of the userNmsStorageException - for any database errorUserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public int getNodeCount(java.lang.String userName)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPIgetNodeCount in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPIuserName - NmsStorageException - for any database errorUserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public boolean nodeExist(java.lang.String userName,
java.lang.String nodeId)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPInodeExist in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPINODEID: - IDuserName - NmsStorageException - for any database errorUserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
public XMLNode getTree(java.lang.String userName,
java.lang.String id)
throws java.rmi.RemoteException,
NmsStorageException,
UserTransactionException
NmsTreeAPIgetTree in interface NmsTreeAPIcom.adventnet.nms.fe.common.NmsTreeAPIuserName - NODEID: - IDNmsStorageException - for any database errorUserTransactionException - If any error occurs inside the User Transaction block.
This is applicable only when this API is executed within the context of a User Transaction.UserTransactionException
|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||