3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.forms
;
13 import java
.util
.ArrayList
;
14 import java
.util
.List
;
18 * <p>Abstract AbstractCdmFormElementWithErrors class.</p>
21 * @created Oct 26, 2010
24 public abstract class AbstractCdmFormElementWithErrors
extends AbstractCdmFormElement
implements IErrorIntolerableElement
{
26 private List
<IExceptionHandler
> exceptionHandlers
= new ArrayList
<IExceptionHandler
>();
29 * <p>Constructor for AbstractCdmFormElementWithErrors.</p>
31 * @param formFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object.
32 * @param formElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object.
34 public AbstractCdmFormElementWithErrors(CdmFormFactory formFactory
,
35 ICdmFormElement formElement
) {
36 super(formFactory
, formElement
);
40 * @see eu.etaxonomy.taxeditor.forms.IErrorIntolerableElement#addExceptionHandler(eu.etaxonomy.taxeditor.forms.IExceptionHandler)
44 public void addExceptionHandler(IExceptionHandler handler
) {
45 exceptionHandlers
.add(handler
);
49 * @see eu.etaxonomy.taxeditor.forms.IErrorIntolerableElement#removeExceptionHandler(eu.etaxonomy.taxeditor.forms.IExceptionHandler)
53 public void removeExceptionHandler(IExceptionHandler handler
) {
54 exceptionHandlers
.remove(handler
);
58 * @see eu.etaxonomy.taxeditor.forms.IErrorIntolerableElement#exceptionOccurred()
62 public void exceptionOccurred(CdmPropertyChangeEvent event
) {
63 for(IExceptionHandler handler
: exceptionHandlers
){
64 handler
.handleException(event
);