org.opennms.web.map.db
Class Manager

java.lang.Object
  extended by org.opennms.web.map.db.Manager
Direct Known Subclasses:
DBManager

public abstract class Manager
extends Object

Abstract Manager class.

Since:
1.8.1
Version:
$Id: $
Author:
maumig, Antonio Russo

Field Summary
protected  boolean initialized
           
 
Constructor Summary
Manager()
          Constructor for Manager.
 
Method Summary
abstract  int countMaps(int mapId)
          countMaps
abstract  int deleteMap(int id)
          delete the map with id in input
abstract  void deleteMapTypeElementsFromAllMaps()
          deleteMapTypeElementsFromAllMaps
abstract  void deleteNodeTypeElementsFromAllMaps()
          deleteNodeTypeElementsFromAllMaps
abstract  List<VElementInfo> getAlarmedElements()
          getAlarmedElements
abstract  Vector<VElementInfo> getAllElementInfo()
          getAllElementInfo
abstract  DbElement[] getAllElements()
          getAllElements
abstract  VMapInfo[] getAllMapMenus()
          getAllMapMenus
abstract  DbMap[] getAllMaps()
          getAllMaps
abstract  Map<Integer,Double> getAvails(DbElement[] mapElements)
          getAvails
abstract  DbMap[] getContainerMaps(int id, String type)
          getContainerMaps
abstract  Vector<Integer> getDeletedNodes()
          getDeletedNodes
abstract  DbElement getElement(int id, int mapId, String type)
          getElement
abstract  DbElement[] getElementsLike(String elementLabel)
          getElementsLike
abstract  DbElement[] getElementsOfMap(int mapid)
          getElementsOfMap
abstract  Set<LinkInfo> getLinksOnElements(Set<Integer> allnodes)
          getLinksOnElements
abstract  DbMap getMap(int id)
          getMap
abstract  DbElement[] getMapElementsOfMap(int mapid)
          getMapElementsOfMap
abstract  VMapInfo getMapMenu(int mapId)
          getMapMenu
abstract  DbMap[] getMaps(String mapname, String maptype)
          getMaps
abstract  DbMap[] getMapsByName(String mapLabel)
          getMapsByName
abstract  DbMap[] getMapsLike(String mapLabel)
          getMapsLike
abstract  VMapInfo[] getMapsMenuByGroup(String group)
          getMapsMenuByGroup
abstract  VMapInfo[] getMapsMenuByName(String mapLabel)
          getMapsMenuByName
abstract  VMapInfo[] getMapsMenuByOther()
          getMapsMenuByOther
abstract  VMapInfo[] getMapsMenuByOwner(String owner)
          getMapsMenuByOwner
abstract  Map<Integer,Set<Integer>> getMapsStructure()
          get a java.util.Map (key=parentMapId, value=set of child maps)
abstract  DbElement[] getNodeElementsOfMap(int mapid)
          getNodeElementsOfMap
abstract  Set<Integer> getNodeIdsBySource(String query)
          getNodeIdsBySource
abstract  Set<Integer> getNodeidsOnElement(DbElement elem)
          getNodeidsOnElement
abstract  boolean isElementDeleted(int elementId, String type)
          isElementDeleted
abstract  boolean isElementInMap(int elementId, int mapId, String type)
          isElementInMap
abstract  DbElement newElement(int id, int mapId, String type)
          newElement
abstract  int saveMap(DbMap m, Collection<DbElement> e)
          saveMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialized

protected boolean initialized
Constructor Detail

Manager

public Manager()

Constructor for Manager.

Method Detail

saveMap

public abstract int saveMap(DbMap m,
                            Collection<DbElement> e)
                     throws MapsException

saveMap

Parameters:
m - a DbMap object.
e - a Collection object.
Returns:
a int.
Throws:
MapsException - if any.

deleteMap

public abstract int deleteMap(int id)
                       throws MapsException
delete the map with id in input

Parameters:
id - a int.
Returns:
number of maps deleted
Throws:
MapsException - if any.

deleteNodeTypeElementsFromAllMaps

public abstract void deleteNodeTypeElementsFromAllMaps()
                                                throws MapsException

deleteNodeTypeElementsFromAllMaps

Throws:
MapsException - if any.

deleteMapTypeElementsFromAllMaps

public abstract void deleteMapTypeElementsFromAllMaps()
                                               throws MapsException

deleteMapTypeElementsFromAllMaps

Throws:
MapsException - if any.

getElement

public abstract DbElement getElement(int id,
                                     int mapId,
                                     String type)
                              throws MapsException

getElement

Parameters:
id - a int.
mapId - a int.
type - a String object.
Returns:
a DbElement object.
Throws:
MapsException - if any.

newElement

public abstract DbElement newElement(int id,
                                     int mapId,
                                     String type)
                              throws MapsException

newElement

Parameters:
id - a int.
mapId - a int.
type - a String object.
Returns:
a DbElement object.
Throws:
MapsException - if any.

getAllElements

public abstract DbElement[] getAllElements()
                                    throws MapsException

getAllElements

Returns:
an array of DbElement objects.
Throws:
MapsException - if any.

getElementsOfMap

public abstract DbElement[] getElementsOfMap(int mapid)
                                      throws MapsException

getElementsOfMap

Parameters:
mapid - a int.
Returns:
an array of DbElement objects.
Throws:
MapsException - if any.

getNodeElementsOfMap

public abstract DbElement[] getNodeElementsOfMap(int mapid)
                                          throws MapsException

getNodeElementsOfMap

Parameters:
mapid - a int.
Returns:
an array of DbElement objects.
Throws:
MapsException - if any.

getMapElementsOfMap

public abstract DbElement[] getMapElementsOfMap(int mapid)
                                         throws MapsException

getMapElementsOfMap

Parameters:
mapid - a int.
Returns:
an array of DbElement objects.
Throws:
MapsException - if any.

getElementsLike

public abstract DbElement[] getElementsLike(String elementLabel)
                                     throws MapsException

getElementsLike

Parameters:
elementLabel - a String object.
Returns:
an array of DbElement objects.
Throws:
MapsException - if any.

getMapsStructure

public abstract Map<Integer,Set<Integer>> getMapsStructure()
                                                    throws MapsException
get a java.util.Map (key=parentMapId, value=set of child maps)

Returns:
java.util.Map (key=parentMapId, value=set of child maps)
Throws:
MapsException - if any.

countMaps

public abstract int countMaps(int mapId)
                       throws MapsException

countMaps

Parameters:
mapId - a int.
Returns:
a int.
Throws:
MapsException - if any.

getMap

public abstract DbMap getMap(int id)
                      throws MapsException

getMap

Parameters:
id - a int.
Returns:
a DbMap object.
Throws:
MapsException - if any.

getMaps

public abstract DbMap[] getMaps(String mapname,
                                String maptype)
                         throws MapsException

getMaps

Parameters:
mapname - a String object.
maptype - a String object.
Returns:
an array of DbMap objects.
Throws:
MapsException - if any.

getAllMaps

public abstract DbMap[] getAllMaps()
                            throws MapsException

getAllMaps

Returns:
an array of DbMap objects.
Throws:
MapsException - if any.

getMapsLike

public abstract DbMap[] getMapsLike(String mapLabel)
                             throws MapsException

getMapsLike

Parameters:
mapLabel - a String object.
Returns:
an array of DbMap objects.
Throws:
MapsException - if any.

getMapsByName

public abstract DbMap[] getMapsByName(String mapLabel)
                               throws MapsException

getMapsByName

Parameters:
mapLabel - a String object.
Returns:
an array of DbMap objects.
Throws:
MapsException - if any.

getContainerMaps

public abstract DbMap[] getContainerMaps(int id,
                                         String type)
                                  throws MapsException

getContainerMaps

Parameters:
id - a int.
type - a String object.
Returns:
an array of DbMap objects.
Throws:
MapsException - if any.

getAllMapMenus

public abstract VMapInfo[] getAllMapMenus()
                                   throws MapsException

getAllMapMenus

Returns:
an array of VMapInfo objects.
Throws:
MapsException - if any.

getMapMenu

public abstract VMapInfo getMapMenu(int mapId)
                             throws MapsException

getMapMenu

Parameters:
mapId - a int.
Returns:
a VMapInfo object.
Throws:
MapsException - if any.

getMapsMenuByName

public abstract VMapInfo[] getMapsMenuByName(String mapLabel)
                                      throws MapsException

getMapsMenuByName

Parameters:
mapLabel - a String object.
Returns:
an array of VMapInfo objects.
Throws:
MapsException - if any.

getMapsMenuByOwner

public abstract VMapInfo[] getMapsMenuByOwner(String owner)
                                       throws MapsException

getMapsMenuByOwner

Parameters:
owner - a String object.
Returns:
an array of VMapInfo objects.
Throws:
MapsException - if any.

getMapsMenuByGroup

public abstract VMapInfo[] getMapsMenuByGroup(String group)
                                       throws MapsException

getMapsMenuByGroup

Parameters:
group - a String object.
Returns:
an array of VMapInfo objects.
Throws:
MapsException - if any.

getMapsMenuByOther

public abstract VMapInfo[] getMapsMenuByOther()
                                       throws MapsException

getMapsMenuByOther

Returns:
an array of VMapInfo objects.
Throws:
MapsException - if any.

isElementInMap

public abstract boolean isElementInMap(int elementId,
                                       int mapId,
                                       String type)
                                throws MapsException

isElementInMap

Parameters:
elementId - a int.
mapId - a int.
type - a String object.
Returns:
a boolean.
Throws:
MapsException - if any.

isElementDeleted

public abstract boolean isElementDeleted(int elementId,
                                         String type)
                                  throws MapsException

isElementDeleted

Parameters:
elementId - a int.
type - a String object.
Returns:
a boolean.
Throws:
MapsException - if any.

getAllElementInfo

public abstract Vector<VElementInfo> getAllElementInfo()
                                                throws MapsException

getAllElementInfo

Returns:
a Vector object.
Throws:
MapsException - if any.

getAlarmedElements

public abstract List<VElementInfo> getAlarmedElements()
                                               throws MapsException

getAlarmedElements

Returns:
a List object.
Throws:
MapsException - if any.

getDeletedNodes

public abstract Vector<Integer> getDeletedNodes()
                                         throws MapsException

getDeletedNodes

Returns:
a Vector object.
Throws:
MapsException - if any.

getAvails

public abstract Map<Integer,Double> getAvails(DbElement[] mapElements)
                                       throws MapsException

getAvails

Parameters:
mapElements - an array of DbElement objects.
Returns:
a Map object.
Throws:
MapsException - if any.

getNodeidsOnElement

public abstract Set<Integer> getNodeidsOnElement(DbElement elem)
                                          throws MapsException

getNodeidsOnElement

Parameters:
elem - a DbElement object.
Returns:
a Set object.
Throws:
MapsException - if any.

getNodeIdsBySource

public abstract Set<Integer> getNodeIdsBySource(String query)
                                         throws MapsException

getNodeIdsBySource

Parameters:
query - a String object.
Returns:
a Set object.
Throws:
MapsException - if any.

getLinksOnElements

public abstract Set<LinkInfo> getLinksOnElements(Set<Integer> allnodes)
                                          throws MapsException

getLinksOnElements

Parameters:
allnodes - a Set object.
Returns:
a Set object.
Throws:
MapsException - if any.


Copyright © 2011. All Rights Reserved.