Package com.agiletec.plugins.jpwebmail.aps.system.services.webmail.parse

Examples of com.agiletec.plugins.jpwebmail.aps.system.services.webmail.parse.WebMailConfigDOM


import com.agiletec.plugins.jpwebmail.aps.system.services.webmail.parse.WebMailConfigDOM;

public class TestWebMailConfigDOM extends ApsPluginBaseTestCase {
 
  public void testGetItems() throws ApsSystemException {
    WebMailConfigDOM configDOM = new WebMailConfigDOM();
    WebMailConfig bean = configDOM.extractConfig(XML);
    assertEquals("smtpUsername", bean.getSmtpUserName());
    assertEquals("SMTP.EMAIL.COM", bean.getSmtpHost());
    assertEquals("smtpPassword", bean.getSmtpPassword());
    assertEquals("/cert/path/", bean.getCertificatePath());
    assertTrue(bean.isCertificateLazyCheck());
View Full Code Here


    try {
      String xml = this.getConfigManager().getConfigItem(JpwebmailSystemConstants.WEBMAIL_CONFIG_ITEM);
      if (xml == null) {
        throw new ApsSystemException("Missing confi item: " + JpwebmailSystemConstants.WEBMAIL_CONFIG_ITEM);
      }
      WebMailConfigDOM contactConfigDom = new WebMailConfigDOM();
      this.setConfig(contactConfigDom.extractConfig(xml));
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "loadConfigs");
      throw new ApsSystemException("Error loading config", t);
    }
  }
View Full Code Here

  }
 
  @Override
  public void updateConfig(WebMailConfig config) throws ApsSystemException {
    try {
      String xml = new WebMailConfigDOM().createConfigXml(config);
      this.getConfigManager().updateConfigItem(JpwebmailSystemConstants.WEBMAIL_CONFIG_ITEM, xml);
      this.setConfig(config);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "updateConfig", "Error updating Web Mail Service configuration");
      throw new ApsSystemException("Error updating Web Mail Service configuration", t);
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpwebmail.aps.system.services.webmail.parse.WebMailConfigDOM

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.