1 package org.enhydra.shark.corba.poa; 2 3 import org.omg.WfBase.*; 4 import org.omg.WorkflowModel.WfAssignment; 5 import org.omg.WorkflowModel.WfAssignmentIteratorPOA; 6 import org.omg.WorkflowModel.WfEventAuditIteratorHelper; 7 import org.omg.WorkflowModel.WfAssignmentHelper; 8 import org.omg.CORBA.ORB ; 9 import org.omg.CORBA.ORBPackage.InvalidName ; 10 import org.omg.PortableServer.POA ; 11 import org.omg.PortableServer.POAHelper ; 12 import org.omg.PortableServer.POAPackage.ServantAlreadyActive ; 13 import org.omg.PortableServer.POAPackage.WrongPolicy ; 14 import org.omg.PortableServer.POAPackage.ServantNotActive ; 15 import org.enhydra.shark.corba.poa.Collective; 16 import org.enhydra.shark.corba.poa.SharkCORBAUtilities; 17 import org.enhydra.shark.corba.poa.WfAssignmentCORBA; 18 19 25 public class WfAssignmentIteratorCORBA extends WfAssignmentIteratorPOA { 26 28 org.enhydra.shark.api.client.wfmodel.WfAssignmentIterator myIterator; 29 private Collective __collective; 30 private ORB orb; 31 32 protected WfAssignmentIteratorCORBA(ORB orb, Collective toJoin, 33 org.enhydra.shark.api.client.wfmodel.WfAssignmentIterator iter) throws BaseException { 34 __collective = toJoin; 35 this.orb = orb; 36 37 this.myIterator = iter; 39 } 40 41 public String query_expression() throws BaseException { 42 try { 43 return myIterator.query_expression(); 44 } catch (Exception ex) { 45 throw new BaseException(); 46 } 47 } 48 49 public void set_query_expression(String query) throws BaseException, 50 InvalidQuery { 51 try { 52 myIterator.set_query_expression(query); 53 } catch (org.enhydra.shark.api.client.wfbase.InvalidQuery iq) { 54 throw new InvalidQuery(); 55 } catch (Exception ex) { 56 throw new BaseException(); 57 } 58 } 59 60 public NameValue[] names_in_expression() throws BaseException { 61 try { 62 return SharkCORBAUtilities.makeCORBANameValueArray(orb, myIterator.names_in_expression()); 63 } catch (Exception ex) { 64 throw new BaseException(); 65 } 66 } 67 68 public void set_names_in_expression(NameValue[] query) throws BaseException, 69 NameMismatch { 70 try { 71 myIterator.set_names_in_expression(SharkCORBAUtilities.makeMap(query)); 72 } catch (org.enhydra.shark.api.client.wfbase.NameMismatch nm) { 73 throw new NameMismatch(); 74 } catch (Exception ex) { 75 throw new BaseException(); 76 } 77 } 78 79 public String query_grammar() throws BaseException { 80 try { 81 return myIterator.query_grammar(); 82 } catch (Exception ex) { 83 throw new BaseException(); 84 } 85 } 86 87 public void set_query_grammar(String query_grammmar) throws BaseException, 88 GrammarNotSupported { 89 try { 90 myIterator.set_query_grammar(query_grammmar); 91 } catch (org.enhydra.shark.api.client.wfbase.GrammarNotSupported gns) { 92 throw new GrammarNotSupported(); 93 } catch (Exception ex) { 94 throw new BaseException(); 95 } 96 } 97 98 public int how_many() throws BaseException { 99 try { 100 return myIterator.how_many(); 101 } catch (Exception ex) { 102 throw new BaseException(); 103 } 104 } 105 106 public void goto_start() throws BaseException { 107 try { 108 myIterator.goto_start(); 109 } catch (Exception ex) { 110 throw new BaseException(); 111 } 112 } 113 114 public void goto_end() throws BaseException { 115 try { 116 myIterator.goto_end(); 117 } catch (Exception ex) { 118 throw new BaseException(); 119 } 120 } 121 122 public WfAssignment get_next_object() throws BaseException { 123 try { 124 WfAssignment assign = SharkCORBAUtilities.makeWfAssignment(new WfAssignmentCORBA(orb, __collective, myIterator.get_next_object())); 125 __collective.__recruit(assign); 126 return assign; 127 } catch (Exception ex) { 128 throw new BaseException(); 129 } 130 } 131 132 public WfAssignment get_previous_object() throws BaseException { 133 try { 134 WfAssignment assign = SharkCORBAUtilities.makeWfAssignment( new WfAssignmentCORBA(orb, __collective, 135 myIterator.get_previous_object())); 136 __collective.__recruit(assign); 137 return assign; 138 } catch (Exception ex) { 139 throw new BaseException(); 140 } 141 } 142 143 public WfAssignment[] get_next_n_sequence(int max_number) throws BaseException { 144 try { 145 return SharkCORBAUtilities.makeCORBAAssignments(__collective, 146 myIterator.get_next_n_sequence(max_number)); 147 } catch (Exception ex) { 148 throw new BaseException(); 149 } 150 } 151 152 public WfAssignment[] get_previous_n_sequence(int max_number) throws BaseException { 153 try { 154 return SharkCORBAUtilities.makeCORBAAssignments(__collective, 155 myIterator.get_previous_n_sequence(max_number)); 156 } catch (Exception ex) { 157 throw new BaseException(); 158 } 159 } 160 161 } | Popular Tags |