|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.config.PollOutagesConfigManager
Represents a PollOutagesConfigManager
Field Summary | |
static java.lang.String |
FORMAT1
|
static java.lang.String |
FORMAT2
|
private Outages |
m_config
The config class loaded from the config file |
protected static java.util.Map |
m_dayOfWeekMap
The day of the week values to name mapping |
Constructor Summary | |
PollOutagesConfigManager()
|
Method Summary | |
void |
addOutage(Outage newOutage)
|
protected static void |
createDayOfWeekMapping()
Create the day of week mapping |
protected Outages |
getConfig()
|
java.util.Calendar |
getEndOfOutage(Outage out)
Return a calendar representing the end time of this outage, assuming it's currently active (i.e. |
java.util.Calendar |
getEndOfOutage(java.lang.String outName)
|
Interface[] |
getInterfaces(java.lang.String name)
Return the interfaces for specified outage. |
Node[] |
getNodeIds(java.lang.String name)
|
Outage |
getOutage(java.lang.String name)
Return the specified outage. |
Outage[] |
getOutages()
Return the outages configured. |
Time[] |
getOutageTimes(java.lang.String name)
Return the outage times for specified outage. |
java.lang.String |
getOutageType(java.lang.String name)
Return the type for specified outage. |
boolean |
isCurTimeInOutage(Outage out)
Return if current time is part of specified outage. |
boolean |
isCurTimeInOutage(java.lang.String outName)
Return if current time is part of specified outage. |
boolean |
isInterfaceInOutage(java.lang.String linterface,
Outage out)
Return if interfaces is part of specified outage. |
boolean |
isInterfaceInOutage(java.lang.String linterface,
java.lang.String outName)
Return if interfaces is part of specified outage. |
boolean |
isNodeIdInOutage(long lnodeid,
Outage out)
Return if nodeid is part of specified outage |
boolean |
isNodeIdInOutage(long lnodeid,
java.lang.String outName)
Return if nodeid is part of specified outage |
boolean |
isTimeInOutage(java.util.Calendar cal,
Outage out)
Return if time is part of specified outage. |
boolean |
isTimeInOutage(java.util.Calendar cal,
java.lang.String outName)
Return if time is part of specified outage. |
boolean |
isTimeInOutage(long time,
java.lang.String outName)
Return if time is part of specified outage. |
void |
removeOutage(Outage outageToRemove)
|
void |
removeOutage(java.lang.String outageName)
|
void |
replaceOutage(Outage oldOutage,
Outage newOutage)
|
void |
saveCurrent()
Saves the current in-memory configuration to disk and reloads |
protected abstract void |
saveXML(java.lang.String xmlString)
|
protected void |
setConfig(Outages config)
|
private void |
setOutCalTime(java.util.Calendar outCal,
java.lang.String timeStr)
Set the time in outCal from timeStr. |
abstract void |
update()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Outages m_config
protected static java.util.Map m_dayOfWeekMap
public static java.lang.String FORMAT1
public static java.lang.String FORMAT2
Constructor Detail |
public PollOutagesConfigManager()
Method Detail |
protected void setConfig(Outages config)
config
- The config to set.protected Outages getConfig()
protected static void createDayOfWeekMapping()
private void setOutCalTime(java.util.Calendar outCal, java.lang.String timeStr)
outCal
- the calendar in which time is to be settimeStr
- the time stringpublic Outage[] getOutages()
public Outage getOutage(java.lang.String name)
name
- the outage that is to be looked up
public java.lang.String getOutageType(java.lang.String name)
name
- the outage that is to be looked up
public Time[] getOutageTimes(java.lang.String name)
name
- the outage that is to be looked up
public Interface[] getInterfaces(java.lang.String name)
name
- the outage that is to be looked up
public boolean isInterfaceInOutage(java.lang.String linterface, java.lang.String outName)
isInterfaceInOutage
in interface PollOutagesConfig
linterface
- the interface to be looked upoutName
- the outage name
public boolean isInterfaceInOutage(java.lang.String linterface, Outage out)
linterface
- the interface to be looked upout
- the outage
public boolean isTimeInOutage(java.util.Calendar cal, java.lang.String outName)
cal
- the calendar to lookupoutName
- the outage name
public boolean isTimeInOutage(long time, java.lang.String outName)
isTimeInOutage
in interface PollOutagesConfig
time
- the time in millis to look upoutName
- the outage name
public boolean isTimeInOutage(java.util.Calendar cal, Outage out)
cal
- the calendar to lookupout
- the outage
public boolean isCurTimeInOutage(java.lang.String outName)
isCurTimeInOutage
in interface PollOutagesConfig
outName
- the outage name
public boolean isCurTimeInOutage(Outage out)
out
- the outage
public void addOutage(Outage newOutage)
public void removeOutage(java.lang.String outageName)
public void removeOutage(Outage outageToRemove)
public void replaceOutage(Outage oldOutage, Outage newOutage)
public Node[] getNodeIds(java.lang.String name)
public boolean isNodeIdInOutage(long lnodeid, java.lang.String outName)
Return if nodeid is part of specified outage
lnodeid
- the nodeid to be looked upoutName
- the outage name
public java.util.Calendar getEndOfOutage(java.lang.String outName)
public java.util.Calendar getEndOfOutage(Outage out)
public boolean isNodeIdInOutage(long lnodeid, Outage out)
Return if nodeid is part of specified outage
lnodeid
- the nodeid to be looked up
public void saveCurrent() throws org.exolab.castor.xml.MarshalException, java.io.IOException, org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.MarshalException
java.io.IOException
org.exolab.castor.xml.ValidationException
protected abstract void saveXML(java.lang.String xmlString) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
public abstract void update() throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
update
in interface PollOutagesConfig
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |