1 package org.enhydra.shark.xpdl.elements; 2 3 import org.enhydra.shark.xpdl.XMLAttribute; 4 import org.enhydra.shark.xpdl.XMLComplexElement; 5 import org.enhydra.shark.xpdl.XPDLConstants; 6 7 12 public class ProcessHeader extends XMLComplexElement { 13 14 public ProcessHeader (WorkflowProcess parent) { 15 super(parent, true); 16 } 17 18 protected void fillStructure () { 19 XMLAttribute attrDurationUnit=new XMLAttribute(this,"DurationUnit", 20 false,new String [] { 21 "", 22 XPDLConstants.DURATION_UNIT_Y, 23 XPDLConstants.DURATION_UNIT_M, 24 XPDLConstants.DURATION_UNIT_D, 25 XPDLConstants.DURATION_UNIT_h, 26 XPDLConstants.DURATION_UNIT_m, 27 XPDLConstants.DURATION_UNIT_s 28 }, 0); 29 Created refCreated=new Created(this); Description refDescription=new Description(this); Priority refPriority=new Priority(this); Limit refLimit=new Limit(this); ValidFrom refValidFrom=new ValidFrom(this); ValidTo refValidTo=new ValidTo(this); TimeEstimation refTimeEstimation=new TimeEstimation(this); 37 add(attrDurationUnit); 38 add(refCreated); 39 add(refDescription); 40 add(refPriority); 41 add(refLimit); 42 add(refValidFrom); 43 add(refValidTo); 44 add(refTimeEstimation); 45 } 46 47 public XMLAttribute getDurationUnitAttribute() { 48 return (XMLAttribute)get("DurationUnit"); 49 } 50 public String getDurationUnit() { 51 return getDurationUnitAttribute().toValue(); 52 } 53 public void setDurationUnitNONE() { 54 getDurationUnitAttribute().setValue(""); 55 } 56 public void setDurationUnitYEAR() { 57 getDurationUnitAttribute().setValue(XPDLConstants.DURATION_UNIT_Y); 58 } 59 public void setDurationUnitMONTH() { 60 getDurationUnitAttribute().setValue(XPDLConstants.DURATION_UNIT_M); 61 } 62 public void setDurationUnitDAY() { 63 getDurationUnitAttribute().setValue(XPDLConstants.DURATION_UNIT_D); 64 } 65 public void setDurationUnitHOUR() { 66 getDurationUnitAttribute().setValue(XPDLConstants.DURATION_UNIT_h); 67 } 68 public void setDurationUnitMINUTE() { 69 getDurationUnitAttribute().setValue(XPDLConstants.DURATION_UNIT_m); 70 } 71 public void setDurationUnitSECOND() { 72 getDurationUnitAttribute().setValue(XPDLConstants.DURATION_UNIT_s); 73 } 74 public String getCreated() { 75 return get("Created").toValue(); 76 } 77 public void setCreated(String created) { 78 set("Created",created); 79 } 80 public String getDescription() { 81 return get("Description").toValue(); 82 } 83 public void setDescription(String description) { 84 set("Description",description); 85 } 86 public String getPriority() { 87 return get("Priority").toValue(); 88 } 89 public void setPriority(String priority) { 90 set("Priority",priority); 91 } 92 public String getLimit() { 93 return get("Limit").toValue(); 94 } 95 public void setLimit(String limit) { 96 set("Limit",limit); 97 } 98 public String getValidFrom() { 99 return get("ValidFrom").toValue(); 100 } 101 public void setValidFrom(String validFrom) { 102 set("ValidFrom",validFrom); 103 } 104 public String getValidTo() { 105 return get("ValidTo").toValue(); 106 } 107 public void setValidTo(String validTo) { 108 set("ValidTo",validTo); 109 } 110 public TimeEstimation getTimeEstimation() { 111 return (TimeEstimation)get("TimeEstimation"); 112 } 113 114 } 115 | Popular Tags |