Class AbstractPollOutagesDao
- java.lang.Object
-
- org.opennms.netmgt.config.dao.outages.impl.AbstractPollOutagesDao
-
- All Implemented Interfaces:
ReadableDao<Outages>
,ReadablePollOutagesDao
- Direct Known Subclasses:
OnmsPollOutagesDao
,OverrideablePollOutagesDaoImpl
,SentinelPollOutagesDao
public abstract class AbstractPollOutagesDao extends java.lang.Object implements ReadablePollOutagesDao
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
JSON_STORE_KEY
-
Constructor Summary
Constructors Constructor Description AbstractPollOutagesDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Calendar
getEndOfOutage(java.lang.String outName)
getEndOfOutagejava.util.Calendar
getEndOfOutage(Outage out)
Return a calendar representing the end time of this outage, assuming it's currently active (i.e.java.util.List<Interface>
getInterfaces(java.lang.String name)
Return the interfaces for specified outage.java.util.List<Node>
getNodeIds(java.lang.String name)
getNodeIdsjava.util.List<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(java.lang.String outName)
Return if current time is part of specified outage.boolean
isCurTimeInOutage(Outage out)
Return if current time is part of specified outage.boolean
isInterfaceInOutage(java.lang.String linterface, java.lang.String outName)
Return if interfaces is part of specified outage.boolean
isInterfaceInOutage(java.lang.String linterface, Outage out)
Return if interfaces is part of specified outage.boolean
isNodeIdInOutage(long lnodeid, java.lang.String outName)
Return if the node represented by the nodeid is part of specified outage.boolean
isNodeIdInOutage(long lnodeid, Outage out)
Return if nodeid is part of specified outageboolean
isTimeInOutage(long time, java.lang.String outName)
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(java.util.Calendar cal, Outage outage)
Return if time is part of specified outage.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.config.dao.common.api.ReadableDao
getReadOnlyConfig, reload
-
-
-
-
Field Detail
-
JSON_STORE_KEY
public static final java.lang.String JSON_STORE_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
isNodeIdInOutage
public boolean isNodeIdInOutage(long lnodeid, java.lang.String outName)
Description copied from interface:ReadablePollOutagesDao
Return if the node represented by the nodeid is part of specified outage.- Specified by:
isNodeIdInOutage
in interfaceReadablePollOutagesDao
- Parameters:
lnodeid
- the nodeid to be checkedoutName
- the outage name- Returns:
- the node is part of the specified outage
-
isInterfaceInOutage
public boolean isInterfaceInOutage(java.lang.String linterface, java.lang.String outName)
Description copied from interface:ReadablePollOutagesDao
Return if interfaces is part of specified outage.- Specified by:
isInterfaceInOutage
in interfaceReadablePollOutagesDao
- Parameters:
linterface
- the interface to be looked upoutName
- the outage name- Returns:
- the interface is part of the specified outage
-
isCurTimeInOutage
public boolean isCurTimeInOutage(java.lang.String outName)
Description copied from interface:ReadablePollOutagesDao
Return if current time is part of specified outage.- Specified by:
isCurTimeInOutage
in interfaceReadablePollOutagesDao
- Parameters:
outName
- the outage name- Returns:
- true if current time is in outage
-
isTimeInOutage
public boolean isTimeInOutage(long time, java.lang.String outName)
Description copied from interface:ReadablePollOutagesDao
Return if time is part of specified outage.- Specified by:
isTimeInOutage
in interfaceReadablePollOutagesDao
- Parameters:
time
- the time in millis to look upoutName
- the outage name- Returns:
- true if time is in outage
-
getOutageType
public java.lang.String getOutageType(java.lang.String name)
Description copied from interface:ReadablePollOutagesDao
Return the type for specified outage.- Specified by:
getOutageType
in interfaceReadablePollOutagesDao
- Parameters:
name
- the outage that is to be looked up- Returns:
- the type for the specified outage, null if not found
-
getOutageTimes
public java.util.List<Time> getOutageTimes(java.lang.String name)
Description copied from interface:ReadablePollOutagesDao
Return the outage times for specified outage.- Specified by:
getOutageTimes
in interfaceReadablePollOutagesDao
- Parameters:
name
- the outage that is to be looked up- Returns:
- the outage times for the specified outage, null if not found
-
getInterfaces
public java.util.List<Interface> getInterfaces(java.lang.String name)
Description copied from interface:ReadablePollOutagesDao
Return the interfaces for specified outage.- Specified by:
getInterfaces
in interfaceReadablePollOutagesDao
- Parameters:
name
- the outage that is to be looked up- Returns:
- the interfaces for the specified outage, null if not found
-
isTimeInOutage
public boolean isTimeInOutage(java.util.Calendar cal, java.lang.String outName)
Description copied from interface:ReadablePollOutagesDao
Return if time is part of specified outage.- Specified by:
isTimeInOutage
in interfaceReadablePollOutagesDao
-
getNodeIds
public java.util.List<Node> getNodeIds(java.lang.String name)
Description copied from interface:ReadablePollOutagesDao
getNodeIds
- Specified by:
getNodeIds
in interfaceReadablePollOutagesDao
- Parameters:
name
- aString
object.- Returns:
- an array of
Node
objects.
-
getEndOfOutage
public java.util.Calendar getEndOfOutage(java.lang.String outName)
Description copied from interface:ReadablePollOutagesDao
getEndOfOutage
- Specified by:
getEndOfOutage
in interfaceReadablePollOutagesDao
- Parameters:
outName
- aString
object.- Returns:
- a
Calendar
object.
-
isInterfaceInOutage
public boolean isInterfaceInOutage(java.lang.String linterface, Outage out)
Description copied from interface:ReadablePollOutagesDao
Return if interfaces is part of specified outage.- Specified by:
isInterfaceInOutage
in interfaceReadablePollOutagesDao
- Parameters:
linterface
- the interface to be looked up- Returns:
- the interface is part of the specified outage
-
isTimeInOutage
public boolean isTimeInOutage(java.util.Calendar cal, Outage outage)
Description copied from interface:ReadablePollOutagesDao
Return if time is part of specified outage.- Specified by:
isTimeInOutage
in interfaceReadablePollOutagesDao
- Parameters:
cal
- the calendar to lookup- Returns:
- true if time is in outage
-
isCurTimeInOutage
public boolean isCurTimeInOutage(Outage out)
Description copied from interface:ReadablePollOutagesDao
Return if current time is part of specified outage.- Specified by:
isCurTimeInOutage
in interfaceReadablePollOutagesDao
- Returns:
- true if current time is in outage
-
getEndOfOutage
public java.util.Calendar getEndOfOutage(Outage out)
Description copied from interface:ReadablePollOutagesDao
Return a calendar representing the end time of this outage, assuming it's currently active (i.e. right now is within one of the time periods) FIXME: This code is almost identical to isTimeInOutage... We need to fix it- Specified by:
getEndOfOutage
in interfaceReadablePollOutagesDao
- Returns:
- a
Calendar
object.
-
isNodeIdInOutage
public boolean isNodeIdInOutage(long lnodeid, Outage out)
Description copied from interface:ReadablePollOutagesDao
Return if nodeid is part of specified outage
- Specified by:
isNodeIdInOutage
in interfaceReadablePollOutagesDao
- Parameters:
lnodeid
- the nodeid to be looked up- Returns:
- the node iis part of the specified outage
-
-