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 ofAckdConfigurationcontaining utility methods for manipulating theAckdandAckdReaders.- 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 BooleanacknowledgmentMatch(List<String> messageText)Utility method for determining if a reply email should acknowledge an acknowledgableBooleanclearMatch(List<String> messageText)Utility method for determining if a reply email should clear an acknowledgableBooleanescalationMatch(List<String> messageText)Utility method for determining if a reply email should escalate an acknowledgableAckdConfigurationgetConfig()getConfigintgetEnabledReaderCount()List<Parameter>getParametersForReader(String name)getParametersForReaderReadergetReader(String readerName)Utility method to retrieve a readers configuration by name.ReaderSchedulegetReaderSchedule(String readerName)Utility method to retrieve a schedule defined for a reader.booleanisReaderEnabled(String readerName)Utility method that determines if a named reader's configuration is enabled.voidreloadConfiguration()The exception boils up from the container class The container class should indicate this.AckdConfigurationtranslateConfig(AckdConfiguration config)translateConfigBooleanunAcknowledgmentMatch(List<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:
getConfigin interfaceAckdConfigurationDao- Returns:
- a
AckdConfigurationobject.
-
translateConfig
public AckdConfiguration translateConfig(AckdConfiguration config)
translateConfig
- Specified by:
translateConfigin classAbstractJaxbConfigDao<AckdConfiguration,AckdConfiguration>- Parameters:
config- a K object.- Returns:
- a V object.
-
acknowledgmentMatch
public Boolean acknowledgmentMatch(List<String> messageText)
Utility method for determining if a reply email should acknowledge an acknowledgable- Specified by:
acknowledgmentMatchin interfaceAckdConfigurationDao- Parameters:
messageText- aListobject.- Returns:
- Boolean
-
clearMatch
public Boolean clearMatch(List<String> messageText)
Utility method for determining if a reply email should clear an acknowledgable- Specified by:
clearMatchin interfaceAckdConfigurationDao- Parameters:
messageText- aListobject.- Returns:
- Boolean
-
escalationMatch
public Boolean escalationMatch(List<String> messageText)
Utility method for determining if a reply email should escalate an acknowledgable- Specified by:
escalationMatchin interfaceAckdConfigurationDao- Parameters:
messageText- aListobject.- Returns:
- Boolean
-
unAcknowledgmentMatch
public Boolean unAcknowledgmentMatch(List<String> messageText)
Utility method for determining if a reply email should unacknoweledge an acknowledgable- Specified by:
unAcknowledgmentMatchin interfaceAckdConfigurationDao- Parameters:
messageText- aListobject.- Returns:
- Boolean
-
getReader
public Reader getReader(String readerName)
Utility method to retrieve a readers configuration by name. EachAckdReaderrequires that a name property is defined and the configuration uses that name to retrieve configuration details for that named reader.- Specified by:
getReaderin interfaceAckdConfigurationDao- Parameters:
readerName- aStringobject.- Returns:
- a Reader configuration
-
getReaderSchedule
public ReaderSchedule getReaderSchedule(String readerName)
Utility method to retrieve a schedule defined for a reader. EachAckdReaderrequires that a name property is defined and the configuration uses that name to retrieve configuration details for that named reader.- Specified by:
getReaderSchedulein interfaceAckdConfigurationDao- Parameters:
readerName- aStringobject.- Returns:
- a ReaderSchedule
-
isReaderEnabled
public boolean isReaderEnabled(String readerName)
Utility method that determines if a named reader's configuration is enabled. EachAckdReaderrequires that a name property is defined and the configuration uses that name to retrieve configuration details for that named reader.- Specified by:
isReaderEnabledin interfaceAckdConfigurationDao- Parameters:
readerName- aStringobject.- Returns:
- a boolean.
-
reloadConfiguration
public void reloadConfiguration() throws org.springframework.dao.DataAccessResourceFailureExceptionThe exception boils up from the container class The container class should indicate this.- Specified by:
reloadConfigurationin interfaceAckdConfigurationDao- Throws:
org.springframework.dao.DataAccessResourceFailureException- if any.
-
getEnabledReaderCount
public int getEnabledReaderCount()
- Specified by:
getEnabledReaderCountin interfaceAckdConfigurationDao
-
getParametersForReader
public List<Parameter> getParametersForReader(String name)
getParametersForReader
- Specified by:
getParametersForReaderin interfaceAckdConfigurationDao- Parameters:
name- aStringobject.- Returns:
- a
Listobject.
-
-