View Javadoc
1 package org.smartcomps.twister.deployer.priv; 2 3 import org.dom4j.Attribute; 4 import org.dom4j.Element; 5 import org.smartcomps.twister.deployer.exception.DeploymentException; 6 import org.smartcomps.twister.engine.priv.core.definition.Activity; 7 import org.smartcomps.twister.engine.priv.core.definition.StructuredActivity; 8 import org.smartcomps.twister.engine.priv.core.definition.While; 9 10 import java.util.Iterator; 11 12 /*** 13 * <while condition="bool-expr" standard-attributes> 14 * standard-elements 15 * activity 16 * </while> 17 */ 18 public class WhileDeployer extends ActivityDeployer { 19 20 protected Class getActivityClass() { 21 return While.class; 22 } 23 24 protected void processSpecificAttributes(Element element, Activity activity) { 25 While awhile = (While) activity; 26 Attribute condition = element.attribute("condition"); 27 if (condition != null) { 28 log.debug("condition=" + condition.getValue()); 29 awhile.setCondition(condition.getValue()); 30 } 31 } 32 33 protected void processSpecificElements(Element element, Activity activity) throws DeploymentException { 34 // for (Iterator i = element.elementIterator(); i.hasNext();) { 35 // Element elem = (Element) i.next(); 36 // ActivityDeployer ad = ActivityDeployerFactory.getActivityDeployer(elem.getName()); 37 // ad.deploy(elem, (StructuredActivity) activity); 38 // } 39 } 40 41 }

This page was automatically generated by Maven