01: /*
02: * $Id: BPELProcessImpl.java,v 1.22 2004/12/09 08:42:15 kowap Exp $
03: *
04: * Copyright (c) 2004 Patric Fornasier, Pawel Kowalski
05: * Berne University of Applied Sciences
06: * School of Engineering and Information Technology
07: * All rights reserved.
08: */
09: package bexee.model.process.impl;
10:
11: import java.util.ArrayList;
12: import java.util.List;
13:
14: import javax.wsdl.Definition;
15:
16: import bexee.model.FindCreateReceivesVisitor;
17: import bexee.model.process.BPELProcess;
18: import bexee.model.process.Process;
19:
20: /**
21: * A default implementation of a <code>BPELProcess</code>.
22: *
23: * @version $Revision: 1.22 $, $Date: 2004/12/09 08:42:15 $
24: * @author Patric Fornasier
25: * @author Pawel Kowalski
26: */
27: public class BPELProcessImpl implements BPELProcess {
28:
29: private Process process;
30:
31: private List creationReceives;
32:
33: private Definition wsdl;
34:
35: private List partnerWSDL;
36:
37: private boolean synchronous;
38:
39: public BPELProcessImpl() {
40: partnerWSDL = new ArrayList();
41: }
42:
43: public void setProcess(Process process) {
44: this .process = process;
45: }
46:
47: public Process getProcess() {
48: return process;
49: }
50:
51: public List getCreationReceives() {
52: if (creationReceives == null) {
53: FindCreateReceivesVisitor findReceives = new FindCreateReceivesVisitor();
54: process.accept(findReceives);
55: creationReceives = findReceives.getCreationReceives();
56: }
57: return creationReceives;
58: }
59:
60: public boolean isSynchronous() {
61: return synchronous;
62: }
63:
64: public void setWSDL(Definition definition) {
65: wsdl = definition;
66: }
67:
68: public void addPartnerWSDL(Definition wsdl) {
69: partnerWSDL.add(wsdl);
70: }
71:
72: public void addPartnerWSDL(List wsdl) {
73: partnerWSDL.addAll(wsdl);
74: }
75:
76: public List getPartnerWSDL() {
77: return partnerWSDL;
78: }
79:
80: public Definition getWSDL() {
81: return wsdl;
82: }
83:
84: public void setSynchronous(boolean synchronous) {
85: this .synchronous = synchronous;
86:
87: }
88:
89: public String getName() {
90: return (process == null) ? null : process.getName();
91: }
92: }
|