View Javadoc
1   package ca.uhn.hl7v2.conf.spec.usecase;
2   
3   import java.beans.PropertyVetoException;
4   
5   /**
6    * The use case portion of a conformance specification.  
7    * @author Bryan Tripp
8    */
9   public class UseCase {
10      
11      /** Holds value of property actor. */
12      private Actor actor;
13      
14      /** Utility field used by bound properties. */
15      private final java.beans.PropertyChangeSupport propertyChangeSupport =  new java.beans.PropertyChangeSupport(this);
16      
17      /** Utility field used by constrained properties. */
18      private final java.beans.VetoableChangeSupport vetoableChangeSupport =  new java.beans.VetoableChangeSupport(this);
19      
20      /** Holds value of property preCondition. */
21      private PreCondition preCondition;
22      
23      /** Holds value of property postCondition. */
24      private PostCondition postCondition;
25      
26      /** Holds value of property eventFlow. */
27      private EventFlow eventFlow;
28      
29      /** Holds value of property derivativeEvent. */
30      private DerivativeEvent derivativeEvent;
31      
32      /** Creates a new instance of UseCase */
33      public UseCase() {
34      }
35      
36      /** Adds a PropertyChangeListener to the listener list.
37       * @param l The listener to add.
38       */
39      public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {
40          propertyChangeSupport.addPropertyChangeListener(l);
41      }
42      
43      /** Removes a PropertyChangeListener from the listener list.
44       * @param l The listener to remove.
45       */
46      public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
47          propertyChangeSupport.removePropertyChangeListener(l);
48      }
49      
50      /** Adds a VetoableChangeListener to the listener list.
51       * @param l The listener to add.
52       */
53      public void addVetoableChangeListener(java.beans.VetoableChangeListener l) {
54          vetoableChangeSupport.addVetoableChangeListener(l);
55      }
56      
57      /** Removes a VetoableChangeListener from the listener list.
58       * @param l The listener to remove.
59       */
60      public void removeVetoableChangeListener(java.beans.VetoableChangeListener l) {
61          vetoableChangeSupport.removeVetoableChangeListener(l);
62      }
63      
64      /** Getter for property actor.
65       * @return Value of property actor.
66       */
67      public Actor getActor() {
68          return this.actor;
69      }
70      
71      /** Setter for property actor.
72       * @param actor New value of property actor.
73       *
74       * @throws PropertyVetoException
75       */
76      public void setActor(Actor actor) throws PropertyVetoException {
77          Actor oldActor = this.actor;
78          vetoableChangeSupport.fireVetoableChange("actor", oldActor, actor);
79          this.actor = actor;
80          propertyChangeSupport.firePropertyChange("actor", oldActor, actor);
81      }
82      
83      /** Getter for property preCondition.
84       * @return Value of property preCondition.
85       */
86      public PreCondition getPreCondition() {
87          return this.preCondition;
88      }
89      
90      /** Setter for property preCondition.
91       * @param preCondition New value of property preCondition.
92       *
93       * @throws PropertyVetoException
94       */
95      public void setPreCondition(PreCondition preCondition) throws PropertyVetoException {
96          PreCondition oldPreCondition = this.preCondition;
97          vetoableChangeSupport.fireVetoableChange("preCondition", oldPreCondition, preCondition);
98          this.preCondition = preCondition;
99          propertyChangeSupport.firePropertyChange("preCondition", oldPreCondition, preCondition);
100     }
101     
102     /** Getter for property postCondition.
103      * @return Value of property postCondition.
104      */
105     public PostCondition getPostCondition() {
106         return this.postCondition;
107     }
108     
109     /** Setter for property postCondition.
110      * @param postCondition New value of property postCondition.
111      *
112      * @throws PropertyVetoException
113      */
114     public void setPostCondition(PostCondition postCondition) throws PropertyVetoException {
115         PostCondition oldPostCondition = this.postCondition;
116         vetoableChangeSupport.fireVetoableChange("postCondition", oldPostCondition, postCondition);
117         this.postCondition = postCondition;
118         propertyChangeSupport.firePropertyChange("postCondition", oldPostCondition, postCondition);
119     }
120     
121     /** Getter for property eventFlow.
122      * @return Value of property eventFlow.
123      */
124     public EventFlow getEventFlow() {
125         return this.eventFlow;
126     }
127     
128     /** Setter for property eventFlow.
129      * @param eventFlow New value of property eventFlow.
130      *
131      * @throws PropertyVetoException
132      */
133     public void setEventFlow(EventFlow eventFlow) throws PropertyVetoException {
134         EventFlow oldEventFlow = this.eventFlow;
135         vetoableChangeSupport.fireVetoableChange("eventFlow", oldEventFlow, eventFlow);
136         this.eventFlow = eventFlow;
137         propertyChangeSupport.firePropertyChange("eventFlow", oldEventFlow, eventFlow);
138     }
139     
140     /** Getter for property derivativeEvent.
141      * @return Value of property derivativeEvent.
142      */
143     public DerivativeEvent getDerivativeEvent() {
144         return this.derivativeEvent;
145     }
146     
147     /** Setter for property derivativeEvent.
148      * @param derivativeEvent New value of property derivativeEvent.
149      *
150      * @throws PropertyVetoException
151      */
152     public void setDerivativeEvent(DerivativeEvent derivativeEvent) throws PropertyVetoException {
153         DerivativeEvent oldDerivativeEvent = this.derivativeEvent;
154         vetoableChangeSupport.fireVetoableChange("derivativeEvent", oldDerivativeEvent, derivativeEvent);
155         this.derivativeEvent = derivativeEvent;
156         propertyChangeSupport.firePropertyChange("derivativeEvent", oldDerivativeEvent, derivativeEvent);
157     }
158     
159 }