|
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.ServerCVAPIImpl
Class for custom view creation logic and bind in rmi. This holds the reference of session beans internally for its operations.
UnicastRemoteObject,
ServerCustomViewAPI, Serialized Form| Field Summary | |
protected CustomSessionBean |
csb
|
protected java.lang.String |
moduleId
|
protected com.adventnet.nms.fe.common.SessionUpdateClient |
updateClient
|
protected java.lang.String |
updateId
|
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
ServerCVAPIImpl()
|
|
| Method Summary | |
boolean |
cleanUpUser(java.util.Vector userName,
java.lang.String type)
cleanUpUser is called to close user session for those users who have been disabled,removed or user time has expired |
java.lang.String |
createCustomView(java.lang.String userName,
java.lang.String viewName,
java.util.Properties criteria)
|
java.lang.String |
createCustomView(java.lang.String userName,
java.lang.String viewName,
java.util.Properties criteria,
TableColumn[] tableCols)
Adds CustomView given the required parameters. |
boolean |
createCustomView(java.lang.String userName,
java.lang.String viewId,
java.lang.String viewName,
java.lang.String nodeType,
TableColumn[] tableCols,
java.util.Properties panelProps,
java.util.Properties criteria)
Creates a new Custom View for the user. |
void |
endSession(java.lang.String sessionId)
Ends the session for the client identified by the sessionId. |
java.lang.String[] |
getAllCustomViewNames(java.lang.String userName)
Returns the names of all custom views available for this user. |
ViewData |
getData(java.lang.String sessionId,
NmsTableModelListener listener,
ViewCriteria criteria)
Gets the ViewData object for the given criteria. |
protected abstract UpdateHandlerImpl |
getHandler(java.lang.String userName,
com.adventnet.nms.fe.common.CustomViewUser cvUser)
|
java.util.Properties |
getPropertiesOfObject(java.lang.String userName,
java.lang.String entity)
Fetches the Properties for the object identified by the key. |
java.lang.String |
getSessionId(com.adventnet.nms.fe.common.ClientSession clientSession,
java.lang.String userName)
Returns an Unique Id for the Client which will be used by the Client for further interactions. |
protected java.lang.String |
getUpdateModuleId()
|
CustomViewProperties |
getViewProperties(java.lang.String userName,
java.lang.String viewId)
Fetches the CustomViewProperties of the user for the customView identified by the viewId. |
void |
initForUser(java.lang.String userName)
Performs initialization operations for the user identified by the name. |
protected abstract void |
initModule()
|
boolean |
modifyCustomView(java.lang.String userName,
java.lang.String viewId,
TableColumn[] columnNames,
java.util.Properties panelProps,
java.util.Properties criteria)
Modifies the CustomView given the required parameters. |
void |
registerForUpdates(java.lang.String sessionId,
java.lang.String userName,
java.lang.String viewId,
NmsTableModelListener listener)
Registers the custom view for updates enabling it receive asynchronous notification of changes in the view. |
boolean |
removeCustomView(java.lang.String userName,
java.lang.String viewId)
Removes and cleans up the Custom view of the given name on the client and its counterpart on the server. |
boolean |
renameCustomView(java.lang.String userName,
java.lang.String viewId,
java.lang.String newName)
Renames the customview identified by the viewId |
boolean |
unRegisterForUpdates(java.lang.String sessionId,
NmsTableModelListener listener)
UnRegisters the custom view if already registered for updates. |
boolean |
updateClientStatus(java.lang.String sessionId)
This method is invoked by the RMI client to check the validity of the connection between itself and the server. |
| 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 |
| Field Detail |
protected transient CustomSessionBean csb
protected com.adventnet.nms.fe.common.SessionUpdateClient updateClient
protected java.lang.String moduleId
protected java.lang.String updateId
| Constructor Detail |
public ServerCVAPIImpl()
throws java.rmi.RemoteException
| Method Detail |
public boolean cleanUpUser(java.util.Vector userName,
java.lang.String type)
throws java.rmi.RemoteException
userName - type - can be disabled,removed or userexpired
public java.lang.String getSessionId(com.adventnet.nms.fe.common.ClientSession clientSession,
java.lang.String userName)
throws java.rmi.RemoteException
ServerCustomViewAPIgetSessionId in interface ServerCustomViewAPIcom.adventnet.nms.fe.common.ServerCustomViewAPIsession - The client session that can be used by the server to send notifications to the client.userName - The user who gets the who requests the sessionId
public void endSession(java.lang.String sessionId)
throws java.rmi.RemoteException
ServerCustomViewAPIendSession in interface ServerCustomViewAPIcom.adventnet.nms.fe.common.ServerCustomViewAPIsessionId - the unique Id got via getSessionId() method;
public void initForUser(java.lang.String userName)
throws java.rmi.RemoteException,
com.adventnet.nms.fe.common.CustomViewException
ServerCustomViewAPIinitForUser in interface ServerCustomViewAPIprotected abstract void initModule()
public void registerForUpdates(java.lang.String sessionId,
java.lang.String userName,
java.lang.String viewId,
NmsTableModelListener listener)
throws java.rmi.RemoteException
ServerCustomViewAPIregisterForUpdates in interface ServerCustomViewAPIcom.adventnet.nms.fe.common.ServerCustomViewAPIsessionId - The uniqueId as assigned to the Client Session as got via the getSessionId method.userName - The user who owns the Custom View.viewId - The id given for that view during creation.listener - The NmsTableModelListener which requires the updates for the CustomView.
public boolean unRegisterForUpdates(java.lang.String sessionId,
NmsTableModelListener listener)
throws java.rmi.RemoteException
ServerCustomViewAPIunRegisterForUpdates in interface ServerCustomViewAPIcom.adventnet.nms.fe.common.ServerCustomViewAPIsessionId - The uniqueId as assigned to the Client Session as got via the getSessionId method.listener - The NmsTableModelListener which was used during registering for updates.
public java.lang.String createCustomView(java.lang.String userName,
java.lang.String viewName,
java.util.Properties criteria)
throws java.rmi.RemoteException,
com.adventnet.nms.fe.common.CustomViewException
createCustomView in interface ServerCustomViewAPIcom.adventnet.nms.fe.common.ServerCustomViewAPIuserName - The user who creates the Custom View.viewName - The name to be given for the new Custom View.criteria - The criteria Properties for the new Custom View.
public java.lang.String createCustomView(java.lang.String userName,
java.lang.String viewName,
java.util.Properties criteria,
TableColumn[] tableCols)
throws java.rmi.RemoteException,
com.adventnet.nms.fe.common.CustomViewException
ServerCustomViewAPIcreateCustomView in interface ServerCustomViewAPIcom.adventnet.nms.fe.common.ServerCustomViewAPIuserName - The user who creates the Custom View.viewName - The name to be given for the new Custom View.criteria - The criteria Properties for the new Custom View.tableCols - The array of TableColumn objects for the view
public boolean createCustomView(java.lang.String userName,
java.lang.String viewId,
java.lang.String viewName,
java.lang.String nodeType,
TableColumn[] tableCols,
java.util.Properties panelProps,
java.util.Properties criteria)
throws java.rmi.RemoteException,
com.adventnet.nms.fe.common.CustomViewException
ServerCustomViewAPIcreateCustomView in interface ServerCustomViewAPIcom.adventnet.nms.fe.common.ServerCustomViewAPIuserName - a String value of the user who creates the Custom View.viewId - a String value of the viewId to be given for the new Custom View.viewName - a String value of the display-name to be given for the new Custom View.nodeType - a String value of the node to be represented in the tree like
DEVICE-DATA, DEVICE-GROUP, DEVICE, LEVEL-1, LEVEL-2, etc.tableCols - a TableColumn[] value of the columns that are to be displayed in the clientpanelProps - a Properties value of the additional properties of that view.
This should contain a property with the key as parent and value as the Node ID of
the parent node in the tree.criteria - a Properties value of the view-criteria. The objects matching these criteria
will alone be returned.boolean value of whether the request was successfull.java.rmi.RemoteException - if an error occurscom.adventnet.nms.fe.common.CustomViewException - in any of the following cases,
(i) if Database related error occurs
(ii) any of userName, viewId, viewName,
or panelProps is null or invalid.CustomSessionBean.createCustomView(String, String, String, String, TableColumn[], Properties, Properties)
public java.lang.String[] getAllCustomViewNames(java.lang.String userName)
throws java.rmi.RemoteException,
com.adventnet.nms.fe.common.CustomViewException
getAllCustomViewNames in interface ServerCustomViewAPI
public boolean removeCustomView(java.lang.String userName,
java.lang.String viewId)
throws java.rmi.RemoteException,
com.adventnet.nms.fe.common.CustomViewException
removeCustomView in interface ServerCustomViewAPI
public ViewData getData(java.lang.String sessionId,
NmsTableModelListener listener,
ViewCriteria criteria)
throws java.rmi.RemoteException,
com.adventnet.nms.fe.common.CustomViewException
ServerCustomViewAPIgetData in interface ServerCustomViewAPIcom.adventnet.nms.fe.common.ServerCustomViewAPIsessionId - The uniqueId of the clients session as got from getSessionId method.listener - The NmsTableModelListener which requires the data.criteria - The viewcriteria for the customview.
public CustomViewProperties getViewProperties(java.lang.String userName,
java.lang.String viewId)
throws java.rmi.RemoteException,
com.adventnet.nms.fe.common.CustomViewException
ServerCustomViewAPIgetViewProperties in interface ServerCustomViewAPIcom.adventnet.nms.fe.common.ServerCustomViewAPIuserName - The name of the user who has the customview of the given id.viewId - The id for the CustomView.CustomViewProperties object for the specified CustomView
public java.util.Properties getPropertiesOfObject(java.lang.String userName,
java.lang.String entity)
throws java.rmi.RemoteException
ServerCustomViewAPIProperties for the object identified by the key.getPropertiesOfObject in interface ServerCustomViewAPIcom.adventnet.nms.fe.common.ServerCustomViewAPIuserName - The userName for authorization purposes.key - The key which is used to identify the object.Properties of the object identified by the key.
public boolean modifyCustomView(java.lang.String userName,
java.lang.String viewId,
TableColumn[] columnNames,
java.util.Properties panelProps,
java.util.Properties criteria)
throws java.rmi.RemoteException,
com.adventnet.nms.fe.common.CustomViewException
ServerCustomViewAPImodifyCustomView in interface ServerCustomViewAPIcom.adventnet.nms.fe.common.ServerCustomViewAPIuserName - The user who owns the Custom View.viewId - The id given for that view during creation.tableCols - The array of TableColumn objects for the viewpanelProps - The properties for the customview panel.criteria - The criteria Properties to be in the modified Custom View.
public boolean renameCustomView(java.lang.String userName,
java.lang.String viewId,
java.lang.String newName)
throws java.rmi.RemoteException,
com.adventnet.nms.fe.common.CustomViewException
ServerCustomViewAPIrenameCustomView in interface ServerCustomViewAPIcom.adventnet.nms.fe.common.ServerCustomViewAPIuserName - The user who owns the Custom View.viewId - The id given for that view during creation.newName - The name to be set for the Custmom View.
protected abstract UpdateHandlerImpl getHandler(java.lang.String userName,
com.adventnet.nms.fe.common.CustomViewUser cvUser)
protected java.lang.String getUpdateModuleId()
public boolean updateClientStatus(java.lang.String sessionId)
throws java.rmi.RemoteException
updateClientStatus in interface ServerCustomViewAPIsessionId - The uniqueId as assigned to the Client Session as got via the getSessionId method.java.rmi.RemoteException - if the connection between the RMI client and the server is lost
|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||