KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > iapi > reference > Attribute


1 /*
2
3    Derby - Class org.apache.derby.iapi.reference.Attribute
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to you under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.iapi.reference;
23
24
25 /**
26     List of all connection (JDBC) attributes by the system.
27
28
29     <P>
30     This class exists for two reasons
31     <Ol>
32     <LI> To act as the internal documentation for the attributes.
33     <LI> To remove the need to declare a java static field for the attributes
34     name in the protocol/implementation class. This reduces the footprint as
35     the string is final and thus can be included simply as a String constant pool entry.
36     </OL>
37     <P>
38     This class should not be shipped with the product.
39
40     <P>
41     This class has no methods, all it contains are String's which by
42     are public, static and final since they are declared in an interface.
43     
44     <P>
45     At some point this class should be replaced by
46     org.apache.derby.shared.common.reference.Attribute.
47     The issue is that this class is used by ij to check attributes,
48     ij uses reflection on this class to get the list of valid attributes.
49     The expanded class in shared has the client attributes as well.
50     Ideally ij would work of an explicit list of attributes and not
51     infer the set from reflection. See DERBY-1151
52 */

53
54 public interface Attribute {
55
56     /**
57         Not an attribute but the root for the JDBC URL that Derby supports.
58     */

59     String JavaDoc PROTOCOL = "jdbc:derby:";
60         
61     /**
62      * The SQLJ protocol for getting the default connection
63      * for server side jdbc
64      */

65     String JavaDoc SQLJ_NESTED = "jdbc:default:connection";
66
67     
68     // Network Protocols. These need to be rejected by the embedded driver.
69

70     /**
71      * The protocol for Derby Network Client
72      */

73     String JavaDoc DNC_PROTOCOL = "jdbc:derby://";
74     
75     /**
76      * The protocol for the IBM Universal JDBC Driver
77      *
78      */

79     String JavaDoc JCC_PROTOCOL = "jdbc:derby:net:";
80     
81     
82     /**
83         Attribute name to encrypt the database on disk.
84         If set to true, all user data is stored encrypted on disk.
85      */

86     String JavaDoc DATA_ENCRYPTION = "dataEncryption";
87
88     /**
89         If dataEncryption is true, use this attribute to pass in the
90         secret key. The secret key must be at least 8 characters long.
91         This key must not be stored persistently in cleartext anywhere.
92      */

93
94     String JavaDoc BOOT_PASSWORD = "bootPassword";
95
96     /**
97         The attribute that is used to chage the secret key of an encrypted
98         database. The secret key must be at least 8 characters long.
99         This key must not be stored persistently in cleartext anywhere.
100      */

101
102     String JavaDoc NEW_BOOT_PASSWORD = "newBootPassword";
103
104
105
106     /**
107         The attribute that is used for the database name, from
108         the JDBC notion of jdbc:<subprotocol>:<subname>
109     */

110     String JavaDoc DBNAME_ATTR = "databaseName";
111
112     /**
113         The attribute that is used to request a shutdown.
114     */

115     String JavaDoc SHUTDOWN_ATTR = "shutdown";
116
117     /**
118         The attribute that is used to request a database create.
119     */

120     String JavaDoc CREATE_ATTR = "create";
121
122     /**
123         The attribute that is used to set the user name.
124     */

125     String JavaDoc USERNAME_ATTR = "user";
126
127
128     /**
129         The attribute that is used to set the user password.
130     */

131     String JavaDoc PASSWORD_ATTR = "password";
132
133
134     /**
135         The attribute that is used to set the connection's DRDA ID.
136     */

137     String JavaDoc DRDAID_ATTR = "drdaID";
138
139     /**
140         The attribute that is used to allow upgrade.
141     */

142     String JavaDoc UPGRADE_ATTR = "upgrade";
143
144     /**
145         Put the log on a different device.
146      */

147     String JavaDoc LOG_DEVICE = "logDevice";
148
149     /**
150         Set the territory for the database.
151     */

152     String JavaDoc TERRITORY = "territory";
153
154     /**
155         Set the collation sequence of the database, currently on IDENTITY
156         will be supported (strings will sort according to binary comparison).
157     */

158     String JavaDoc COLLATE = "collate";
159
160     /**
161         Attribute for encrypting a database.
162         Specifies the cryptographic services provider.
163     */

164     String JavaDoc CRYPTO_PROVIDER = "encryptionProvider";
165
166     /**
167         Attribute for encrypting a database.
168         Specifies the cryptographic algorithm.
169     */

170     String JavaDoc CRYPTO_ALGORITHM = "encryptionAlgorithm";
171
172     /**
173         Attribute for encrypting a database.
174         Specifies the key length in bytes for the specified cryptographic algorithm.
175     */

176     String JavaDoc CRYPTO_KEY_LENGTH = "encryptionKeyLength";
177
178     /**
179         Attribute for encrypting a database.
180         Specifies the actual key. When this is specified
181         all the supplied crypto information is stored
182         external to the database, ie by the application.
183     */

184     String JavaDoc CRYPTO_EXTERNAL_KEY = "encryptionKey";
185
186
187     /**
188         The attribute that is used to chage the encryption
189         key of an encrypted database. When this is specified
190         all the supplied crypto information is stored
191         external to the database, ie by the application.
192     */

193     String JavaDoc NEW_CRYPTO_EXTERNAL_KEY = "newEncryptionKey";
194
195
196     /**
197        One can encrypt the database with an encryption key at create time.
198        For security reasons, this key is not made persistent in the database.
199
200        But it is necessary to verify the encryption key whenever booting the database
201        before we access the data/logs to avoid the risk of corrupting the database because
202        of a wrong encryption key.
203
204        This attribute refers to the name of the file where encrypted data is stored for
205        verification of encryption key.
206      */

207     String JavaDoc CRYPTO_EXTERNAL_KEY_VERIFY_FILE = "verifyKey.dat";
208
209     
210     /**
211      * This attribute is used to request to create a database from backup.
212      * This will throw error if a database with same already exists at the
213      * location where we tring to create.
214      */

215     String JavaDoc CREATE_FROM = "createFrom";
216
217     /**
218      * This attribute is used to request a database restore from backup.
219      * It must be used only when the active database is corrupted,
220      * because it will cleanup the existing database and replace
221      * it from the backup.
222      */

223     String JavaDoc RESTORE_FROM = "restoreFrom";
224
225     /**
226         The attribute that is used to request a roll-forward recovery of the database.
227     */

228     String JavaDoc ROLL_FORWARD_RECOVERY_FROM = "rollForwardRecoveryFrom";
229
230     /**
231      * securityMechanism sets the DRDA mechanism in-use for the client.
232      * Internal only.
233      */

234     String JavaDoc CLIENT_SECURITY_MECHANISM = "securityMechanism";
235
236     /**
237      * Internal attributes. Mainly used by DRDA and Derby BUILTIN
238      * authentication provider in some security mechanism context
239      * (SECMEC_USRSSBPWD).
240      *
241      * DRDA_SECTKN_IN is the random client seed (RDs)
242      * DRDA_SECTKN_OUT is the random server seed (RDr)
243      */

244     String JavaDoc DRDA_SECTKN_IN = "drdaSecTokenIn";
245     String JavaDoc DRDA_SECTKN_OUT = "drdaSecTokenOut";
246 }
247
Popular Tags