01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2003-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library 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 GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.data;
17:
18: import java.io.IOException;
19:
20: /**
21: * Indicates a lock contention, and attempt was made to modify or aquire with
22: * out Authroization.
23: *
24: * @author Jody Garnett, Refractions Research
25: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/main/src/main/java/org/geotools/data/FeatureLockException.java $
26: */
27: public class FeatureLockException extends IOException {
28: private static final long serialVersionUID = 1L;
29: String featureID;
30:
31: public FeatureLockException() {
32: super ();
33: featureID = null;
34: }
35:
36: public FeatureLockException(String message) {
37: super (message);
38: featureID = null;
39: }
40:
41: public FeatureLockException(String message, String featureID) {
42: super (message);
43: this .featureID = featureID;
44: }
45:
46: public FeatureLockException(String message, Throwable t) {
47: this (message, null, t);
48: }
49:
50: public FeatureLockException(String message, String featureID,
51: Throwable t) {
52: super (message);
53: initCause(t);
54: this .featureID = featureID;
55: }
56:
57: /**
58: * Query FeatureID the LockException was recorded against, if known.
59: *
60: * @return FeatureID or <code>null</code> if unknown.
61: */
62: public String getFeatureID() {
63: return featureID;
64: }
65: }
|