1 5 package mc.formgenerator.servlets.bonita; 6 7 import java.rmi.RemoteException ; 8 import java.util.ArrayList ; 9 import java.util.Collection ; 10 11 import javax.ejb.CreateException ; 12 import javax.naming.NamingException ; 13 14 import hero.interfaces.UserSessionHome; 15 import hero.interfaces.UserSession; 16 import hero.util.HeroException; 17 18 21 public class ModelActivityToDoList { 22 23 private String projectName = null; 25 26 private Collection toDoList = null; 28 29 30 34 public ModelActivityToDoList(){}; 35 36 37 38 39 43 public Collection getToDoList(){ 44 return this.toDoList; 46 } 47 48 49 50 51 55 public void setToDoList(Collection collection){ 56 this.toDoList = collection; 58 } 59 60 61 62 63 67 public String getProjectName(){ 68 return this.projectName; 70 } 71 72 73 74 75 79 public void setProjectName(String theProjectName){ 80 this.projectName = theProjectName; 82 } 83 84 85 86 87 97 private Collection getBonitaToDoList(String projectName) 98 throws HeroException, RemoteException , 99 CreateException , NamingException { 100 101 UserSessionHome userh = (UserSessionHome)hero.interfaces.UserSessionUtil.getHome(); 103 UserSession usersession = userh.create(); 104 105 Collection collectionToDoList = new ArrayList (); 107 try{ 108 collectionToDoList = 109 usersession.getToDoList(projectName); 110 }catch(HeroException e){} 111 112 return collectionToDoList; 113 } 114 115 116 117 118 127 public void process(String theProjectName) 128 throws RemoteException , HeroException, 129 CreateException , NamingException { 130 131 this.setProjectName(theProjectName); 133 this.setToDoList(this.getBonitaToDoList(theProjectName)); 134 } 135 } 136 | Popular Tags |