01: /*
02: * This file is part of the WfMOpen project.
03: * Copyright (C) 2001-2003 Danet GmbH (www.danet.de), GS-AN.
04: * All rights reserved.
05: *
06: * This program is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU General Public License as published by
08: * the Free Software Foundation; either version 2 of the License, or
09: * (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: *
20: * $Id: ImportException.java,v 1.2 2006/09/29 12:32:07 drmlipp Exp $
21: *
22: * $Log: ImportException.java,v $
23: * Revision 1.2 2006/09/29 12:32:07 drmlipp
24: * Consistently using WfMOpen as projct name now.
25: *
26: * Revision 1.1.1.1 2003/06/30 20:05:13 drmlipp
27: * Initial import
28: *
29: * Revision 1.7 2003/06/27 08:51:46 lipp
30: * Fixed copyright/license information.
31: *
32: * Revision 1.6 2003/04/25 14:50:59 lipp
33: * Fixed javadoc errors and warnings.
34: *
35: * Revision 1.5 2003/02/08 13:15:35 lipp
36: * Fixed comment.
37: *
38: * Revision 1.4 2002/12/04 10:28:22 huaiyang
39: * Remove the methods of getErrors/-FatalErrors
40: *
41: * Revision 1.3 2002/12/03 13:46:08 huaiyang
42: * Use the list of prioritized message in the constructor.
43: *
44: * Revision 1.2 2002/12/02 15:58:45 huaiyang
45: * New constructors.
46: *
47: * Revision 1.1 2002/12/02 13:51:44 huaiyang
48: * Initial.
49: *
50: */
51: package de.danet.an.workflow.api;
52:
53: import java.io.Serializable;
54:
55: import java.util.List;
56:
57: /**
58: * This exception is thrown by the
59: * {@link ProcessDefinitionDirectory#importProcessDefinitions
60: * <code>importProcessDefinitions</code>} method of
61: * <code>ProcessDefinitionDirectory</code> and results from collected
62: * errors.
63: */
64:
65: public class ImportException extends Exception implements Serializable {
66:
67: private List messages = null;
68:
69: /**
70: * Construct a <code>ImportException</code> from a collecting error
71: * handler. The warnings, errors, fatal error of the Exception are
72: * taken from the error handler.
73: * @param msg the main message of the exception.
74: * @param prioritizedMessages the given prioritized messages.
75: */
76: public ImportException(String msg, List prioritizedMessages) {
77: super (msg);
78: this .messages = prioritizedMessages;
79: }
80:
81: /**
82: * Return all messages, i.e. warnings, errors and fatal
83: * errors. The value returned is a list of {@link
84: * PrioritizedMessage <code>PrioritizedMessage</code>}.
85: * @return list with error messages (may be empty).
86: */
87: public List messages() {
88: return messages;
89: }
90: }
|