1 package org.enhydra.shark.corba; 2 3 import org.omg.WfBase.BaseException; 4 import org.omg.WorkflowModel.*; 5 6 12 public class WfAssignmentCORBA extends _WfAssignmentImplBase { 13 15 org.enhydra.shark.api.client.wfmodel.WfAssignment sharkAss; 16 17 private Collective __collective; 18 19 24 protected WfAssignmentCORBA(Collective toJoin, 25 org.enhydra.shark.api.client.wfmodel.WfAssignment sharkAss) { 26 __collective = toJoin; 27 toJoin.__recruit(this); 28 this.sharkAss = sharkAss; 29 } 30 31 36 public WfActivity activity() throws BaseException { 37 try { 38 return new WfActivityCORBA(__collective, sharkAss.activity()); 39 } catch (Exception ex) { 40 throw new BaseException(); 41 } 42 } 43 44 49 public WfResource assignee() throws BaseException { 50 try { 51 return new WfResourceCORBA(__collective, sharkAss.assignee()); 52 } catch (Exception ex) { 53 throw new BaseException(); 54 } 55 } 56 57 60 public void set_assignee(WfResource new_value) throws BaseException, 61 InvalidResource { 62 try { 63 sharkAss.set_assignee(new WfResourceHelper(new_value.resource_key())); 64 } catch (Exception ex) { 65 throw new BaseException(); 66 } 67 } 68 69 public synchronized void set_accepted_status(boolean accept) throws BaseException, 70 CannotAcceptSuspended { 71 try { 72 sharkAss.set_accepted_status(accept); 73 } catch (Exception ex) { 74 throw new BaseException(); 75 } 76 } 77 78 public boolean get_accepted_status() throws BaseException { 79 try { 80 return sharkAss.get_accepted_status(); 81 } catch (Exception ex) { 82 throw new BaseException(); 83 } 84 } 85 86 public boolean equals(Object obj) { 87 if (!(obj instanceof WfAssignment)) return false; 88 WfAssignment ass = (WfAssignment) obj; 89 try { 90 return (ass.activity().key().equals(activity().key()) && ass.assignee() 91 .resource_key() 92 .equals(assignee().resource_key())); 93 } catch (Exception ex) { 94 return false; 95 } 96 } 97 98 public String toString() { 99 return sharkAss.toString(); 100 } 101 102 } 103 104 | Popular Tags |