View Javadoc

1   /*
2    * $Id: ThrowImpl.java,v 1.1 2004/12/15 14:18:13 patforna Exp $
3    *
4    * Copyright (c) 2004 Patric Fornasier, Pawel Kowalski
5    * Berne University of Applied Sciences
6    * School of Engineering and Information Technology
7    * All rights reserved.
8    */
9   package bexee.model.activity.impl;
10  
11  import org.apache.xml.utils.QName;
12  
13  import bexee.core.ProcessController;
14  import bexee.core.ProcessInstance;
15  import bexee.model.BPELElementVisitor;
16  import bexee.model.StandardAttributes;
17  import bexee.model.activity.Throw;
18  import bexee.model.elements.Variable;
19  
20  /***
21   * Default implementation of the <code>Throw</code> activity.
22   * 
23   * @version $Revision: 1.1 $, $Date: 2004/12/15 14:18:13 $
24   * @author Patric Fornasier
25   * @author Pawel Kowalski
26   */
27  public class ThrowImpl extends AbstractActivity implements Throw {
28  
29      private QName faultName = null;
30  
31      private Variable variable = null;
32  
33      //***************************************************/
34      // c'tors
35      //***************************************************/
36  
37      public ThrowImpl() {
38          this(null);
39      }
40  
41      public ThrowImpl(StandardAttributes standardAttributes) {
42          super(standardAttributes);
43      }
44  
45      //***************************************************/
46      // bexee.model.activity.Throw
47      //***************************************************/
48  
49      public void setFaultName(QName faultName) {
50          this.faultName = faultName;
51      }
52  
53      public QName getFaultName() {
54          return faultName;
55      }
56  
57      public void setFaultVariable(Variable variable) {
58          this.variable = variable;
59      }
60  
61      public Variable getFaultVariable() {
62          return variable;
63      }
64  
65      //***************************************************/
66      // bexee.core.BPELElement
67      //***************************************************/
68  
69      public void accept(ProcessController controller, ProcessInstance instance)
70              throws Exception {
71          controller.process(this, instance);
72      }
73  
74      public void accept(BPELElementVisitor elementVisitor) {
75          elementVisitor.visit(this);
76      }
77  }