View Javadoc
1 package org.smartcomps.twister.deployer.priv; 2 3 import org.dom4j.Element; 4 import org.smartcomps.twister.deployer.exception.DeploymentException; 5 import org.smartcomps.twister.engine.priv.core.definition.Activity; 6 import org.smartcomps.twister.engine.priv.core.definition.Wait; 7 8 /*** 9 * <wait (for="duration-expr" | until="deadline-expr") standard-attributes> 10 * standard-elements 11 * </wait> 12 */ 13 public class WaitDeployer extends ActivityDeployer { 14 15 protected void processSpecificElements(Element element, Activity activity) throws DeploymentException { 16 // No Specific Elements 17 } 18 19 protected void processSpecificAttributes(Element element, Activity activity) throws DeploymentException { 20 String forDurationExpression = element.valueOf("@for"); 21 String untilDeadlineExpression = element.valueOf("@until"); 22 Wait wait = (Wait) activity; 23 if (forDurationExpression != null) { 24 wait.setDuration(true); 25 wait.setTime(forDurationExpression); 26 } else if (untilDeadlineExpression != null) { 27 wait.setDuration(false); 28 wait.setTime(untilDeadlineExpression); 29 } 30 } 31 32 protected Class getActivityClass() { 33 return Wait.class; 34 } 35 }

This page was automatically generated by Maven