1 package org.enhydra.shark.assignment; 2 3 4 import java.util.ArrayList ; 5 import java.util.Iterator ; 6 import java.util.List ; 7 8 import org.enhydra.shark.api.RootException; 9 import org.enhydra.shark.api.SharkTransaction; 10 import org.enhydra.shark.api.internal.assignment.AssignmentManager; 11 import org.enhydra.shark.api.internal.assignment.PerformerData; 12 import org.enhydra.shark.api.internal.working.CallbackUtilities; 13 14 19 public class XPDLStraightParticipantMappingAssignmentManager implements AssignmentManager { 20 21 private CallbackUtilities cus; 22 public void configure (CallbackUtilities cus) throws RootException { 23 this.cus=cus; 24 } 25 26 27 public List getAssignments (SharkTransaction t, 28 String engineName, 29 String procId, 30 String actId, 31 List userIds, 32 List responsibleIds, 33 String processRequesterId, 34 PerformerData xpdlParticipant, 35 List xpdlResponsibleParticipants) throws RootException { 36 37 List toRet=new ArrayList (); 38 if (xpdlParticipant!=null && 39 xpdlParticipant.participantIdOrExpression!=null && 40 !xpdlParticipant.participantIdOrExpression.equals("")) { 41 toRet.add(xpdlParticipant.participantIdOrExpression); 42 return toRet; 43 } 44 if (xpdlResponsibleParticipants!=null && xpdlResponsibleParticipants.size()>0) { 45 Iterator it=xpdlResponsibleParticipants.iterator(); 46 while (it.hasNext()) { 47 PerformerData pd=(PerformerData)it.next(); 48 if (pd.participantIdOrExpression!=null) { 49 toRet.add(pd.participantIdOrExpression); 50 } 51 } 52 if (toRet.size()>0) { 53 return toRet; 54 } 55 } 56 toRet.add(processRequesterId); 58 return toRet; 59 } 60 61 } 62 | Popular Tags |