KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > corba > poa > WfEventAuditIteratorCORBA


1 package org.enhydra.shark.corba.poa;
2
3 import org.omg.WfBase.*;
4 import org.omg.WorkflowModel.WfEventAudit;
5 import org.omg.WorkflowModel.WfEventAuditIteratorPOA;
6 import org.omg.CORBA.ORB JavaDoc;
7 import org.enhydra.shark.corba.poa.Collective;
8 import org.enhydra.shark.corba.poa.SharkCORBAUtilities;
9
10 /**
11  * Iterator for event audits of activity or the process.
12  *
13  * @author David Forslund
14  * @version 1.0
15  */

16 public class WfEventAuditIteratorCORBA extends WfEventAuditIteratorPOA {
17
18    org.enhydra.shark.api.client.wfmodel.WfEventAuditIterator myIterator;
19    private Collective __collective;
20     private ORB JavaDoc orb;
21
22
23    protected WfEventAuditIteratorCORBA(ORB JavaDoc orb, Collective toJoin, org.enhydra.shark.api.client.wfmodel.WfEventAuditIterator iter) throws BaseException {
24       __collective = toJoin;
25
26       this.orb = orb;
27     // toJoin.__recruit(this);
28
this.myIterator = iter;
29    }
30
31    public String JavaDoc query_expression() throws BaseException {
32       try {
33          return myIterator.query_expression();
34       } catch (Exception JavaDoc ex) {
35          throw new BaseException();
36       }
37    }
38
39    /*
40     * The following names may be used: time_stamp, event_type,
41     * activity_key, activity_name, process_key, process_name,
42     * process_mgr_name, package_id process_mgr_version.
43     */

44    public void set_query_expression(String JavaDoc query) throws BaseException,
45                                                  InvalidQuery {
46       try {
47          myIterator.set_query_expression(query);
48       } catch (org.enhydra.shark.api.client.wfbase.InvalidQuery iq) {
49          throw new InvalidQuery();
50       } catch (Exception JavaDoc ex) {
51          throw new BaseException();
52       }
53    }
54
55    public NameValue[] names_in_expression() throws BaseException {
56       try {
57          return SharkCORBAUtilities.makeCORBANameValueArray(orb,
58                                                             myIterator.names_in_expression());
59       } catch (Exception JavaDoc ex) {
60          throw new BaseException();
61       }
62    }
63
64    public void set_names_in_expression(NameValue[] query) throws BaseException,
65                                                          NameMismatch {
66       try {
67          myIterator.set_names_in_expression(SharkCORBAUtilities.makeMap(query));
68       } catch (org.enhydra.shark.api.client.wfbase.NameMismatch nm) {
69          throw new NameMismatch();
70       } catch (Exception JavaDoc ex) {
71          throw new BaseException();
72       }
73    }
74
75    public String JavaDoc query_grammar() throws BaseException {
76       try {
77          return myIterator.query_grammar();
78       } catch (Exception JavaDoc ex) {
79          throw new BaseException();
80       }
81    }
82
83    public void set_query_grammar(String JavaDoc query_grammmar) throws BaseException,
84                                                        GrammarNotSupported {
85       try {
86          myIterator.set_query_grammar(query_grammmar);
87       } catch (org.enhydra.shark.api.client.wfbase.GrammarNotSupported gns) {
88          throw new GrammarNotSupported();
89       } catch (Exception JavaDoc ex) {
90          throw new BaseException();
91       }
92    }
93
94    public int how_many() throws BaseException {
95       try {
96          return myIterator.how_many();
97       } catch (Exception JavaDoc ex) {
98          throw new BaseException();
99       }
100    }
101
102    public void goto_start() throws BaseException {
103       try {
104          myIterator.goto_start();
105       } catch (Exception JavaDoc ex) {
106          throw new BaseException();
107       }
108    }
109
110    public void goto_end() throws BaseException {
111       try {
112          myIterator.goto_end();
113       } catch (Exception JavaDoc ex) {
114          throw new BaseException();
115       }
116    }
117
118    public WfEventAudit get_next_object() throws BaseException {
119       try {
120          WfEventAudit audit = SharkCORBAUtilities.makeCORBAEventAudit(__collective, myIterator.get_next_object());
121          __collective.__recruit(audit);
122           return audit;
123       } catch (Exception JavaDoc ex) {
124          throw new BaseException();
125       }
126    }
127
128    public WfEventAudit get_previous_object() throws BaseException {
129       try {
130          WfEventAudit audit = SharkCORBAUtilities.makeCORBAEventAudit(__collective, myIterator.get_previous_object());
131          __collective.__recruit(audit);
132           return audit;
133       } catch (Exception JavaDoc ex) {
134          throw new BaseException();
135       }
136    }
137
138    public WfEventAudit[] get_next_n_sequence(int max_number) throws BaseException {
139       try {
140          return SharkCORBAUtilities.makeCORBAEventAudits(__collective, myIterator.get_next_n_sequence(max_number));
141       } catch (Exception JavaDoc ex) {
142          throw new BaseException();
143       }
144    }
145
146    public WfEventAudit[] get_previous_n_sequence(int max_number) throws BaseException {
147       try {
148          return SharkCORBAUtilities.makeCORBAEventAudits(__collective, myIterator.get_previous_n_sequence(max_number));
149       } catch (Exception JavaDoc ex) {
150          throw new BaseException();
151       }
152    }
153
154 }
Popular Tags