|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.web.map.config.MapPropertiesFactory
public class MapPropertiesFactory
| Field Summary | |
|---|---|
protected boolean |
availEnabled
|
protected Map<String,Avail> |
availsMap
|
protected Map<String,String> |
bgImagesMap
|
protected ContextMenu |
cmenu
|
protected boolean |
contextMenuEnabled
|
protected int |
defaultLink
|
protected int |
defaultMapElementDimension
|
protected String |
defaultMapIcon
|
protected String |
defaultNodeIcon
|
protected Severity |
defaultSeverity
|
protected Status |
defaultStatus
|
protected Avail |
disabledAvail
|
protected boolean |
doubleClickEnabled
|
protected Map<String,String> |
iconsMap
|
protected Severity |
indeterminateSeverity
|
protected static String |
info
Descriptive information about this factory. |
protected Map<Integer,Set<Link>> |
linksBySnmpTypeMap
|
protected Map<Integer,Link> |
linksMap
|
protected Map<String,LinkStatus> |
linkStatusesMap
|
protected Category |
log
The Log4J category for logging web authentication messages. |
protected File |
mapPropertiesFile
The map.properties file that is read for the list of severities and statuses settings for map view. |
protected String |
mapPropertiesFileString
|
static String |
MULTILINK_BEST_STATUS
|
static String |
MULTILINK_WORST_STATUS
|
protected String |
multilinkStatus
|
protected static String |
name
Descriptive information about this factory. |
protected Avail[] |
orderedAvails
|
protected Severity[] |
orderedSeverities
|
protected Status[] |
orderedStatuses
|
protected boolean |
reload
|
protected Map<String,Severity> |
severitiesMap
|
protected String |
severityMapAs
|
protected Map<String,Status> |
statusesMap
|
protected Avail |
undefinedAvail
|
protected Status |
unknownStatus
|
| Constructor Summary | |
|---|---|
MapPropertiesFactory()
Create a new instance. |
|
MapPropertiesFactory(String mapPropertiesFileString)
|
|
| Method Summary | |
|---|---|
Avail |
getAvail(double avail)
|
Map<String,Avail> |
getAvailabilitiesMap()
Gets the java.util.Map with key = availability label and value the Avail corresponding to the label |
List<Avail> |
getAvails()
|
Map<String,String> |
getBackgroundImages()
|
Map<String,String> |
getBackgroundImagesMap()
|
ContextMenu |
getContextMenu()
|
String |
getDefaultBackgroundColor()
|
Link |
getDefaultLink()
|
int |
getDefaultMapElementDimension()
|
String |
getDefaultMapIcon()
|
String |
getDefaultNodeIcon()
|
String |
getDefaultSemaphoreColorBy()
|
Severity |
getDefaultSeverity()
Gets the default severity in map.properties. |
Status |
getDefaultStatus()
Gets the default status in map.properties. |
int |
getDefaultStatusId()
|
Avail |
getDisabledAvail()
|
Map<String,String> |
getIcons()
|
Map<String,String> |
getIconsMap()
|
Severity |
getIndeterminateSeverity()
Gets the indeterminate severity in map.properties. |
String |
getInfo()
|
Link |
getLink(int id)
|
Set<Link> |
getLinkBySnmpType(int linkTypologyId)
gets the config Link by snmpType defined in the map properties config file |
List<Link> |
getLinks()
|
Map<Integer,Link> |
getLinksMap()
|
LinkStatus |
getLinkStatus(String linkStatusLabel)
gets the config LinkStatus by label defined in the map properties config file |
List<LinkStatus> |
getLinkStatuses()
|
Map<String,LinkStatus> |
getLinkStatusesMap()
|
int |
getLinkTypeId(int snmpiftype,
long snmpifspeed)
gets the id corresponding to the link defined in configuration file. |
Map<String,String> |
getMapElementDimensions()
|
String |
getMapPropertiesFileString()
|
String |
getMultilinkStatus()
|
Avail[] |
getOrderedAvails()
Gets the array of ordered Avail by min. |
Severity[] |
getOrderedSeverities()
Gets the array of ordered Severity by id. |
Status[] |
getOrderedStatuses()
Gets the array of ordered Status by id. |
String |
getProperty(String key)
|
List<Severity> |
getSeverities()
|
Map<String,Severity> |
getSeveritiesMap()
Gets the java.util.Map with key = severity label and value the Severity corresponding to the label |
int |
getSeverity(String severityLabel)
|
String |
getSeverityMapAs()
|
int |
getStatus(String uei)
|
List<Status> |
getStatuses()
|
Map<String,Status> |
getStatusesMap()
Gets the java.util.Map with key = uei and value the status corresponding to the uei |
Avail |
getUndefinedAvail()
Gets the undefined Avilability in map.properties. |
Status |
getUnknownStatus()
Gets the unknown status in map.properties. |
void |
init()
|
boolean |
isAvailEnabled()
|
boolean |
isContextMenuEnabled()
|
boolean |
isDoubleClickEnabled()
|
boolean |
isReload()
|
protected void |
parseMapProperties()
Parses the map.properties file into some mappings: -severitiesMap: severity label (String) to Severity -statusesMap: status (String) uei to Status -availsMap: min (String) of avail to Avail -iconsMap: icon (String) label to String (icon filename) -bgImagesMap: background (String) image label to String (background image filename) -sourcesMap: source label (String) to DataSource -factoriesMap: factory label (String) to MapsFactory |
void |
reload(boolean reloadPropertiesFile)
Every time called, reload the properties file and the nodes per data source defined in the properties file. |
void |
setContextMenu(ContextMenu cmenu)
|
void |
setMapPropertiesFileString(String mapPropertiesFileString)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String info
protected static final String name
protected File mapPropertiesFile
protected String mapPropertiesFileString
protected Category log
protected Map<String,Status> statusesMap
protected Status[] orderedStatuses
protected Map<String,Severity> severitiesMap
protected Severity[] orderedSeverities
protected Map<String,Avail> availsMap
protected Avail[] orderedAvails
protected Map<String,String> iconsMap
protected Map<String,String> bgImagesMap
protected Map<Integer,Link> linksMap
protected Map<Integer,Set<Link>> linksBySnmpTypeMap
protected Map<String,LinkStatus> linkStatusesMap
protected String defaultNodeIcon
protected String defaultMapIcon
protected int defaultMapElementDimension
public static final String MULTILINK_BEST_STATUS
public static final String MULTILINK_WORST_STATUS
protected String multilinkStatus
protected int defaultLink
protected Severity defaultSeverity
protected Severity indeterminateSeverity
protected Status unknownStatus
protected Status defaultStatus
protected Avail undefinedAvail
protected Avail disabledAvail
protected boolean availEnabled
protected boolean doubleClickEnabled
protected boolean contextMenuEnabled
protected boolean reload
protected String severityMapAs
protected ContextMenu cmenu
| Constructor Detail |
|---|
public MapPropertiesFactory(String mapPropertiesFileString)
public MapPropertiesFactory()
| Method Detail |
|---|
public String getMapPropertiesFileString()
public void setMapPropertiesFileString(String mapPropertiesFileString)
public String getSeverityMapAs()
public ContextMenu getContextMenu()
public void setContextMenu(ContextMenu cmenu)
public boolean isContextMenuEnabled()
public boolean isDoubleClickEnabled()
public boolean isReload()
public void init()
throws FileNotFoundException,
IOException
FileNotFoundException
IOException
public void reload(boolean reloadPropertiesFile)
throws FileNotFoundException,
IOException
FileNotFoundException
IOExceptionpublic Map<String,Severity> getSeveritiesMap()
IOException
FileNotFoundExceptionpublic Map<String,Avail> getAvailabilitiesMap()
IOException
FileNotFoundExceptionpublic Avail getAvail(double avail)
public Avail getDisabledAvail()
public boolean isAvailEnabled()
public Status getDefaultStatus()
public Status getUnknownStatus()
public Severity getDefaultSeverity()
public Severity getIndeterminateSeverity()
public Avail getUndefinedAvail()
public Map<String,Status> getStatusesMap()
IOException
FileNotFoundExceptionpublic String getInfo()
public String getProperty(String key)
throws FileNotFoundException,
IOException
FileNotFoundException
IOException
protected void parseMapProperties()
throws FileNotFoundException,
IOException
FileNotFoundException
IOExceptionpublic Map<String,String> getIconsMap()
public Map<String,String> getBackgroundImagesMap()
public String getDefaultMapIcon()
public String getDefaultNodeIcon()
public Severity[] getOrderedSeverities()
public Avail[] getOrderedAvails()
public Status[] getOrderedStatuses()
public int getSeverity(String severityLabel)
public int getStatus(String uei)
public Set<Link> getLinkBySnmpType(int linkTypologyId)
linkTypologyId -
public int getLinkTypeId(int snmpiftype,
long snmpifspeed)
snmpiftype - snmpifspeed -
public Link getLink(int id)
public LinkStatus getLinkStatus(String linkStatusLabel)
linkStatusLabel -
public Link getDefaultLink()
public Map<Integer,Link> getLinksMap()
public Map<String,LinkStatus> getLinkStatusesMap()
public String getMultilinkStatus()
public List<Avail> getAvails()
throws MapsException
MapsException
public List<Link> getLinks()
throws MapsException
MapsException
public List<LinkStatus> getLinkStatuses()
throws MapsException
MapsException
public List<Status> getStatuses()
throws MapsException
MapsException
public List<Severity> getSeverities()
throws MapsException
MapsException
public Map<String,String> getIcons()
throws MapsException
MapsException
public Map<String,String> getBackgroundImages()
throws MapsException
MapsExceptionpublic String getDefaultBackgroundColor()
public int getDefaultStatusId()
public String getDefaultSemaphoreColorBy()
public Map<String,String> getMapElementDimensions()
public int getDefaultMapElementDimension()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||