Package org.opennms.netmgt.dao.mock
Class MockJavaMailConfigurationDao
- java.lang.Object
-
- org.opennms.netmgt.dao.mock.MockJavaMailConfigurationDao
-
- All Implemented Interfaces:
JavaMailConfigurationDao
public class MockJavaMailConfigurationDao extends Object implements JavaMailConfigurationDao
-
-
Constructor Summary
Constructors Constructor Description MockJavaMailConfigurationDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEnd2endMailConfig(End2endMailConfig end2endConfig)
Adds the end2end mail configuration.void
addReadMailConfig(ReadmailConfig readmailConfig)
Adds the read mail configuration.void
addSendMailConfig(SendmailConfig sendmailConfig)
Adds the send mail configuration.ReadmailConfig
getDefaultReadmailConfig()
Gets the default readmail configuration.SendmailConfig
getDefaultSendmailConfig()
Gets the default sendmail configuration.End2endMailConfig
getEnd2endConfig(String name)
Gets the end2end mail configuration.List<End2endMailConfig>
getEnd2EndConfigs()
Gets the end2end mail configurations.ReadmailConfig
getReadMailConfig(String name)
Gets the read mail configuration.List<ReadmailConfig>
getReadmailConfigs()
Gets the readmail configurations.SendmailConfig
getSendMailConfig(String name)
Gets the send mail configuration.List<SendmailConfig>
getSendmailConfigs()
Gets the sendmail configurations.void
reloadConfiguration()
Reloads the configuration.boolean
removeEnd2endConfig(String end2endConfigName)
Removes the end2 end configuration.boolean
removeReadMailConfig(String readmailConfigName)
Removes the readmail configuration.boolean
removeSendMailConfig(String sendmailConfigName)
Removes the sendmail configuration.void
saveConfiguration()
Saves the current configuration on disk.void
setDefaultReadmailConfig(String sendmailConfigName)
Sets the default readmail configuration.void
setDefaultSendmailConfig(String sendmailConfigName)
Sets the default sendmail configuration.void
verifyMarshaledConfiguration()
Verifies marshaled configuration.
-
-
-
Method Detail
-
getDefaultSendmailConfig
public SendmailConfig getDefaultSendmailConfig()
Description copied from interface:JavaMailConfigurationDao
Gets the default sendmail configuration.- Specified by:
getDefaultSendmailConfig
in interfaceJavaMailConfigurationDao
- Returns:
- the default sendmail configuration
-
getSendMailConfig
public SendmailConfig getSendMailConfig(String name)
Description copied from interface:JavaMailConfigurationDao
Gets the send mail configuration.- Specified by:
getSendMailConfig
in interfaceJavaMailConfigurationDao
- Parameters:
name
- the sendmail configuration name- Returns:
- the send mail configuration
-
getSendmailConfigs
public List<SendmailConfig> getSendmailConfigs()
Description copied from interface:JavaMailConfigurationDao
Gets the sendmail configurations.- Specified by:
getSendmailConfigs
in interfaceJavaMailConfigurationDao
- Returns:
- the sendmail configurations
-
getDefaultReadmailConfig
public ReadmailConfig getDefaultReadmailConfig()
Description copied from interface:JavaMailConfigurationDao
Gets the default readmail configuration.- Specified by:
getDefaultReadmailConfig
in interfaceJavaMailConfigurationDao
- Returns:
- the default readmail configuration
-
getReadMailConfig
public ReadmailConfig getReadMailConfig(String name)
Description copied from interface:JavaMailConfigurationDao
Gets the read mail configuration.- Specified by:
getReadMailConfig
in interfaceJavaMailConfigurationDao
- Parameters:
name
- the readmail configuration name- Returns:
- the read mail configuration
-
getReadmailConfigs
public List<ReadmailConfig> getReadmailConfigs()
Description copied from interface:JavaMailConfigurationDao
Gets the readmail configurations.- Specified by:
getReadmailConfigs
in interfaceJavaMailConfigurationDao
- Returns:
- the readmail configurations
-
getEnd2endConfig
public End2endMailConfig getEnd2endConfig(String name)
Description copied from interface:JavaMailConfigurationDao
Gets the end2end mail configuration.- Specified by:
getEnd2endConfig
in interfaceJavaMailConfigurationDao
- Parameters:
name
- the end2end configuration name- Returns:
- the end2end configuration
-
getEnd2EndConfigs
public List<End2endMailConfig> getEnd2EndConfigs()
Description copied from interface:JavaMailConfigurationDao
Gets the end2end mail configurations.- Specified by:
getEnd2EndConfigs
in interfaceJavaMailConfigurationDao
- Returns:
- the end2end mail configurations
-
verifyMarshaledConfiguration
public void verifyMarshaledConfiguration() throws IllegalStateException
Description copied from interface:JavaMailConfigurationDao
Verifies marshaled configuration.- Specified by:
verifyMarshaledConfiguration
in interfaceJavaMailConfigurationDao
- Throws:
IllegalStateException
- the illegal state exception
-
reloadConfiguration
public void reloadConfiguration() throws org.springframework.dao.DataAccessResourceFailureException
Description copied from interface:JavaMailConfigurationDao
Reloads the configuration.- Specified by:
reloadConfiguration
in interfaceJavaMailConfigurationDao
- Throws:
org.springframework.dao.DataAccessResourceFailureException
- the data access resource failure exception
-
addSendMailConfig
public void addSendMailConfig(SendmailConfig sendmailConfig)
Description copied from interface:JavaMailConfigurationDao
Adds the send mail configuration.If there is a sendmail-config object with the same name, it will be replaced; otherwise, the new object will be added.
- Specified by:
addSendMailConfig
in interfaceJavaMailConfigurationDao
- Parameters:
sendmailConfig
- the sendmail configuration
-
addReadMailConfig
public void addReadMailConfig(ReadmailConfig readmailConfig)
Description copied from interface:JavaMailConfigurationDao
Adds the read mail configuration.If there is a readmail-config object with the same name, it will be replaced; otherwise, the new object will be added.
- Specified by:
addReadMailConfig
in interfaceJavaMailConfigurationDao
- Parameters:
readmailConfig
- the readmail configuration
-
addEnd2endMailConfig
public void addEnd2endMailConfig(End2endMailConfig end2endConfig)
Description copied from interface:JavaMailConfigurationDao
Adds the end2end mail configuration.If there is a end2end-mail-config object with the same name, it will be replaced; otherwise, the new object will be added.
- Specified by:
addEnd2endMailConfig
in interfaceJavaMailConfigurationDao
- Parameters:
end2endConfig
- the end2end configuration
-
saveConfiguration
public void saveConfiguration()
Description copied from interface:JavaMailConfigurationDao
Saves the current configuration on disk.- Specified by:
saveConfiguration
in interfaceJavaMailConfigurationDao
-
removeSendMailConfig
public boolean removeSendMailConfig(String sendmailConfigName)
Description copied from interface:JavaMailConfigurationDao
Removes the sendmail configuration.- Specified by:
removeSendMailConfig
in interfaceJavaMailConfigurationDao
- Parameters:
sendmailConfigName
- the sendmail configuration name- Returns:
- true, if successful
-
removeReadMailConfig
public boolean removeReadMailConfig(String readmailConfigName)
Description copied from interface:JavaMailConfigurationDao
Removes the readmail configuration.- Specified by:
removeReadMailConfig
in interfaceJavaMailConfigurationDao
- Parameters:
readmailConfigName
- the readmail configuration name- Returns:
- true, if successful
-
removeEnd2endConfig
public boolean removeEnd2endConfig(String end2endConfigName)
Description copied from interface:JavaMailConfigurationDao
Removes the end2 end configuration.- Specified by:
removeEnd2endConfig
in interfaceJavaMailConfigurationDao
- Parameters:
end2endConfigName
- the end2end configuration name- Returns:
- true, if successful
-
setDefaultSendmailConfig
public void setDefaultSendmailConfig(String sendmailConfigName)
Description copied from interface:JavaMailConfigurationDao
Sets the default sendmail configuration.- Specified by:
setDefaultSendmailConfig
in interfaceJavaMailConfigurationDao
- Parameters:
sendmailConfigName
- the new default sendmail configuration
-
setDefaultReadmailConfig
public void setDefaultReadmailConfig(String sendmailConfigName)
Description copied from interface:JavaMailConfigurationDao
Sets the default readmail configuration.- Specified by:
setDefaultReadmailConfig
in interfaceJavaMailConfigurationDao
- Parameters:
sendmailConfigName
- the new default readmail configuration
-
-