Package com.agiletec.plugins.jpcontentworkflow.aps.system.services.notifier.parse

Examples of com.agiletec.plugins.jpcontentworkflow.aps.system.services.notifier.parse.WorkflowNotifierDOM


    super.setUp();
    this.init();
  }
 
  public void testExtractConfig() throws Throwable {
    WorkflowNotifierDOM configDOM = new WorkflowNotifierDOM();
    String xml = this._configManager.getConfigItem(JpcontentworkflowSystemConstants.WORKFLOW_NOTIFIER_CONFIG_ITEM);
    NotifierConfig notifierConfig = configDOM.extractConfig(xml);
    assertFalse(notifierConfig.isActive());
    assertEquals(24, notifierConfig.getHoursDelay());
    assertTrue(notifierConfig.getStartScheduler().getTime()<(new Date()).getTime());
    assertEquals("CODE1", notifierConfig.getSenderCode());
    //assertEquals("email", notifierConfig.getMailAttrName());
View Full Code Here


                assertEquals("<br />Content {type} - {descr} - Status {status}<br />", notifierConfig.getTemplate());
                assertEquals("<br />End (footer)", notifierConfig.getFooter());
  }
 
  public void testSetNotifierConfig() throws Throwable {
    WorkflowNotifierDOM configDOM = new WorkflowNotifierDOM();
   
    NotifierConfig newConfig = this.prepareNotifierConfig();
    String xml = configDOM.createConfigXml(newConfig);
   
    NotifierConfig extractedConfig = configDOM.extractConfig(xml);
    this.compareNotifiers(newConfig, extractedConfig);
  }
View Full Code Here

      ConfigInterface configManager = this.getConfigManager();
      String xml = configManager.getConfigItem(JpcontentworkflowSystemConstants.WORKFLOW_NOTIFIER_CONFIG_ITEM);
      if (xml == null) {
        throw new ApsSystemException("Configuration item not present: " + JpcontentworkflowSystemConstants.WORKFLOW_NOTIFIER_CONFIG_ITEM);
      }
      WorkflowNotifierDOM configDOM = new WorkflowNotifierDOM();
      this.setNotifierConfig(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 saveNotifierConfig(NotifierConfig notifierConfig) throws ApsSystemException {
    try {
      WorkflowNotifierDOM configDOM = new WorkflowNotifierDOM();
      String xml = configDOM.createConfigXml(notifierConfig);
      this.getConfigManager().updateConfigItem(JpcontentworkflowSystemConstants.WORKFLOW_NOTIFIER_CONFIG_ITEM, xml);
      this.setNotifierConfig(notifierConfig);
      this.closeScheduler();
      this.openScheduler();
    } catch (Throwable t) {
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpcontentworkflow.aps.system.services.notifier.parse.WorkflowNotifierDOM

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.