1 /*
2 Copyright (C) 2007 Grid Systems, S.A.
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 package com.gridsystems.nextgrid.api.pom.ref;
19
20 import nextgrid.api.pom.ProcessException;
21
22 /**
23 * Exceptions thrown when a reference value cannot be casted to the type
24 * required by a process.
25 *
26 * @author Rodrigo Ruiz
27 */
28 public class IncompatibleReferenceException extends ProcessException {
29
30 /**
31 * <code>serialVersionUID</code> attribute.
32 */
33 private static final long serialVersionUID = -9061164531660435730L;
34
35 /**
36 * Reference name.
37 */
38 private final String name;
39
40 /**
41 * Creates a new instance.
42 *
43 * @param name The reference name
44 */
45 public IncompatibleReferenceException(String name) {
46 super("Reference '" + name + "' incompatible with parameter type");
47 this.name = name;
48 }
49
50 /**
51 * Gets the name of the reference that could not be resolved.
52 *
53 * @return The reference name
54 */
55 public String getReferenceName() {
56 return this.name;
57 }
58 }