|
||||||||||
| 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
MapPropertiesFactory class.
| 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> |
iconsBySysoidMap
|
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 ThreadCategory |
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
|
protected int |
maxLinks
|
static String |
MULTILINK_BEST_STATUS
Constant MULTILINK_BEST_STATUS="best" |
static String |
MULTILINK_IGNORE_STATUS
Constant MULTILINK_IGNORE_STATUS="ignore" |
static String |
MULTILINK_WORST_STATUS
Constant MULTILINK_WORST_STATUS="worst" |
protected String |
multilinkIgnoreColor
|
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 int |
summaryLink
|
protected String |
summaryLinkColor
|
protected Avail |
undefinedAvail
|
protected Status |
unknownStatus
|
protected boolean |
useSemaphore
|
| Constructor Summary | |
|---|---|
MapPropertiesFactory()
Create a new instance. |
|
MapPropertiesFactory(String mapPropertiesFileString)
Constructor for MapPropertiesFactory. |
|
| Method Summary | |
|---|---|
Avail |
getAvail(double avail)
getAvail |
Map<String,Avail> |
getAvailabilitiesMap()
Gets the java.util.Map with key = availability label and value the Avail corresponding to the label |
List<Avail> |
getAvails()
getAvails |
Map<String,String> |
getBackgroundImages()
getBackgroundImages |
Map<String,String> |
getBackgroundImagesMap()
getBackgroundImagesMap |
ContextMenu |
getContextMenu()
getContextMenu |
String |
getDefaultBackgroundColor()
getDefaultBackgroundColor |
Link |
getDefaultLink()
Getter for the field defaultLink. |
int |
getDefaultMapElementDimension()
Getter for the field defaultMapElementDimension. |
String |
getDefaultMapIcon()
Getter for the field defaultMapIcon. |
String |
getDefaultNodeIcon()
Getter for the field defaultNodeIcon. |
Severity |
getDefaultSeverity()
Gets the default severity in map.properties. |
Status |
getDefaultStatus()
Gets the default status in map.properties. |
int |
getDefaultStatusId()
getDefaultStatusId |
Avail |
getDisabledAvail()
Getter for the field disabledAvail. |
Map<String,String> |
getIcons()
getIcons |
Map<String,String> |
getIconsBySysoid()
getIconsBySysoid |
Map<String,String> |
getIconsBySysoidMap()
Getter for the field iconsBySysoidMap. |
Severity |
getIndeterminateSeverity()
Gets the indeterminate severity in map.properties. |
String |
getInfo()
Getter for the field info. |
Link |
getLink(int id)
getLink |
Set<Link> |
getLinkBySnmpType(int linkTypologyId)
gets the config Link by snmpType defined in the map properties config file |
List<Link> |
getLinks()
getLinks |
Map<Integer,Link> |
getLinksMap()
Getter for the field linksMap. |
LinkStatus |
getLinkStatus(String linkStatusLabel)
gets the config LinkStatus by label defined in the map properties config file |
List<LinkStatus> |
getLinkStatuses()
getLinkStatuses |
Map<String,LinkStatus> |
getLinkStatusesMap()
Getter for the field linkStatusesMap. |
int |
getLinkTypeId(int snmpiftype,
long snmpifspeed)
gets the id corresponding to the link defined in configuration file. |
Map<String,String> |
getMapElementDimensions()
getMapElementDimensions |
String |
getMapPropertiesFileString()
Getter for the field mapPropertiesFileString. |
int |
getMaxLinks()
Getter for the field maxLinks. |
String |
getMultilinkIgnoreColor()
Getter for the field multilinkIgnoreColor. |
String |
getMultilinkStatus()
Getter for the field multilinkStatus. |
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)
getProperty |
List<Severity> |
getSeverities()
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)
getSeverity |
String |
getSeverityMapAs()
Getter for the field severityMapAs. |
int |
getStatus(String uei)
getStatus |
List<Status> |
getStatuses()
getStatuses |
Map<String,Status> |
getStatusesMap()
Gets the java.util.Map with key = uei and value the status corresponding to the uei |
int |
getSummaryLink()
Getter for the field summaryLink. |
String |
getSummaryLinkColor()
Getter for the field summaryLinkColor. |
Avail |
getUndefinedAvail()
Gets the undefined Avilability in map.properties. |
Status |
getUnknownStatus()
Gets the unknown status in map.properties. |
int |
getUnknownStatusId()
getUnknownStatusId |
void |
init()
init |
boolean |
isAvailEnabled()
isAvailEnabled |
boolean |
isContextMenuEnabled()
isContextMenuEnabled |
boolean |
isDoubleClickEnabled()
isDoubleClickEnabled |
boolean |
isReload()
isReload |
boolean |
isUseSemaphore()
isUseSemaphore |
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) -iconsBySysoidMap: sysoid (String) to icon label (String) -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)
setContextMenu |
void |
setMapPropertiesFileString(String mapPropertiesFileString)
Setter for the field 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 ThreadCategory 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> iconsBySysoidMap
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
protected int maxLinks
protected int summaryLink
protected String summaryLinkColor
public static final String MULTILINK_BEST_STATUS
MULTILINK_BEST_STATUS="best"
public static final String MULTILINK_WORST_STATUS
MULTILINK_WORST_STATUS="worst"
public static final String MULTILINK_IGNORE_STATUS
MULTILINK_IGNORE_STATUS="ignore"
protected String multilinkStatus
protected String multilinkIgnoreColor
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 useSemaphore
protected boolean reload
protected String severityMapAs
protected ContextMenu cmenu
| Constructor Detail |
|---|
public MapPropertiesFactory(String mapPropertiesFileString)
Constructor for MapPropertiesFactory.
mapPropertiesFileString - a String object.public MapPropertiesFactory()
| Method Detail |
|---|
public String getMapPropertiesFileString()
Getter for the field mapPropertiesFileString.
String object.public void setMapPropertiesFileString(String mapPropertiesFileString)
Setter for the field mapPropertiesFileString.
mapPropertiesFileString - a String object.public String getSeverityMapAs()
Getter for the field severityMapAs.
String object.public ContextMenu getContextMenu()
getContextMenu
ContextMenu object.public void setContextMenu(ContextMenu cmenu)
setContextMenu
cmenu - a ContextMenu object.public boolean isContextMenuEnabled()
isContextMenuEnabled
public boolean isDoubleClickEnabled()
isDoubleClickEnabled
public boolean isReload()
isReload
public void init()
throws FileNotFoundException,
IOException
init
FileNotFoundException - if any.
IOException - if any.
public void reload(boolean reloadPropertiesFile)
throws FileNotFoundException,
IOException
reloadPropertiesFile - a boolean.
FileNotFoundException - if any.
IOException - if any.public Map<String,Severity> getSeveritiesMap()
Map object.
IOException - if any.
FileNotFoundException - if any.public Map<String,Avail> getAvailabilitiesMap()
Map object.
IOException - if any.
FileNotFoundException - if any.public Avail getAvail(double avail)
getAvail
avail - a double.
Avail object.public Avail getDisabledAvail()
Getter for the field disabledAvail.
Avail object.public boolean isAvailEnabled()
isAvailEnabled
public Status getDefaultStatus()
public Status getUnknownStatus()
public Severity getDefaultSeverity()
public Severity getIndeterminateSeverity()
public Avail getUndefinedAvail()
public Map<String,Status> getStatusesMap()
IOException - if any.
FileNotFoundException - if any.public String getInfo()
Getter for the field info.
String object.
public String getProperty(String key)
throws FileNotFoundException,
IOException
getProperty
key - a String object.
String object.
FileNotFoundException - if any.
IOException - if any.
protected void parseMapProperties()
throws FileNotFoundException,
IOException
FileNotFoundException - if any.
IOException - if any.public String getSummaryLinkColor()
Getter for the field summaryLinkColor.
String object.public Map<String,String> getIconsBySysoidMap()
Getter for the field iconsBySysoidMap.
Map object.public Map<String,String> getBackgroundImagesMap()
getBackgroundImagesMap
Map object.public String getDefaultMapIcon()
Getter for the field defaultMapIcon.
String object.public String getDefaultNodeIcon()
Getter for the field defaultNodeIcon.
String object.public Severity[] getOrderedSeverities()
Severity objects.public Avail[] getOrderedAvails()
Avail objects.public Status[] getOrderedStatuses()
Status objects.public int getSeverity(String severityLabel)
getSeverity
severityLabel - a String object.
public int getStatus(String uei)
getStatus
uei - a String object.
public Set<Link> getLinkBySnmpType(int linkTypologyId)
linkTypologyId - a int.
Set object.
public int getLinkTypeId(int snmpiftype,
long snmpifspeed)
snmpiftype - a int.snmpifspeed - a long.
public Link getLink(int id)
getLink
id - a int.
Link object.public LinkStatus getLinkStatus(String linkStatusLabel)
linkStatusLabel - a String object.
LinkStatus object.public Link getDefaultLink()
Getter for the field defaultLink.
Link object.public Map<Integer,Link> getLinksMap()
Getter for the field linksMap.
Map object.public Map<String,LinkStatus> getLinkStatusesMap()
Getter for the field linkStatusesMap.
Map object.public String getMultilinkStatus()
Getter for the field multilinkStatus.
String object.
public List<Avail> getAvails()
throws MapsException
getAvails
List object.
MapsException - if any.
public List<Link> getLinks()
throws MapsException
getLinks
List object.
MapsException - if any.
public List<LinkStatus> getLinkStatuses()
throws MapsException
getLinkStatuses
List object.
MapsException - if any.
public List<Status> getStatuses()
throws MapsException
getStatuses
List object.
MapsException - if any.
public List<Severity> getSeverities()
throws MapsException
getSeverities
List object.
MapsException - if any.
public Map<String,String> getIcons()
throws MapsException
getIcons
MapsException - if any.
public Map<String,String> getIconsBySysoid()
throws MapsException
getIconsBySysoid
MapsException - if any.
public Map<String,String> getBackgroundImages()
throws MapsException
getBackgroundImages
MapsException - if any.public String getDefaultBackgroundColor()
getDefaultBackgroundColor
String object.public int getDefaultStatusId()
getDefaultStatusId
public int getUnknownStatusId()
getUnknownStatusId
public Map<String,String> getMapElementDimensions()
getMapElementDimensions
public int getDefaultMapElementDimension()
Getter for the field defaultMapElementDimension.
public int getMaxLinks()
Getter for the field maxLinks.
public int getSummaryLink()
Getter for the field summaryLink.
public String getMultilinkIgnoreColor()
Getter for the field multilinkIgnoreColor.
String object.public boolean isUseSemaphore()
isUseSemaphore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||