Example #1
0
 /**
  * Construct a new MultiMailer and instatiate all required Mailers
  *
  * @param mailerClass - The Class used to instantiate the Mailers
  * @param propertiesFile - the properties-file
  * @throws IOException if loading the properties fails
  */
 public MultiMailer(Class<? extends M> mailerClass, File propertiesFile) throws IOException {
   this(mailerClass, PropertiesUtil.loadProperties(propertiesFile));
 }
Example #2
0
 /**
  * Get the properties for the mailer with a given key and the config value defined in the global
  * properties for this multi mailer.<br>
  * <br>
  * By default a new Properties Object will be loaded from resources defined by the config value
  * with the global properties as it's parent:<br>
  * <br>
  * <code>
  * &nbsp;&nbsp;&nbsp;&nbsp;Properties mailerProperties = new Properties(properties);<br>
  * &nbsp;&nbsp;&nbsp;&nbsp;mailerProperties.putAll(PropertiesUtil.loadProperties(configValue));<br>
  * &nbsp;&nbsp;&nbsp;&nbsp;return mailerProperties;<br>
  * </code>
  *
  * @param key - the key for the mailer to get the properties for
  * @param configName - the config value defined in the global properties
  * @return
  * @throws IOException
  */
 protected Properties getMailerProperties(String key, String configValue) throws IOException {
   Properties mailerProperties = new Properties(properties);
   mailerProperties.putAll(PropertiesUtil.loadProperties(configValue));
   return mailerProperties;
 }