Package com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.parse

Examples of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.parse.NewsletterConfigDOM


public class TestNewsletterConfigDOM extends ApsPluginBaseTestCase {
 
  public void testExtractConfig() throws Throwable {
    String xml = this._configManager.getConfigItem(JpnewsletterSystemConstants.NEWSLETTER_CONFIG_ITEM);
    NewsletterConfig config = new NewsletterConfigDOM().extractConfig(xml);
    this.checkOriginaryConfig(config);
  }
View Full Code Here


    NewsletterConfig config = new NewsletterConfigDOM().extractConfig(xml);
    this.checkOriginaryConfig(config);
  }
 
  public void testUpdateConfig() throws Throwable {
    NewsletterConfigDOM newsletterConfigDOM = new NewsletterConfigDOM();
    NewsletterConfig config = this.createNewsletterConfig();
    String xml = newsletterConfigDOM.createConfigXml(config);
    NewsletterConfig updatedConfig = newsletterConfigDOM.extractConfig(xml);
    this.compareConfigs(config, updatedConfig);
  }
View Full Code Here

      ConfigInterface configManager = this.getConfigManager();
      String xml = configManager.getConfigItem(JpnewsletterSystemConstants.NEWSLETTER_CONFIG_ITEM);
      if (xml == null) {
        throw new ApsSystemException("Configuration item not present: " + JpnewsletterSystemConstants.NEWSLETTER_CONFIG_ITEM);
      }
      NewsletterConfigDOM configDOM = new NewsletterConfigDOM();
      this.setConfig(configDOM.extractConfig(xml));
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "loadConfigs");
      throw new ApsSystemException("Errore in fase di inizializzazione", t);
    }
  }
View Full Code Here

  @Override
  public void updateNewsletterConfig(NewsletterConfig config) throws ApsSystemException {
    Date originalStartDate = null;
    try {
      originalStartDate = this.getConfig().getStartScheduler();
      String xml = new NewsletterConfigDOM().createConfigXml(config);
      this.getConfigManager().updateConfigItem(JpnewsletterSystemConstants.NEWSLETTER_CONFIG_ITEM, xml);
      this.setConfig(config);
      // restart the scheduler if necessary
      if (originalStartDate.getTime() != config.getStartScheduler().getTime()) {
        ApsSystemUtils.getLogger().info("Newsletter: scheduler restart issued");
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpnewsletter.aps.system.services.newsletter.parse.NewsletterConfigDOM

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.