1 10 11 package org.enhydra.jawe.xml.elements; 12 13 import org.enhydra.jawe.xml.*; 14 import org.enhydra.jawe.xml.panels.*; 15 16 import java.util.*; 17 18 23 public class ActivitySets extends XMLCollection { 24 25 29 public ActivitySets (WorkflowProcess myWorkflow) { 30 super (myWorkflow); 31 } 32 33 39 public XMLElement generateNewElement() { 40 ActivitySet as=new ActivitySet(this,(WorkflowProcess)myOwner); 41 as.setRequired(true); 42 return as; 43 } 44 45 53 public ActivitySet getActivitySet (String ID) { 54 return (ActivitySet)super.getCollectionElement(ID); 55 } 56 57 61 protected boolean canRemoveWorkflow (WorkflowProcess toRemove) { 62 Iterator it=refCollectionElements.iterator(); 63 while (it.hasNext()) { 64 ActivitySet as=(ActivitySet)it.next(); 65 boolean cr=as.canRemoveWorkflow(toRemove); 66 if (cr==false) { 67 return false; 68 } 69 } 70 return true; 71 } 72 73 77 protected boolean canRemoveParticipant (Participant toRemove) { 78 Iterator it=refCollectionElements.iterator(); 79 while (it.hasNext()) { 80 ActivitySet as=(ActivitySet)it.next(); 81 boolean cr=as.canRemoveParticipant(toRemove); 82 if (cr==false) { 83 return false; 84 } 85 } 86 return true; 87 } 88 89 93 protected boolean canRemoveApplication (Application toRemove) { 94 Iterator it=refCollectionElements.iterator(); 95 while (it.hasNext()) { 96 ActivitySet as=(ActivitySet)it.next(); 97 boolean cr=as.canRemoveApplication(toRemove); 98 if (cr==false) { 99 return false; 100 } 101 } 102 return true; 103 } 104 105 109 protected boolean canRemoveDataFieldOrFormalParameter (XMLCollectionElement toRemove) { 110 Iterator it=refCollectionElements.iterator(); 111 while (it.hasNext()) { 112 ActivitySet as=(ActivitySet)it.next(); 113 boolean cr=as.canRemoveDataFieldOrFormalParameter(toRemove); 114 if (cr==false) { 115 return false; 116 } 117 } 118 return true; 119 } 120 121 126 protected boolean isDataFieldOrFormalParameterUsedWithinTransitionConditions ( 127 XMLCollectionElement toRemove) { 128 Iterator it=refCollectionElements.iterator(); 129 while (it.hasNext()) { 130 ActivitySet as=(ActivitySet)it.next(); 131 boolean inUse=as.isDataFieldOrFormalParameterUsedWithinTransitionConditions(toRemove); 132 if (inUse==true) { 133 return true; 134 } 135 } 136 return false; 137 } 138 139 143 protected void afterImporting () { 144 Iterator it=refCollectionElements.iterator(); 145 while (it.hasNext()) { 146 ActivitySet as=(ActivitySet)it.next(); 147 as.afterImporting(); 148 } 149 } 150 151 public XMLPanel getPanel () { 153 isReadOnly=true; 154 controlledPanel=new XMLTablePanel(this,"",false,false); 155 controlPanel=new XMLTableControlPanel(this,"",true,false); 156 return new XMLGroupPanel(this,new XMLPanel[]{ 157 controlledPanel,controlPanel},toLabel(),XMLPanel.BOX_LAYOUT, 158 false,true); 159 } 160 161 164 public void decrementID () { 165 super.decrementID(); 166 } 167 168 171 protected void updateID (String someID) { 172 super.updateID(someID); 173 } 174 175 } 176 | Popular Tags |