|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.web.map.db.ManagerDefaultImpl
public class ManagerDefaultImpl
| Constructor Summary | |
|---|---|
ManagerDefaultImpl()
Manage Maps using default implementation of Factory and Manager |
|
| Method Summary | |
|---|---|
void |
clearMap()
|
void |
closeMap()
Close a VMap previusly opened. |
void |
deleteAllMapElements()
delete all defined sub maps in existent maps |
void |
deleteAllNodeElements()
delete all defined node elements in existent maps |
void |
deleteElementsOfMap(int mapId)
|
void |
deleteMap()
|
void |
deleteMap(int mapId)
delete the map with identifier id |
void |
deleteMap(VMap map)
delete the map in input |
void |
deleteMaps(int[] maps)
delete the maps with the identifiers in input |
void |
deleteMaps(VMap[] maps)
delete the maps in input |
boolean |
foundLoopOnMaps(VMap parentMap,
int mapId)
|
VElementInfo[] |
getAllElementInfo()
|
VMapInfo[] |
getAllMapMenus()
Get all defined maps. |
VMap[] |
getAllMaps(boolean refreshElems)
Get all defined maps. |
HashMap<Integer,Integer> |
getAllNodesOccursOnMap(VMap map)
Gets all nodes on the passed map (and its submaps) with theirs occurrences |
List<String> |
getCategories()
|
Manager |
getDataAccessManager()
|
DataSourceInterface |
getDataSource()
|
Manager |
getDbManager()
|
VElementInfo[] |
getElementInfoLike(String like)
|
String |
getFilter()
|
GroupDao |
getGroupDao()
|
List<VLink> |
getLinks(Collection<VElement> elems)
|
List<VLink> |
getLinks(VElement[] elems)
|
List<VLink> |
getLinksOnElem(VElement[] elems,
VElement elem)
|
VMap[] |
getMap(String mapname,
String maptype,
boolean refreshElems)
Take the map label and type in input and return it in VMap form. |
VMapInfo |
getMapMenu(int mapId)
|
VMap[] |
getMapsByName(String mapName,
boolean refreshElems)
Take the maps with name in input and return them in VMap[] form. |
VMap[] |
getMapsLike(String likeLabel,
boolean refreshElems)
Take the maps with label like the pattern in input and return them in VMap[] form. |
VMapInfo[] |
getMapsMenuByName(String mapName)
Take the maps with name in input and return them in MapMenu[] form. |
List<VMapInfo> |
getMapsMenuTreeByName(String mapName)
Take all the maps in the tree of maps considering the with name in input as the root of the tree. |
MapPropertiesFactory |
getMapsPropertiesFactory()
|
Set<Integer> |
getNodeidsOnElement(VElement velem)
recursively gets all nodes contained by elem and its submaps (if elem is a map) |
List<VMapInfo> |
getVisibleMapsMenu(String user)
gets all visible maps for user and userRole in input |
VElement |
newElement(int mapId,
int elementId,
String type)
Create a new element child of the map with mapId (this map must be the sessionMap) |
VElement |
newElement(int mapId,
int elementId,
String type,
int x,
int y)
Create a new VElement with the identifier setted to id. |
VElement |
newElement(int mapId,
int elementId,
String type,
String iconname)
Create a new (not child) empty Submap with the identifier setted to id. |
VElement |
newElement(int mapId,
int elementId,
String type,
String iconname,
int x,
int y)
Create a new element child of the map with mapId (this map must be the sessionMap). |
VElement |
newElement(int elementId,
String type)
Create a new element child of the map with mapId (this map must be the sessionMap) |
VElement |
newElement(int elementId,
String type,
int x,
int y)
|
VElement |
newElement(int elementId,
String type,
String iconname,
int x,
int y)
|
VMap |
newMap()
Create a new empty VMap and return it. |
VMap |
newMap(String name,
String accessMode,
String owner,
String userModifies,
int width,
int height)
Create a new VMap and return it |
VMap |
openMap()
|
VMap |
openMap(int id,
boolean refreshElems)
Take the map with id in input and return it in VMap form. |
VMap |
openMap(int id,
String user,
boolean refreshElems)
Take the map with id in input and return it in VMap form. |
VElement |
refreshElement(VElement mapElement)
|
List<VElement> |
refreshElements(VElement[] mapElements)
Refreshes of avail,severity and status of the elements in input. |
List<VLink> |
refreshLinks(VLink[] mapLinks)
TODO write this method simil way to refreshElement Not Yet Implemented |
List<VElement> |
refreshMap()
|
VMap |
reloadMap(VMap map)
Reloads elements of map and theirs avail,severity and status |
void |
save(VMap map)
save the map in input |
void |
save(VMap[] maps)
save the maps in input |
void |
setDataSource(DataSourceInterface dataSource)
|
void |
setDbManager(Manager dbManager)
|
void |
setFilter(String filter)
|
void |
setGroupDao(GroupDao groupDao)
|
void |
setMapsPropertiesFactory(MapPropertiesFactory mapsPropertiesFactory)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ManagerDefaultImpl()
throws MapsException
MapsException| Method Detail |
|---|
public String getFilter()
public void setFilter(String filter)
public DataSourceInterface getDataSource()
public void setDataSource(DataSourceInterface dataSource)
public Manager getDbManager()
public void setDbManager(Manager dbManager)
public MapPropertiesFactory getMapsPropertiesFactory()
public void setMapsPropertiesFactory(MapPropertiesFactory mapsPropertiesFactory)
public List<String> getCategories()
throws MapsException
getCategories in interface ManagerMapsException
public List<VLink> getLinks(Collection<VElement> elems)
throws MapsException
getLinks in interface ManagerMapsException
public VMap openMap()
throws MapNotFoundException
openMap in interface ManagerMapNotFoundException
public void clearMap()
throws MapNotFoundException,
MapsException
clearMap in interface ManagerMapNotFoundException
MapsException
public void deleteMap()
throws MapNotFoundException,
MapsException
deleteMap in interface ManagerMapNotFoundException
MapsExceptionpublic void closeMap()
Manager
closeMap in interface Manager
public VMap openMap(int id,
String user,
boolean refreshElems)
throws MapsManagementException,
MapNotFoundException,
MapsException
Manager
openMap in interface ManagerrefreshElems - says if refresh the map's elements
MapsException
MapsManagementException
MapNotFoundExceptionpublic VMap newMap()
newMap in interface Manager
public VMap newMap(String name,
String accessMode,
String owner,
String userModifies,
int width,
int height)
newMap in interface Managername - accessMode - owner - userModifies - width - height -
public VMap openMap(int id,
boolean refreshElems)
throws MapsManagementException,
MapNotFoundException,
MapsException
openMap in interface Managerid - refreshElems - says if refresh the map's elements
MapsException
MapsManagementException
MapNotFoundException
public void deleteElementsOfMap(int mapId)
throws MapsException
deleteElementsOfMap in interface ManagerMapsException
public VMap[] getMap(String mapname,
String maptype,
boolean refreshElems)
throws MapsManagementException,
MapNotFoundException,
MapsException
getMap in interface Managermapname - maptype - refreshElems - says if refresh map's elements
MapsException
MapsManagementException
MapNotFoundException
public VMapInfo getMapMenu(int mapId)
throws MapNotFoundException,
MapsException
getMapMenu in interface ManagerMapNotFoundException
MapsException
public List<VLink> getLinks(VElement[] elems)
throws MapsException
getLinks in interface ManagerMapsException
public List<VLink> getLinksOnElem(VElement[] elems,
VElement elem)
throws MapsException
getLinksOnElem in interface ManagerMapsException
public VMap[] getMapsLike(String likeLabel,
boolean refreshElems)
throws MapsException
getMapsLike in interface Managerlabel - refreshElems - says if refresh map's elements
MapsException
public VMap[] getMapsByName(String mapName,
boolean refreshElems)
throws MapNotFoundException,
MapsException
getMapsByName in interface ManagermapName - refhresElems - says if refresh maps' elements
MapsException
MapNotFoundException
public VMap[] getAllMaps(boolean refreshElems)
throws MapNotFoundException,
MapsException
getAllMaps in interface ManagerrefreshElems - says if refresh maps' elements
MapsException
MapNotFoundException
public VMapInfo[] getAllMapMenus()
throws MapsException
getAllMapMenus in interface ManagerMapsException
public VMapInfo[] getMapsMenuByName(String mapName)
throws MapNotFoundException,
MapsException
getMapsMenuByName in interface ManagermapName -
MapsException
MapNotFoundException
public List<VMapInfo> getVisibleMapsMenu(String user)
throws MapsException
getVisibleMapsMenu in interface Manageruser - userRole -
MapsException
public List<VMapInfo> getMapsMenuTreeByName(String mapName)
throws MapNotFoundException,
MapsException
getMapsMenuTreeByName in interface ManagermapName -
MapsException
MapNotFoundException
public VElement newElement(int mapId,
int elementId,
String type,
int x,
int y)
throws MapsException
newElement in interface ManagermapId - elementId - type - the node typex - y -
MapsException
public VElement newElement(int elementId,
String type,
int x,
int y)
throws MapsException
newElement in interface ManagerMapsException
public VElement newElement(int mapId,
int elementId,
String type)
throws MapsException
newElement in interface ManagermapId - elementId - type - the node type
MapsException
public VElement newElement(int elementId,
String type)
throws MapsException
newElement in interface ManagerMapsException
public VElement newElement(int mapId,
int elementId,
String type,
String iconname,
int x,
int y)
throws MapsException
newElement in interface ManagermapId - elementId - type - the node type
MapsException
public VElement newElement(int elementId,
String type,
String iconname,
int x,
int y)
throws MapsException
newElement in interface ManagerMapsException
public VElement newElement(int mapId,
int elementId,
String type,
String iconname)
throws MapsException
newElement in interface ManagermapId - elementId - type - the node type
MapsException
public void deleteMap(VMap map)
throws MapsException,
MapNotFoundException
deleteMap in interface Managermap - to delete
MapsException - if an error occour deleting map, MapNotFoundException if the
map to delete doesn't exist.
MapNotFoundException
public void deleteMap(int mapId)
throws MapsException
deleteMap in interface Managerid - of the map to delete
MapsException
public void deleteMaps(VMap[] maps)
throws MapsException
deleteMaps in interface Managermaps - to delete
MapsException
public void deleteMaps(int[] maps)
throws MapsException
deleteMaps in interface Manageridentifiers - of the maps to delete
MapsException
public void save(VMap map)
throws MapsException
save in interface Managermap - to save
MapsException
public void save(VMap[] maps)
throws MapsException
save in interface Managermaps - to save
MapsException
public void deleteAllNodeElements()
throws MapsException
deleteAllNodeElements in interface ManagerMapsException
public void deleteAllMapElements()
throws MapsException
deleteAllMapElements in interface ManagerMapsException
public List<VElement> refreshElements(VElement[] mapElements)
throws MapsException
refreshElements in interface ManagermapElements - the elements to refreshincremental - return only changed elements, if the refresh implementation is capable of this operation
MapsException
public VElement refreshElement(VElement mapElement)
throws MapsException
refreshElement in interface ManagerMapsException
public VMap reloadMap(VMap map)
throws MapsException
reloadMap in interface Managermap -
MapsException
public List<VElement> refreshMap()
throws MapsException
refreshMap in interface ManagerMapsException
public List<VLink> refreshLinks(VLink[] mapLinks)
throws MapsException
Manager
refreshLinks in interface ManagerMapsException
public boolean foundLoopOnMaps(VMap parentMap,
int mapId)
throws MapsException
foundLoopOnMaps in interface ManagerMapsException
public Set<Integer> getNodeidsOnElement(VElement velem)
throws MapsException
getNodeidsOnElement in interface ManagerMapsException
public VElementInfo[] getAllElementInfo()
throws MapsException
getAllElementInfo in interface ManagerMapsException
public VElementInfo[] getElementInfoLike(String like)
throws MapsException
getElementInfoLike in interface ManagerMapsExceptionpublic Manager getDataAccessManager()
public HashMap<Integer,Integer> getAllNodesOccursOnMap(VMap map)
throws MapsException
getAllNodesOccursOnMap in interface Managermap -
MapsExceptionpublic GroupDao getGroupDao()
public void setGroupDao(GroupDao groupDao)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||