|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
CommonClientAPI is the API interface for the Client side API implementation of CustomView manipulations. It mainly deals with the creating, saving and retrieving of CustomViews. The implementation of this interface (say ClientEventAPIImpl ) takes care of interacting with its server-side counterpart (say ServerEventFactoryAPIImpl ) and aids in the creation, deletion, saving and retrieval of CustomViews.
| Method Summary | |
NmsClientTableModel |
createCustomView(java.lang.String name)
To create a custom view of the given name without any criteria and increment. |
NmsClientTableModel |
createCustomView(java.lang.String name,
int increment)
To create a custom view of the given name without any criteria and a preset increment value. |
NmsClientTableModel |
createCustomView(java.lang.String name,
java.util.Properties criteria)
To create a custom view of the given name with a preset criteria and no preset increment value. |
NmsClientTableModel |
createCustomView(java.lang.String name,
java.util.Properties criteria,
int increment)
To create a custom view of the given name with a preset criteria and a preset increment value. |
NmsClientTableModel |
createCustomView(java.lang.String viewId,
java.util.Properties criteria,
int increment,
java.lang.String[] displayFields,
java.lang.String[] displayLabels,
java.util.Properties panelProps)
createCustomView method takes in the displayFields
and their corresponding displayLabels when creating a Custom View. |
NmsClientTableModel |
getCustomView(java.lang.String name)
Deprecated. Another method of similar functionlity exists retrieveCustomView(String) |
java.lang.String[] |
getCustomViewNames()
Returns the names of all custom views for this user. |
java.lang.String[] |
getDefaultDisplayFields()
getDefaultDisplayFields method returns an array of
default field names to be used as display fields for new Custom Views. |
java.lang.String[] |
getDefaultDisplayLabels()
getDefaultDisplayLabels method returns an array of
default labels (display names) for the fields in the Custom View. |
boolean |
removeCustomView(java.lang.String name)
Removes and cleans up the Custom view of the given name on the client and its counterpart on the server. |
NmsClientTableModel |
retrieveCustomView(java.lang.String name)
To retrieve an already saved CustomView. |
boolean |
saveCustomView(java.lang.String name)
Saves the Custom View of the given name for the current user for persistence. |
boolean |
saveCustomViewForAll(java.lang.String name)
Saves the Custom View of the given name for all users. |
| Method Detail |
public NmsClientTableModel createCustomView(java.lang.String name)
throws java.rmi.RemoteException
Note that when no criteria is set for the Custom View model, all the objects are retrieved (It will be a catch all view). And when you set some criteria, only those objects matching the criteria are retrieved by the model.
name - The name for the Custom View.
public NmsClientTableModel createCustomView(java.lang.String name,
int increment)
throws java.rmi.RemoteException
Using the returned NmsClientTableModel instance you could set the other options (like criteria properties, etc) even later.
Note that when no criteria is set for the Custom View model, all the objects are retrieved (It will be a catch all view). And when you set some criteria, only those objects matching the criteria are retrieved by the model.
name - The name for the Custom View.increment - The value by which to navigate the Custom View using
getNext(), getPrevious() , etc., of the NmsClientTableModel.
The increment value can be changed later using the setIncrement
method of NmsClientTableModel.
public NmsClientTableModel createCustomView(java.lang.String name,
java.util.Properties criteria)
throws java.rmi.RemoteException
Note that when no criteria is set for the Custom View model, all the objects are retrieved (It will be a catch all view). And when you set some criteria, only those objects matching the criteria are retrieved by the model.
The criteria Properties you give could be something like the following. For example when you want to retrieve all critical and major events of categories starting with "LXE" between the time frame of say time1 and time2 (where time1 and time2 are the strings containing the long representation of the dates) then it would be
Properties criteria = new Properties();
criteria.put("stringseverity", "critical, major");
criteria.put("category", "LXE*");
criteria.put("time", " "+time1+" and "+time2);
To be more clear about how you could use the time in the criteria the
above example criteria should result in something like
"Wildcards like astrick (*), not (!) and comma (,) can be used in the criteria.167868778 and 87536743" for the "time" key.
name - The name for the Custom View.criteria - The Properties to be satisfied, for an object
to be in the Custom View.
The criteria can be changed later using the changeCriteriaProperties
method of NmsClientTableModel.
public NmsClientTableModel createCustomView(java.lang.String name,
java.util.Properties criteria,
int increment)
throws java.rmi.RemoteException
Note that when no criteria is set for the Custom View model, all the objects are retrieved (It will be a catch all view). And when you set some criteria, only those objects matching the criteria are retrieved by the model.
name - The name for the Custom View.increment - The value by which to navigate the Custom View using
getNext(), getPrevious() , etc., of the NmsClientTableModel.
The increment value can be changed later using the setIncrement
method of NmsClientTableModel.criteria - The Properties to be satisfied, for an object
to be in the Custom View.
The criteria can be changed later using the changeCriteriaProperties
method of NmsClientTableModel. Some more details on criteria in createCustomView(String,Properties)
public NmsClientTableModel createCustomView(java.lang.String viewId,
java.util.Properties criteria,
int increment,
java.lang.String[] displayFields,
java.lang.String[] displayLabels,
java.util.Properties panelProps)
createCustomView method takes in the displayFields
and their corresponding displayLabels when creating a Custom View.
The additional properties related to the custom view may be specified in the panelProps.
If the parent node for this custom view needs to be specified, it can be done so by
setting the by setting the value in the panelProps with key
as "parent"
As from Web NMS 2.3, creating a custom view saves the same by default.
If you want to just add the custom view and not save, then you will have to set
a property "temporaryCustomView" with value as "true" in
the panelProps. You may later save this view using the saveCustomView(String) method.
viewId - a String value to represent the Custom Viewcriteria - a Properties value specifying the criteria for the Custom Viewincrement - an int value by which the view is to be incremented. If
invalid value is given( negative or 0) , default value 10 is taken.displayFields - a String[] value specifying the display fields for
the view. This should not be null.displayLabels - a String[] value specifying the display labels for
the view. This should be equal in length to the displayFields.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.NmsClientTableModel implemention which could be
made use of thereafter to iterate through the resulting set of objects.
public NmsClientTableModel retrieveCustomView(java.lang.String name)
throws java.rmi.RemoteException
name - The name of the Custom View, already created, for which the
NmsClientTableModel is required.
public NmsClientTableModel getCustomView(java.lang.String name)
throws java.rmi.RemoteException
retrieveCustomView(String)
The API keeps track of all custom views created, retrieved or removed. Users of the API needn't worry about caching the instances of the created or retrieved NmsClientTableModels (which represent the custom views). All these are taken care of by the API.
name - The name of the Custom View, already created, for which the
NmsClientTableModel is required.
public java.lang.String[] getCustomViewNames()
throws java.rmi.RemoteException
public boolean saveCustomView(java.lang.String name)
throws java.rmi.RemoteException
As from Web NMS 2.3, creating a custom view saves the same by default.
If you want to just add the custom view and not save, then you will have
to set a property "temporaryCustomView" with value as "true"
in the panelProps when adding a custom view.
Such a temporary custom view can be saved by using this method.
name - The name of the Custom View to be saved.
public boolean saveCustomViewForAll(java.lang.String name)
throws java.rmi.RemoteException
As from Web NMS 2.3, creating a custom view saves the same by default. If you want to just add the custom view and not save, then you will have to set a property "temporaryCustomView" with value as "true" in the panelProps when adding a custom view.
Such a temporary custom view can be saved by using this method.
public boolean removeCustomView(java.lang.String name)
throws java.rmi.RemoteException
name - The name of the Custom View to be removed.public java.lang.String[] getDefaultDisplayFields()
getDefaultDisplayFields method returns an array of
default field names to be used as display fields for new Custom Views.
These are a subset of the property names for an Object in that module.
The labels that are displayed for these fields are available
in getDefaultDisplayLabels()String[] of display fields for the new Custom View.public java.lang.String[] getDefaultDisplayLabels()
getDefaultDisplayLabels method returns an array of
default labels (display names) for the fields in the Custom View.
The size of the array returned by this method should match with those
returned by getDefaultDisplayFields()
String[] value
|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||