001package ca.uhn.hl7v2.conf.spec.usecase;
002
003/**
004 * The use case portion of a conformance specification.  
005 * @author Bryan Tripp
006 */
007public class UseCase {
008    
009    /** Holds value of property actor. */
010    private Actor actor;
011    
012    /** Utility field used by bound properties. */
013    private java.beans.PropertyChangeSupport propertyChangeSupport =  new java.beans.PropertyChangeSupport(this);
014    
015    /** Utility field used by constrained properties. */
016    private java.beans.VetoableChangeSupport vetoableChangeSupport =  new java.beans.VetoableChangeSupport(this);
017    
018    /** Holds value of property preCondition. */
019    private PreCondition preCondition;
020    
021    /** Holds value of property postCondition. */
022    private PostCondition postCondition;
023    
024    /** Holds value of property eventFlow. */
025    private EventFlow eventFlow;
026    
027    /** Holds value of property derivativeEvent. */
028    private DerivativeEvent derivativeEvent;
029    
030    /** Creates a new instance of UseCase */
031    public UseCase() {
032    }
033    
034    /** Adds a PropertyChangeListener to the listener list.
035     * @param l The listener to add.
036     */
037    public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {
038        propertyChangeSupport.addPropertyChangeListener(l);
039    }
040    
041    /** Removes a PropertyChangeListener from the listener list.
042     * @param l The listener to remove.
043     */
044    public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
045        propertyChangeSupport.removePropertyChangeListener(l);
046    }
047    
048    /** Adds a VetoableChangeListener to the listener list.
049     * @param l The listener to add.
050     */
051    public void addVetoableChangeListener(java.beans.VetoableChangeListener l) {
052        vetoableChangeSupport.addVetoableChangeListener(l);
053    }
054    
055    /** Removes a VetoableChangeListener from the listener list.
056     * @param l The listener to remove.
057     */
058    public void removeVetoableChangeListener(java.beans.VetoableChangeListener l) {
059        vetoableChangeSupport.removeVetoableChangeListener(l);
060    }
061    
062    /** Getter for property actor.
063     * @return Value of property actor.
064     */
065    public Actor getActor() {
066        return this.actor;
067    }
068    
069    /** Setter for property actor.
070     * @param actor New value of property actor.
071     *
072     * @throws PropertyVetoException
073     */
074    public void setActor(Actor actor) throws java.beans.PropertyVetoException {
075        Actor oldActor = this.actor;
076        vetoableChangeSupport.fireVetoableChange("actor", oldActor, actor);
077        this.actor = actor;
078        propertyChangeSupport.firePropertyChange("actor", oldActor, actor);
079    }
080    
081    /** Getter for property preCondition.
082     * @return Value of property preCondition.
083     */
084    public PreCondition getPreCondition() {
085        return this.preCondition;
086    }
087    
088    /** Setter for property preCondition.
089     * @param preCondition New value of property preCondition.
090     *
091     * @throws PropertyVetoException
092     */
093    public void setPreCondition(PreCondition preCondition) throws java.beans.PropertyVetoException {
094        PreCondition oldPreCondition = this.preCondition;
095        vetoableChangeSupport.fireVetoableChange("preCondition", oldPreCondition, preCondition);
096        this.preCondition = preCondition;
097        propertyChangeSupport.firePropertyChange("preCondition", oldPreCondition, preCondition);
098    }
099    
100    /** Getter for property postCondition.
101     * @return Value of property postCondition.
102     */
103    public PostCondition getPostCondition() {
104        return this.postCondition;
105    }
106    
107    /** Setter for property postCondition.
108     * @param postCondition New value of property postCondition.
109     *
110     * @throws PropertyVetoException
111     */
112    public void setPostCondition(PostCondition postCondition) throws java.beans.PropertyVetoException {
113        PostCondition oldPostCondition = this.postCondition;
114        vetoableChangeSupport.fireVetoableChange("postCondition", oldPostCondition, postCondition);
115        this.postCondition = postCondition;
116        propertyChangeSupport.firePropertyChange("postCondition", oldPostCondition, postCondition);
117    }
118    
119    /** Getter for property eventFlow.
120     * @return Value of property eventFlow.
121     */
122    public EventFlow getEventFlow() {
123        return this.eventFlow;
124    }
125    
126    /** Setter for property eventFlow.
127     * @param eventFlow New value of property eventFlow.
128     *
129     * @throws PropertyVetoException
130     */
131    public void setEventFlow(EventFlow eventFlow) throws java.beans.PropertyVetoException {
132        EventFlow oldEventFlow = this.eventFlow;
133        vetoableChangeSupport.fireVetoableChange("eventFlow", oldEventFlow, eventFlow);
134        this.eventFlow = eventFlow;
135        propertyChangeSupport.firePropertyChange("eventFlow", oldEventFlow, eventFlow);
136    }
137    
138    /** Getter for property derivativeEvent.
139     * @return Value of property derivativeEvent.
140     */
141    public DerivativeEvent getDerivativeEvent() {
142        return this.derivativeEvent;
143    }
144    
145    /** Setter for property derivativeEvent.
146     * @param derivativeEvent New value of property derivativeEvent.
147     *
148     * @throws PropertyVetoException
149     */
150    public void setDerivativeEvent(DerivativeEvent derivativeEvent) throws java.beans.PropertyVetoException {
151        DerivativeEvent oldDerivativeEvent = this.derivativeEvent;
152        vetoableChangeSupport.fireVetoableChange("derivativeEvent", oldDerivativeEvent, derivativeEvent);
153        this.derivativeEvent = derivativeEvent;
154        propertyChangeSupport.firePropertyChange("derivativeEvent", oldDerivativeEvent, derivativeEvent);
155    }
156    
157}