1 29 30 package hero.performerAssign; 31 32 import hero.util.HeroException; 33 import hero.interfaces.BnNodeLocal; 34 import hero.interfaces.BnNodePropertyLocal; 35 36 public class PropertySelectActors implements hero.performerAssign.NodePerformerAssignI { 37 38 public void selectActors(Object b,BnNodeLocal n, String userName) throws HeroException { 39 String nodeName=n.getName(); 40 String projectName=n.getBnProject().getName(); 41 System.out.println("[PropertySelectActors] BnNode name:"+nodeName + " - Project name = " + projectName); 43 try { 44 String user = ""; 45 String propertyName = n.getBnNodePerformerAssign().getPropertyName(); 47 java.util.Collection co = null; 49 co = n.getBnProperties(); 50 BnNodePropertyLocal propertyL; 51 java.util.Iterator it =co.iterator(); 52 while (it.hasNext()){ 53 propertyL = (BnNodePropertyLocal)it.next(); 54 if ( (propertyL.getTheKey()).equals(propertyName) ) 55 user = propertyL.getTheValue(); 56 } 57 System.out.println("[PropertySelectActors] user = " + user); 59 n.setActivityPerformer(user); 60 } catch (Exception e){ 61 e.printStackTrace(); 62 throw new HeroException("[PropertySelectActors]: " + e.getMessage()); 63 } 64 } 65 } 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | Popular Tags |