KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > resource > spi > InvalidPropertyException


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package javax.resource.spi;
25
26 import java.beans.PropertyDescriptor JavaDoc;
27
28 /**
29  * This exception is thrown to indicate invalid configuration
30  * property settings.
31  *
32  * @version 0.2
33  * @author Ram Jeyaraman
34  */

35 public class InvalidPropertyException
36         extends javax.resource.ResourceException JavaDoc {
37
38     /*
39      * Holder for invalid properties.
40      */

41     private PropertyDescriptor JavaDoc[] invalidProperties;
42
43     /**
44      * Create a InvalidPropertyException.
45      */

46     public InvalidPropertyException() {
47     super();
48     }
49
50     /**
51      * Create a InvalidPropertyException.
52      *
53      * @param message a description of the exception
54      */

55     public InvalidPropertyException(String JavaDoc message) {
56     super(message);
57     }
58
59     /**
60      * Constructs a new throwable with the specified cause.
61      *
62      * @param cause a chained exception of type <code>Throwable</code>.
63      */

64     public InvalidPropertyException(Throwable JavaDoc cause) {
65     super(cause);
66     }
67
68     /**
69      * Constructs a new throwable with the specified detail message and cause.
70      *
71      * @param message the detail message.
72      *
73      * @param cause a chained exception of type <code>Throwable</code>.
74      */

75     public InvalidPropertyException(String JavaDoc message, Throwable JavaDoc cause) {
76     super(message, cause);
77     }
78
79     /**
80      * Constructs a new throwable with the specified detail message and
81      * an error code.
82      *
83      * @param message a description of the exception.
84      * @param errorCode a string specifying the vendor specific error code.
85      */

86     public InvalidPropertyException(String JavaDoc message, String JavaDoc errorCode) {
87     super(message, errorCode);
88     }
89
90     /**
91      * Set a list of invalid properties.
92      */

93     public void setInvalidPropertyDescriptors(
94             PropertyDescriptor JavaDoc[] invalidProperties) {
95     this.invalidProperties = invalidProperties;
96     }
97
98     /**
99      * Get the list of invalid properties.
100      */

101     public PropertyDescriptor JavaDoc[] getInvalidPropertyDescriptors() {
102         return this.invalidProperties;
103     }
104 }
105
Popular Tags