AdventNet Web NMS 4 API Specification

com.adventnet.nms.server
Interface CommonFilterAPI

All Superinterfaces:
java.rmi.Remote
All Known Subinterfaces:
AlertFilterAPI, EventFilterAPI

public interface CommonFilterAPI
extends java.rmi.Remote

This is an API interface for configuring alert/event filters. New Filters are created with the help of FilterObject objects.


Method Summary
 boolean deleteFilterActions(java.lang.String filtername, java.lang.String[] actions)
          To delete actions of a filter on the server.
 boolean deleteFilters(java.lang.String[] filternames)
          To delete the filters on the server given their names.
 FilterObject[] getCompleteList()
          To get all the filters on the server.
 FilterObject[] getFilters(java.lang.String[] filternames)
          To get the filters given their names.
 FilterObject[] getFiltersFromFile(java.lang.String file)
          To get all the filters from the file.
 boolean saveFiltersToFile(FilterObject[] objs, java.lang.String file)
          To save a set of filters to a file.
 boolean setFilterActions(java.lang.String filtername, FilterAction[] actions, boolean deleteOldActions)
          To set actions to a filter on the server.
 boolean setFilters(FilterObject[] objs)
          To set a list of filters on the server.
 

Method Detail

setFilters

public boolean setFilters(FilterObject[] objs)
                   throws java.rmi.RemoteException,
                          NmsStorageException,
                          FaultException
To set a list of filters on the server.
Parameters:
objs - The array of FilterObject objects.
Returns:
The success of the request. Returns false if atleast one fails.
Throws:
java.rmi.RemoteException - if request fails in remote machine
NmsStorageException - if any error occurs while doing storage operations
FaultException - if any other exception occurs while processing the method.
See Also:
FilterObject

setFilterActions

public boolean setFilterActions(java.lang.String filtername,
                                FilterAction[] actions,
                                boolean deleteOldActions)
                         throws java.rmi.RemoteException,
                                NmsStorageException,
                                FaultException
To set actions to a filter on the server.
Parameters:
filtername - The name of the filter.
actions - The array of FilterAction objects representing actions.
deleteOldActions - Whether to delete the existing actions or not.
Returns:
The success of the request. Returns false if atleast one fails.
Throws:
java.rmi.RemoteException - if request fails in remote machine
NmsStorageException - if any error occurs while doing storage operations
FaultException - if any other exception occurs while processing the method.
See Also:
FilterAction

getCompleteList

public FilterObject[] getCompleteList()
                               throws java.rmi.RemoteException
To get all the filters on the server.
Returns:
An array of FilterObject objects. Returns null if no filters have been configured.
Throws:
java.rmi.RemoteException -  
See Also:
FilterObject

getFilters

public FilterObject[] getFilters(java.lang.String[] filternames)
                          throws java.rmi.RemoteException,
                                 FaultException
To get the filters given their names.
Parameters:
filternames - An array of names of the filters.
Returns:
An array of FilterObject objects. If there is no filter corressponding to a filtername, a null value is returned.
Throws:
java.rmi.RemoteException - if request fails in remote machine
FaultException - if any other exception occurs while processing the method.
See Also:
FilterObject

deleteFilters

public boolean deleteFilters(java.lang.String[] filternames)
                      throws java.rmi.RemoteException,
                             NmsStorageException,
                             FaultException
To delete the filters on the server given their names.
Parameters:
filternames - An array of names of the filters.
Returns:
success of the request. Returns false if atleast one fails.
Throws:
java.rmi.RemoteException - if request fails in remote machine
NmsStorageException - if any error occurs while doing storage operations
FaultException - if any other exception occurs while processing the method.

deleteFilterActions

public boolean deleteFilterActions(java.lang.String filtername,
                                   java.lang.String[] actions)
                            throws java.rmi.RemoteException,
                                   NmsStorageException,
                                   FaultException
To delete actions of a filter on the server.
Parameters:
filtername - The name of the filter.
actions - An array of names of actions which have to be deleted.
Returns:
Success of the request. Returns false if atleast one fails.
Throws:
java.rmi.RemoteException - if request fails in remote machine
NmsStorageException - if any error occurs while doing storage operations
FaultException - if any other exception occurs while processing the method.

saveFiltersToFile

public boolean saveFiltersToFile(FilterObject[] objs,
                                 java.lang.String file)
                          throws java.rmi.RemoteException,
                                 NmsStorageException,
                                 FaultException
To save a set of filters to a file.
Parameters:
objs - array of FilterObject objects each representing a filter.
file - the name of the file
Returns:
Success of the request. Returns false if atleast one fails.
Throws:
java.rmi.RemoteException - if request fails in remote machine
NmsStorageException - if any error occurs while doing storage operations
FaultException - if any other exception occurs while processing the method.
See Also:
FilterObject

getFiltersFromFile

public FilterObject[] getFiltersFromFile(java.lang.String file)
                                  throws java.rmi.RemoteException,
                                         FaultException
To get all the filters from the file.
Parameters:
file - the name of the file.
Returns:
an array of FilterObject objects. Returns null if either the file does not exist or there are no filters in the file.
Throws:
java.rmi.RemoteException - if request fails in remote machine
FaultException - if any other exception occurs while processing the method.
See Also:
FilterObject

AdventNet Web NMS 4 API Specification