Package ch.tatool.element

Examples of ch.tatool.element.Element


 
  /**
   * Runs selectors found on the top element as long as they execute a next element
   */
  private boolean runTopSelectors(ExecutionContext executionContext, ElementTree tree) {
    Element top = tree.getTop();
    for (Object handler : top.getHandlers()) {
      if (handler instanceof ElementSelector) {
        boolean adapted = ((ElementSelector) handler).selectNextElement(executionContext);
        if (adapted) {
          return true;
        }
View Full Code Here


    public static final String SPRING_ELEMENT_CONFIGURATION_XML_PROPERTY = "SpringXmlElementConfig";

    /** Configures the executor with the given module. */
  public void initialize(Executor executor, Module module) {
    // load the root execution element
    Element element = fetchRootElement(module);
    executor.getExecutionTree().setRootElement(element);
   
    // instantiate the execution strategy
    setupExecutionStrategy(executor, module);
  }
View Full Code Here

          throw new CreationException("Unable to load Tatool file. Root element missing!");      
        }
       
        // fetch the rootElement
        try {
          Element root = (Element) moduleContext.getBean(ROOT_ELEMENT);
          return root;
        } catch (RuntimeException e) {
          String[] errors = e.getMessage().split(";");
          throw new CreationException(errors[errors.length-1]);
        }
View Full Code Here

        // find the next element to execute or exit if none could be found
      continueModule = selectorStrategy.updateElementStack(executionContext);
      if (! continueModule) return;
     
      // fetch the new execution element
        Element newElement = elementTree.getTop();
        Executable newExecutable = null;
        if (newElement == null) {
          continueModule = false;
          return;
        }
       
        // fetch the executable executable
        newExecutable = newElement.getExecutable();
        if (newExecutable == null) {
          continueModule = false;
          return;
        }
       
View Full Code Here

    public static final String SPRING_ELEMENT_CONFIGURATION_XML_PROPERTY = "SpringXmlElementConfig";

    /** Configures the executor with the given module. */
  public void initialize(Executor executor, Module module) {
    // load the root execution element
    Element element = fetchRootElement(module);
    executor.getExecutionTree().setRootElement(element);
   
    // instantiate the execution strategy
    setupExecutionStrategy(executor, module);
  }
View Full Code Here

          throw new CreationException("Unable to load Tatool file. Root element missing!");      
        }
       
        // fetch the rootElement
        try {
          Element root = (Element) beanFactory.getBean(ROOT_ELEMENT);
          return root;
        } catch (RuntimeException e) {
          String[] errors = e.getMessage().split(";");
          throw new CreationException(errors[errors.length-1]);
        }
View Full Code Here

    protected Module createModule(UserAccount account) {
      // first create the training
      Module module = super.createModule(account);
     
      // then assign a memory initializer that sets our root element
      Element rootElement = createRootElement();
        module.setExecutorInitializer(new MemoryExecutorInitializer(rootElement));
       
        return module;
    }
View Full Code Here

        executionData.setSessionCompleted(1);
        return;
      }
     
      // fetch the new execution element
        Element newElement = elementTree.getTop();
        Executable newExecutable = null;
        if (newElement == null) {
          continueModule = false;
          return;
        }
       
        // fetch the executable executable
        newExecutable = newElement.getExecutable();
        if (newExecutable == null) {
          continueModule = false;
          return;
        }
       
View Full Code Here

TOP

Related Classes of ch.tatool.element.Element

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.