Package com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.parse

Examples of com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.parse.MessageNotifierConfigDOM


 
  public void testExtractCreateConfig() throws Throwable {
    ConfigInterface configManager = (ConfigInterface) this.getService(SystemConstants.BASE_CONFIG_MANAGER);
    String xml = configManager.getConfigItem(JpwebdynamicformSystemConstants.MESSAGE_NOTIFIER_CONFIG_ITEM);
   
    MessageNotifierConfigDOM configDOM = new MessageNotifierConfigDOM();
    Map<String, MessageTypeNotifierConfig> config = configDOM.extractConfig(xml);
    this.checkOriginaryConfig(config);
   
    String newXml = configDOM.createConfigXml(config);
    Map<String, MessageTypeNotifierConfig> newConfig = configDOM.extractConfig(newXml);
    this.checkOriginaryConfig(newConfig);
  }
View Full Code Here


      ConfigInterface configManager = this.getConfigManager();
      String xml = configManager.getConfigItem(JpwebdynamicformSystemConstants.MESSAGE_NOTIFIER_CONFIG_ITEM);
      if (xml == null) {
        throw new ApsSystemException("Configuration item not present: " + JpwebdynamicformSystemConstants.MESSAGE_NOTIFIER_CONFIG_ITEM);
      }
      MessageNotifierConfigDOM configDOM = new MessageNotifierConfigDOM();
      this.setNotifierConfigMap(configDOM.extractConfig(xml));
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "loadNotifierConfig");
      throw new ApsSystemException("Error initializing the configuration", t);
    }
  }
View Full Code Here

  }

  @Override
  public void saveNotifierConfig(MessageTypeNotifierConfig config) throws ApsSystemException {
    try {
      MessageNotifierConfigDOM configDOM = new MessageNotifierConfigDOM();
      Map<String, MessageTypeNotifierConfig> configMap = this.getNotifierConfigMap();
      configMap.put(config.getTypeCode(), config);

      String xml = configDOM.createConfigXml(configMap);
      ConfigInterface configManager = this.getConfigManager();
      configManager.updateConfigItem(JpwebdynamicformSystemConstants.MESSAGE_NOTIFIER_CONFIG_ITEM, xml);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "saveNotifierConfig");
      this.loadNotifierConfig();
View Full Code Here

   * @param type The type of the message.
   * @throws ApsSystemException
   */
  protected void removeNotifierConfig(String typeCode) throws ApsSystemException {
    try {
      MessageNotifierConfigDOM configDOM = new MessageNotifierConfigDOM();
      Map<String, MessageTypeNotifierConfig> configMap = this.getNotifierConfigMap();
      configMap.remove(typeCode);

      String xml = configDOM.createConfigXml(configMap);
      ConfigInterface configManager = this.getConfigManager();
      configManager.updateConfigItem(JpwebdynamicformSystemConstants.MESSAGE_NOTIFIER_CONFIG_ITEM, xml);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "removeNotifierConfig");
      this.loadNotifierConfig();
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpwebdynamicform.aps.system.services.message.parse.MessageNotifierConfigDOM

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.