KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.corba.poa;
2
3 import org.omg.TimeBase.*;
4 import org.omg.WfBase.*;
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
16 /**
17  * WfDataEventAuditImpl - Workflow Event Audit implementation
18  */

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