Merge branch 'release/5.19.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / element / CdmPropertyChangeEvent.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.taxeditor.ui.element;
10
11 import org.eclipse.jface.util.PropertyChangeEvent;
12
13 /**
14 * <p>CdmPropertyChangeEvent class.</p>
15 *
16 * @author n.hoffmann
17 * @created Feb 24, 2010
18 * @version 1.0
19 */
20 public class CdmPropertyChangeEvent extends PropertyChangeEvent {
21 /**
22 *
23 */
24 private static final long serialVersionUID = -1010152430827799277L;
25
26 private Object originatingEvent;
27
28 private Exception exception;
29
30 /**
31 * <p>Getter for the field <code>originatingEvent</code>.</p>
32 *
33 * @return a {@link java.lang.Object} object.
34 */
35 public Object getOriginatingEvent() {
36 return originatingEvent;
37 }
38
39 /**
40 * <p>Constructor for CdmPropertyChangeEvent.</p>
41 *
42 * @param eventObject a {@link java.lang.Object} object.
43 * @param originatingEvent a {@link java.lang.Object} object.
44 */
45 public CdmPropertyChangeEvent(Object eventObject, Object originatingEvent) {
46 super(eventObject, "EMPTY", null, null);
47 this.originatingEvent = originatingEvent;
48 }
49
50 /**
51 * <p>Constructor for CdmPropertyChangeEvent.</p>
52 *
53 * @param eventObject a {@link java.lang.Object} object.
54 * @param exception a {@link java.lang.Exception} object.
55 */
56 public CdmPropertyChangeEvent(Object eventObject, Exception exception) {
57 super(eventObject, "EMPTY", null, null);
58 this.exception = exception;
59 }
60
61 /**
62 * <p>Setter for the field <code>exception</code>.</p>
63 *
64 * @param exception a {@link java.lang.Exception} object.
65 */
66 public void setException(Exception exception) {
67 this.exception = exception;
68 }
69
70 /**
71 * <p>Getter for the field <code>exception</code>.</p>
72 *
73 * @return a {@link java.lang.Exception} object.
74 */
75 public Exception getException(){
76 return exception;
77 }
78
79 /**
80 * <p>hasException</p>
81 *
82 * @return a boolean.
83 */
84 public boolean hasException(){
85 return exception != null;
86 }
87 }