"WEBNMS_5 API Docs"

com.adventnet.nms.fe.common
Interface ServerCustomViewAPI

All Superinterfaces:
CommonModuleAPI, java.rmi.Remote
All Known Subinterfaces:
AlertCustomViewAPI, AuditCustomViewAPI, EventCustomViewAPI, PerfCustomViewAPI, TopoCustomViewAPI

public interface ServerCustomViewAPI
extends CommonModuleAPI, java.rmi.Remote

RMI API over session beans.

Since:
Web NMS 2.3
Version:
1.0
See Also:
Remote, CommonModuleAPI

Method Summary
 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.
 java.util.Properties getPropertiesOfObject(java.lang.String userName, java.lang.String key)
          Fetches the Properties for the object identified by the key.
 java.lang.String getSessionId(com.adventnet.nms.fe.common.ClientSession session, java.lang.String userName)
          Returns an Unique Id for the Client which will be used by the Client for further interactions.
 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.
 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.
 

Method Detail

getSessionId

java.lang.String getSessionId(com.adventnet.nms.fe.common.ClientSession session,
                              java.lang.String userName)
                              throws java.rmi.RemoteException
Returns an Unique Id for the Client which will be used by the Client for further interactions.

Parameters:
session - 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
Returns:
String The unique Id
Throws:
java.rmi.RemoteException

createCustomView

java.lang.String createCustomView(java.lang.String userName,
                                  java.lang.String viewName,
                                  java.util.Properties criteria)
                                  throws java.rmi.RemoteException,
                                         CustomViewException
Parameters:
userName - 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.
Returns:
The View Id for the CustomView.
Throws:
java.rmi.RemoteException
CustomViewException

createCustomView

java.lang.String createCustomView(java.lang.String userName,
                                  java.lang.String viewName,
                                  java.util.Properties criteria,
                                  TableColumn[] tableCols)
                                  throws java.rmi.RemoteException,
                                         CustomViewException
Adds CustomView given the required parameters.

Parameters:
userName - 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
Returns:
The viewId for this customView
Throws:
java.rmi.RemoteException
CustomViewException

createCustomView

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,
                                CustomViewException
Creates a new Custom View for the user. It basically provides a way of accessing the createCustomView method of the same signature in CustomSessionBean via RMI.

Parameters:
userName - 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 client
panelProps - 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.
Returns:
a boolean value of whether the request was successfull.
Throws:
java.rmi.RemoteException - if an error occurs
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.
See Also:
CustomSessionBean.createCustomView(String, String, String, String, TableColumn[], Properties, Properties)

getAllCustomViewNames

java.lang.String[] getAllCustomViewNames(java.lang.String userName)
                                         throws java.rmi.RemoteException,
                                                CustomViewException
Returns the names of all custom views available for this user. Returns null when no custom views are there.

Throws:
java.rmi.RemoteException
CustomViewException

removeCustomView

boolean removeCustomView(java.lang.String userName,
                         java.lang.String viewId)
                         throws java.rmi.RemoteException,
                                CustomViewException
Removes and cleans up the Custom view of the given name on the client and its counterpart on the server.

Returns:
true on success
Throws:
java.rmi.RemoteException
CustomViewException

getData

ViewData getData(java.lang.String sessionId,
                 NmsTableModelListener listener,
                 ViewCriteria criteria)
                 throws java.rmi.RemoteException,
                        CustomViewException
Gets the ViewData object for the given criteria.

Parameters:
sessionId - The uniqueId of the clients session as got from getSessionId method.
listener - The NmsTableModelListener which requires the data.
criteria - The viewcriteria for the customview.
Returns:
The ViewData object containing the details required for the view.
Throws:
java.rmi.RemoteException
CustomViewException

getViewProperties

CustomViewProperties getViewProperties(java.lang.String userName,
                                       java.lang.String viewId)
                                       throws java.rmi.RemoteException,
                                              CustomViewException
Fetches the CustomViewProperties of the user for the customView identified by the viewId.

Parameters:
userName - The name of the user who has the customview of the given id.
viewId - The id for the CustomView.
Returns:
The CustomViewProperties object for the specified CustomView
Throws:
java.rmi.RemoteException
CustomViewException

getPropertiesOfObject

java.util.Properties getPropertiesOfObject(java.lang.String userName,
                                           java.lang.String key)
                                           throws java.rmi.RemoteException
Fetches the Properties for the object identified by the key.

Parameters:
userName - The userName for authorization purposes.
key - The key which is used to identify the object.
Returns:
The Properties of the object identified by the key.
Throws:
java.rmi.RemoteException

modifyCustomView

boolean modifyCustomView(java.lang.String userName,
                         java.lang.String viewId,
                         TableColumn[] columnNames,
                         java.util.Properties panelProps,
                         java.util.Properties criteria)
                         throws java.rmi.RemoteException,
                                CustomViewException
Modifies the CustomView given the required parameters.

Parameters:
userName - The user who owns the Custom View.
viewId - The id given for that view during creation.
tableCols - The array of TableColumn objects for the view
panelProps - The properties for the customview panel.
criteria - The criteria Properties to be in the modified Custom View.
Returns:
The viewId for this customView
Throws:
java.rmi.RemoteException
CustomViewException

renameCustomView

boolean renameCustomView(java.lang.String userName,
                         java.lang.String viewId,
                         java.lang.String newName)
                         throws java.rmi.RemoteException,
                                CustomViewException
Renames the customview identified by the viewId

Parameters:
userName - 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.
Returns:
the boolean value specifying the success or failure of operation.
Throws:
java.rmi.RemoteException
CustomViewException

registerForUpdates

void registerForUpdates(java.lang.String sessionId,
                        java.lang.String userName,
                        java.lang.String viewId,
                        NmsTableModelListener listener)
                        throws java.rmi.RemoteException
Registers the custom view for updates enabling it receive asynchronous notification of changes in the view.

Parameters:
sessionId - 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.
Throws:
java.rmi.RemoteException

unRegisterForUpdates

boolean unRegisterForUpdates(java.lang.String sessionId,
                             NmsTableModelListener listener)
                             throws java.rmi.RemoteException
UnRegisters the custom view if already registered for updates.

Parameters:
sessionId - The uniqueId as assigned to the Client Session as got via the getSessionId method.
listener - The NmsTableModelListener which was used during registering for updates.
Returns:
the boolean value specifying the result of the operation.
Throws:
java.rmi.RemoteException

initForUser

void initForUser(java.lang.String userName)
                 throws java.rmi.RemoteException,
                        CustomViewException
Performs initialization operations for the user identified by the name.

Throws:
java.rmi.RemoteException
CustomViewException

endSession

void endSession(java.lang.String sessionId)
                throws java.rmi.RemoteException
Ends the session for the client identified by the sessionId.

Parameters:
sessionId - the unique Id got via getSessionId() method;
Throws:
java.rmi.RemoteException

updateClientStatus

boolean updateClientStatus(java.lang.String sessionId)
                           throws java.rmi.RemoteException
This method is invoked by the RMI client to check the validity of the connection between itself and the server.

Parameters:
sessionId - the uniqueId as assigned to the Client Session as got via the getSessionId method.
Throws:
java.rmi.RemoteException - if the connection lost between the RMI client and the server

"WEBNMS_5 API Docs"

Copyright © 2011 ZOHO Corp., All Rights Reserved.