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