KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > xquark > xml > xdbc > Configurable


1 /*
2  * This file belongs to the XQuark distribution.
3  * Copyright (C) 2003 Universite de Versailles Saint-Quentin.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307.
18  * You can also get it at http://www.gnu.org/licenses/lgpl.html
19  *
20  * For more information on this software, see http://www.xquark.org.
21  */

22
23 package org.xquark.xml.xdbc;
24
25 /**
26  * This interface provides setters and getters for metadata (features or properties) associated to an object.
27  * The set of supported features and properties depends on vendors implementation.<BR>
28  * For some objects, some configuration data may not be changed after the object creation.<BR>
29  * An XMLDBCNotRecognizedException or XMLDBCNotSupportedException will be thrown if an object does not
30  * support a metadata method.<BR><BR>
31  */

32 public interface Configurable {
33  
34
35
36     //*************************** Features/properties management:
37

38     /**
39      * Set the state of a configuration feature.
40      * @param featureId The unique identifier (URI) of the feature.
41      * @param state The requested state of the feature (true or false).
42      * @throws XMLDBCNotRecognizedException if feature does not exist for this object.
43      * @throws XMLDBCNotSupportedException if state for the feature is not supported by this object.
44      */

45     public void setFeature(String JavaDoc featureId, boolean state) throws XMLDBCNotRecognizedException,
46         XMLDBCNotSupportedException;
47
48     /**
49      * Get the state of a configuration feature.
50      * @param featureId The unique identifier (URI) of the feature to get.
51      * @return the state of a configuration feature.
52      * @throws XMLDBCNotRecognizedException if feature does not exist for this object.
53      */

54     public boolean getFeature(String JavaDoc featureId) throws XMLDBCNotRecognizedException;
55
56     /**
57      * Get the list of supported configuration features
58      * @return the array of supported feature names
59      */

60     
61     public String JavaDoc[] getFeatureList();
62     
63     /**
64      * Set the state of a configuration property.
65      * @param propertyId The unique identifier (URI) of the property.
66      * @param value The requested value of the property (can be null).
67      * @throws XMLDBCNotRecognizedException if property does not exist for this driver.
68      * @throws XMLDBCNotSupportedException if value for the property is not supported by this object.
69      */

70     public void setProperty(String JavaDoc propertyId, Object JavaDoc value) throws XMLDBCNotRecognizedException,
71         XMLDBCNotSupportedException;
72
73     /**
74      * Get the value of a configuration property (only properties set in this configuration).
75      * @param propertyId The unique identifier (URI) of the feature to get.
76      * @return the value of the specified property (can be null).
77      * @throws XMLDBCNotRecognizedException if property does not exist for this object.
78      */

79     public Object JavaDoc getProperty(String JavaDoc propertyId) throws XMLDBCNotRecognizedException;
80
81     /**
82      * Get the list of supported properties
83      * @return the array of supported property names
84      */

85     
86     public String JavaDoc[] getPropertyList();
87     
88 }
89
90
Popular Tags