|
|||||||||
| 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 static java.util.Map<java.lang.String,Avail> |
availsMap
|
protected static java.util.Map<java.lang.String,java.lang.String> |
bgImagesMap
|
protected static java.lang.String |
defaultFactory
|
protected static int |
defaultLink
|
protected static java.util.Map<java.lang.String,MapsFactory> |
factoriesMap
|
protected static java.lang.String |
home
|
protected static java.util.Map<java.lang.String,java.lang.String> |
iconsMap
|
protected static java.lang.String |
info
Descriptive information about this factory. |
protected static java.util.Map<java.lang.Integer,java.util.Set<Link>> |
linksBySnmpTypeMap
|
protected static java.util.Map<java.lang.Integer,Link> |
linksMap
|
protected static java.util.Map<java.lang.String,LinkStatus> |
linkStatusesMap
|
protected static org.apache.log4j.Category |
log
The Log4J category for logging web authentication messages. |
protected static java.io.File |
mapPropertiesFile
The map.properties file that is read for the list of severities and statuses settings for map view. |
static java.lang.String |
MULTILINK_BEST_STATUS
|
static java.lang.String |
MULTILINK_WORST_STATUS
|
protected static java.lang.String |
multilinkStatus
|
protected static java.lang.String |
name
Descriptive information about this factory. |
protected static java.util.Map |
nodesPerSource
|
protected static Avail[] |
orderedAvails
|
protected static Severity[] |
orderedSeverities
|
protected static Status[] |
orderedStatuses
|
protected static java.util.Map[] |
propertiesMaps
|
protected static java.util.Map<java.lang.String,Severity> |
severitiesMap
|
protected static java.lang.String |
severityMapAs
|
protected static java.util.Map<java.lang.String,DataSource> |
sourcesMap
|
protected static java.util.Map<java.lang.String,Status> |
statusesMap
|
| Method Summary | |
|---|---|
boolean |
enableAvail()
|
Avail |
getAvail(double avail)
|
java.util.Map |
getAvailabilitiesMap()
Gets the java.util.Map with key = availability label and value the Avail corresponding to the label |
java.util.Map |
getBackgroundImagesMap()
|
DataSource |
getDataSource(java.lang.String dataSourceLabel)
|
java.lang.Class |
getDataSourceClass(int nodeid)
return the Class of the first dataSource (of map.properties file) matching with the nodeid in input |
MapsFactory |
getDefaultFactory()
gets the default MapsFactory |
Link |
getDefaultLink()
|
java.lang.String |
getDefaultMapIcon()
|
java.lang.String |
getDefaultNodeIcon()
|
Severity |
getDefaultSeverity()
Gets the 'normal' severity in map.properties. |
Status |
getDefaultStatus()
Gets the 'nodeup' status in map.properties. |
Avail |
getDisabledAvail()
|
java.util.Map |
getFactoriesMap()
|
java.util.Map |
getIconsMap()
|
Severity |
getIndeterminateSeverity()
Gets the 'indeterminate' severity in map.properties. |
java.lang.String |
getInfo()
|
static MapPropertiesFactory |
getInstance()
Return the singleton instance of this factory. |
Link |
getLink(int id)
|
java.util.Set<Link> |
getLinkBySnmpType(int linkTypologyId)
gets the config Link by snmpType defined in the map properties config file |
java.util.Map |
getLinksMap()
|
LinkStatus |
getLinkStatus(java.lang.String linkStatusLabel)
gets the config LinkStatus by label defined in the map properties config file |
java.util.Map |
getLinkStatusesMap()
|
int |
getLinkTypeId(int snmpiftype,
long snmpifspeed)
gets the id corresponding to the link defined in configuration file. |
java.util.Map[] |
getMapProperties()
gets an Array of java.util.Map: -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 |
MapsFactory |
getMapsFactory(java.lang.String factoryLabel)
gets the MapsFactory by the factoryLabel in input |
static java.lang.String |
getMultilinkStatus()
|
java.util.Set |
getNodeIdsBySource(java.lang.String sourceLabel)
|
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. |
static java.lang.String |
getProperty(java.lang.String key)
|
java.util.Map |
getSeveritiesMap()
Gets the java.util.Map with key = severity label and value the Severity corresponding to the label |
int |
getSeverity(java.lang.String severityLabel)
|
java.lang.String |
getSeverityMapAs()
|
java.util.Map |
getSourcesMap()
|
int |
getStatus(java.lang.String uei)
|
java.util.Map |
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 |
getUnknownUeiStatus()
Gets the 'undefined' status in map.properties. |
static void |
init()
|
protected static java.util.Map[] |
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 |
static void |
reload(boolean reloadPropertiesFile)
Every time called, reload the properties file and the nodes per data source defined in the properties file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String info
protected static final java.lang.String name
protected static java.io.File mapPropertiesFile
protected static java.lang.String home
protected static org.apache.log4j.Category log
protected static java.util.Map[] propertiesMaps
protected static java.util.Map<java.lang.String,Status> statusesMap
protected static Status[] orderedStatuses
protected static java.util.Map<java.lang.String,Severity> severitiesMap
protected static Severity[] orderedSeverities
protected static java.util.Map<java.lang.String,Avail> availsMap
protected static Avail[] orderedAvails
protected static java.util.Map<java.lang.String,java.lang.String> iconsMap
protected static java.util.Map<java.lang.String,java.lang.String> bgImagesMap
protected static java.util.Map<java.lang.String,DataSource> sourcesMap
protected static java.util.Map nodesPerSource
protected static java.util.Map<java.lang.String,MapsFactory> factoriesMap
protected static java.util.Map<java.lang.Integer,Link> linksMap
protected static java.util.Map<java.lang.Integer,java.util.Set<Link>> linksBySnmpTypeMap
protected static java.util.Map<java.lang.String,LinkStatus> linkStatusesMap
protected static java.lang.String defaultFactory
protected static java.lang.String severityMapAs
public static final java.lang.String MULTILINK_BEST_STATUS
public static final java.lang.String MULTILINK_WORST_STATUS
protected static java.lang.String multilinkStatus
protected static int defaultLink
| Method Detail |
|---|
public static void init()
throws java.io.FileNotFoundException,
java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public static void reload(boolean reloadPropertiesFile)
throws java.io.FileNotFoundException,
java.io.IOException
java.io.FileNotFoundException
java.io.IOExceptionpublic static MapPropertiesFactory getInstance()
java.lang.IllegalStateException - Thrown if the factory has not yet been initialized.
public java.util.Map[] getMapProperties()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public java.util.Map getSeveritiesMap()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public java.util.Map getAvailabilitiesMap()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundExceptionpublic Avail getAvail(double avail)
public Avail getDisabledAvail()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public boolean enableAvail()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public Status getDefaultStatus()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public Status getUnknownUeiStatus()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public Severity getDefaultSeverity()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public Severity getIndeterminateSeverity()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public Avail getUndefinedAvail()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public java.util.Map getStatusesMap()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundExceptionpublic java.lang.String getInfo()
public java.lang.String getSeverityMapAs()
public static java.lang.String getProperty(java.lang.String key)
throws java.io.FileNotFoundException,
java.io.IOException
java.io.FileNotFoundException
java.io.IOException
protected static java.util.Map[] parseMapProperties()
throws java.io.FileNotFoundException,
java.io.IOException
java.io.FileNotFoundException
java.io.IOExceptionpublic java.util.Map getSourcesMap()
public java.util.Map getFactoriesMap()
public java.util.Map getIconsMap()
public java.util.Map getBackgroundImagesMap()
public java.lang.String getDefaultMapIcon()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public java.lang.String getDefaultNodeIcon()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundExceptionpublic Severity[] getOrderedSeverities()
public Avail[] getOrderedAvails()
public Status[] getOrderedStatuses()
public java.lang.Class getDataSourceClass(int nodeid)
nodeid -
public DataSource getDataSource(java.lang.String dataSourceLabel)
public java.util.Set getNodeIdsBySource(java.lang.String sourceLabel)
throws MapsException
MapsExceptionpublic MapsFactory getMapsFactory(java.lang.String factoryLabel)
factoryLabel -
public MapsFactory getDefaultFactory()
public int getSeverity(java.lang.String severityLabel)
public int getStatus(java.lang.String uei)
public java.util.Set<Link> getLinkBySnmpType(int linkTypologyId)
linkTypologyId -
public int getLinkTypeId(int snmpiftype,
long snmpifspeed)
snmpiftype - snmpifspeed -
public Link getLink(int id)
public LinkStatus getLinkStatus(java.lang.String linkStatusLabel)
linkStatusLabel -
public Link getDefaultLink()
public java.util.Map getLinksMap()
public java.util.Map getLinkStatusesMap()
public static java.lang.String getMultilinkStatus()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||