Package org.opennms.netmgt.dao.jaxb
Class DefaultAckdConfigurationDao
- java.lang.Object
-
- org.opennms.core.xml.AbstractJaxbConfigDao<AckdConfiguration,AckdConfiguration>
-
- org.opennms.netmgt.dao.jaxb.DefaultAckdConfigurationDao
-
- All Implemented Interfaces:
AckdConfigurationDao
,org.springframework.beans.factory.InitializingBean
public class DefaultAckdConfigurationDao extends AbstractJaxbConfigDao<AckdConfiguration,AckdConfiguration> implements AckdConfigurationDao
Default implementation ofAckdConfiguration
containing utility methods for manipulating theAckd
andAckdReader
s.- Version:
- $Id: $
- Author:
- David Hustace
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.core.xml.AbstractJaxbConfigDao
AbstractJaxbConfigDao.JaxbReloadCallback
-
-
Constructor Summary
Constructors Constructor Description DefaultAckdConfigurationDao()
Constructor for DefaultAckdConfigurationDao.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
acknowledgmentMatch(java.util.List<java.lang.String> messageText)
Utility method for determining if a reply email should acknowledge an acknowledgablejava.lang.Boolean
clearMatch(java.util.List<java.lang.String> messageText)
Utility method for determining if a reply email should clear an acknowledgablejava.lang.Boolean
escalationMatch(java.util.List<java.lang.String> messageText)
Utility method for determining if a reply email should escalate an acknowledgableAckdConfiguration
getConfig()
getConfigint
getEnabledReaderCount()
java.util.List<Parameter>
getParametersForReader(java.lang.String name)
getParametersForReaderReader
getReader(java.lang.String readerName)
Utility method to retrieve a readers configuration by name.ReaderSchedule
getReaderSchedule(java.lang.String readerName)
Utility method to retrieve a schedule defined for a reader.boolean
isReaderEnabled(java.lang.String readerName)
Utility method that determines if a named reader's configuration is enabled.void
reloadConfiguration()
The exception boils up from the container class The container class should indicate this.AckdConfiguration
translateConfig(AckdConfiguration config)
translateConfigjava.lang.Boolean
unAcknowledgmentMatch(java.util.List<java.lang.String> messageText)
Utility method for determining if a reply email should unacknoweledge an acknowledgable-
Methods inherited from class org.opennms.core.xml.AbstractJaxbConfigDao
addOnReloadedCallback, afterPropertiesSet, getConfigResource, getContainer, getDescription, getReloadCheckInterval, loadConfig, setConfigResource, setReloadCheckInterval
-
-
-
-
Method Detail
-
getConfig
public AckdConfiguration getConfig()
getConfig
- Specified by:
getConfig
in interfaceAckdConfigurationDao
- Returns:
- a
AckdConfiguration
object.
-
translateConfig
public AckdConfiguration translateConfig(AckdConfiguration config)
translateConfig
- Specified by:
translateConfig
in classAbstractJaxbConfigDao<AckdConfiguration,AckdConfiguration>
- Parameters:
config
- a K object.- Returns:
- a V object.
-
acknowledgmentMatch
public java.lang.Boolean acknowledgmentMatch(java.util.List<java.lang.String> messageText)
Utility method for determining if a reply email should acknowledge an acknowledgable- Specified by:
acknowledgmentMatch
in interfaceAckdConfigurationDao
- Parameters:
messageText
- aList
object.- Returns:
- Boolean
-
clearMatch
public java.lang.Boolean clearMatch(java.util.List<java.lang.String> messageText)
Utility method for determining if a reply email should clear an acknowledgable- Specified by:
clearMatch
in interfaceAckdConfigurationDao
- Parameters:
messageText
- aList
object.- Returns:
- Boolean
-
escalationMatch
public java.lang.Boolean escalationMatch(java.util.List<java.lang.String> messageText)
Utility method for determining if a reply email should escalate an acknowledgable- Specified by:
escalationMatch
in interfaceAckdConfigurationDao
- Parameters:
messageText
- aList
object.- Returns:
- Boolean
-
unAcknowledgmentMatch
public java.lang.Boolean unAcknowledgmentMatch(java.util.List<java.lang.String> messageText)
Utility method for determining if a reply email should unacknoweledge an acknowledgable- Specified by:
unAcknowledgmentMatch
in interfaceAckdConfigurationDao
- Parameters:
messageText
- aList
object.- Returns:
- Boolean
-
getReader
public Reader getReader(java.lang.String readerName)
Utility method to retrieve a readers configuration by name. EachAckdReader
requires that a name property is defined and the configuration uses that name to retrieve configuration details for that named reader.- Specified by:
getReader
in interfaceAckdConfigurationDao
- Parameters:
readerName
- aString
object.- Returns:
- a Reader configuration
-
getReaderSchedule
public ReaderSchedule getReaderSchedule(java.lang.String readerName)
Utility method to retrieve a schedule defined for a reader. EachAckdReader
requires that a name property is defined and the configuration uses that name to retrieve configuration details for that named reader.- Specified by:
getReaderSchedule
in interfaceAckdConfigurationDao
- Parameters:
readerName
- aString
object.- Returns:
- a ReaderSchedule
-
isReaderEnabled
public boolean isReaderEnabled(java.lang.String readerName)
Utility method that determines if a named reader's configuration is enabled. EachAckdReader
requires that a name property is defined and the configuration uses that name to retrieve configuration details for that named reader.- Specified by:
isReaderEnabled
in interfaceAckdConfigurationDao
- Parameters:
readerName
- aString
object.- Returns:
- a boolean.
-
reloadConfiguration
public void reloadConfiguration() throws org.springframework.dao.DataAccessResourceFailureException
The exception boils up from the container class The container class should indicate this.- Specified by:
reloadConfiguration
in interfaceAckdConfigurationDao
- Throws:
org.springframework.dao.DataAccessResourceFailureException
- if any.
-
getEnabledReaderCount
public int getEnabledReaderCount()
- Specified by:
getEnabledReaderCount
in interfaceAckdConfigurationDao
-
getParametersForReader
public java.util.List<Parameter> getParametersForReader(java.lang.String name)
getParametersForReader
- Specified by:
getParametersForReader
in interfaceAckdConfigurationDao
- Parameters:
name
- aString
object.- Returns:
- a
List
object.
-
-