KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.corba.poa;
2
3 import org.omg.TimeBase.UtcT;
4 import org.omg.WfBase.BaseException;
5 import org.omg.WorkflowModel.*;
6 import org.omg.CORBA.ORB JavaDoc;
7 import org.omg.PortableServer.POA JavaDoc;
8 import org.omg.PortableServer.POAHelper JavaDoc;
9 import org.omg.PortableServer.POAPackage.ServantAlreadyActive JavaDoc;
10 import org.omg.PortableServer.POAPackage.WrongPolicy JavaDoc;
11 import org.omg.PortableServer.POAPackage.ServantNotActive JavaDoc;
12 import org.enhydra.shark.corba.poa.Collective;
13 import org.enhydra.shark.corba.poa.SharkCORBAUtilities;
14 import org.enhydra.shark.corba.poa.WfActivityCORBA;
15 import org.enhydra.shark.corba.poa.WfProcessCORBA;
16
17 /**
18  * WfStateEventAuditImpl - Workflow Event Audit implementation
19  */

20
21 public class WfStateEventAuditCORBA extends WfStateEventAuditPOA {
22    private org.enhydra.shark.api.client.wfmodel.WfStateEventAudit ea;
23
24    private Collective __collective;
25     private ORB JavaDoc orb;
26
27    protected WfStateEventAuditCORBA(Collective toJoin,
28                                     org.enhydra.shark.api.client.wfmodel.WfStateEventAudit ea) {
29       __collective = toJoin;
30     // toJoin.__recruit(this);
31
this.ea = ea;
32    }
33
34    public WfExecutionObject source() throws BaseException, SourceNotAvailable {
35
36           WfExecutionObject obj = null;
37        try {
38
39          if (ea.source() instanceof org.enhydra.shark.api.client.wfmodel.WfProcess) {
40
41              obj = SharkCORBAUtilities.makeWfProcess( new WfProcessCORBA(orb, __collective,
42                                       (org.enhydra.shark.api.client.wfmodel.WfProcess) ea.source()));
43
44          } else {
45
46             obj = SharkCORBAUtilities.makeWfActivity(new WfActivityCORBA(orb, __collective,
47                                        (org.enhydra.shark.api.client.wfmodel.WfActivity) ea.source()));
48
49          }
50       } catch (org.enhydra.shark.api.client.wfmodel.SourceNotAvailable sna) {
51          throw new SourceNotAvailable();
52       } catch (Exception JavaDoc ex) {
53          throw new BaseException();
54       }
55        __collective.__recruit(obj);
56        return obj;
57
58    }
59
60    public UtcT time_stamp() throws BaseException {
61       try {
62          org.enhydra.shark.api.client.timebase.UtcT t = ea.time_stamp();
63          return new UtcT(t.time, t.inacclo, t.inacchi, t.tdf);
64       } catch (Exception JavaDoc ex) {
65          throw new BaseException();
66       }
67    }
68
69    public String JavaDoc event_type() throws BaseException {
70       try {
71          return ea.event_type();
72       } catch (Exception JavaDoc ex) {
73          throw new BaseException();
74       }
75    }
76
77    public String JavaDoc activity_key() throws BaseException {
78       try {
79          return ea.activity_key();
80       } catch (Exception JavaDoc ex) {
81          throw new BaseException();
82       }
83    }
84
85    public String JavaDoc activity_name() throws BaseException {
86       try {
87          return ea.activity_name();
88       } catch (Exception JavaDoc ex) {
89          throw new BaseException();
90       }
91    }
92
93    public String JavaDoc process_key() throws BaseException {
94       try {
95          return ea.process_key();
96       } catch (Exception JavaDoc ex) {
97          throw new BaseException();
98       }
99    }
100
101    public String JavaDoc process_name() throws BaseException {
102       try {
103          return ea.process_name();
104       } catch (Exception JavaDoc ex) {
105          throw new BaseException();
106       }
107    }
108
109    public String JavaDoc process_mgr_name() throws BaseException {
110       try {
111          return ea.process_mgr_name();
112       } catch (Exception JavaDoc ex) {
113          throw new BaseException();
114       }
115    }
116
117    public String JavaDoc process_mgr_version() throws BaseException {
118       try {
119          return ea.process_mgr_version();
120       } catch (Exception JavaDoc ex) {
121          throw new BaseException();
122       }
123    }
124
125    public String JavaDoc old_state() throws BaseException {
126       try {
127          return ea.old_state();
128       } catch (Exception JavaDoc ex) {
129          throw new BaseException();
130       }
131    }
132
133    public String JavaDoc new_state() throws BaseException {
134       try {
135          return ea.new_state();
136       } catch (Exception JavaDoc ex) {
137          throw new BaseException();
138       }
139    }
140
141 }
Popular Tags