001: /*
002:
003: Derby - Class org.apache.derby.shared.common.reference.Attribute
004:
005: Licensed to the Apache Software Foundation (ASF) under one or more
006: contributor license agreements. See the NOTICE file distributed with
007: this work for additional information regarding copyright ownership.
008: The ASF licenses this file to you under the Apache License, Version 2.0
009: (the "License"); you may not use this file except in compliance with
010: the License. You may obtain a copy of the License at
011:
012: http://www.apache.org/licenses/LICENSE-2.0
013:
014: Unless required by applicable law or agreed to in writing, software
015: distributed under the License is distributed on an "AS IS" BASIS,
016: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: See the License for the specific language governing permissions and
018: limitations under the License.
019:
020: */
021:
022: package org.apache.derby.shared.common.reference;
023:
024: /**
025: * List of all connection (JDBC) attributes by the system.
026: *
027: *
028: * <P>
029: * This class exists for two reasons
030: * <Ol>
031: * <LI> To act as the internal documentation for the attributes.
032: * <LI> To remove the need to declare a java static field for the attributes
033: * name in the protocol/implementation class. This reduces the footprint as the
034: * string is final and thus can be included simply as a String constant pool
035: * entry.
036: * </OL>
037: * <P>
038: * This class should not be shipped with the product.
039: *
040: * <P>
041: * This class has no methods, all it contains are String's which by are public,
042: * static and final since they are declared in an interface.
043: */
044:
045: public interface Attribute {
046:
047: /**
048: * Not an attribute but the root for the JDBC URL that Derby supports.
049: */
050: String PROTOCOL = "jdbc:derby:";
051:
052: /**
053: * The SQLJ protocol for getting the default connection for server side jdbc
054: */
055: String SQLJ_NESTED = "jdbc:default:connection";
056:
057: // Network Protocols. These need to be rejected by the embedded driver.
058:
059: /**
060: * The protocol for Derby Network Client
061: */
062: String DNC_PROTOCOL = "jdbc:derby://";
063:
064: /**
065: * The protocol for the IBM Universal JDBC Driver
066: *
067: */
068: String JCC_PROTOCOL = "jdbc:derby:net:";
069:
070: /**
071: * Attribute name to encrypt the database on disk. If set to true, all user
072: * data is stored encrypted on disk.
073: */
074: String DATA_ENCRYPTION = "dataEncryption";
075:
076: /**
077: * If dataEncryption is true, use this attribute to pass in the secret key.
078: * The secret key must be at least 8 characters long. This key must not be
079: * stored persistently in cleartext anywhere.
080: */
081:
082: String BOOT_PASSWORD = "bootPassword";
083:
084: /**
085: * The attribute that is used for the database name, from the JDBC notion of
086: * jdbc:<subprotocol>:<subname>
087: */
088: String DBNAME_ATTR = "databaseName";
089:
090: /**
091: * The attribute that is used to request a shutdown.
092: */
093: String SHUTDOWN_ATTR = "shutdown";
094:
095: /**
096: * The attribute that is used to request a database create.
097: */
098: String CREATE_ATTR = "create";
099:
100: /**
101: * The attribute that is used to set the user name.
102: */
103: String USERNAME_ATTR = "user";
104:
105: /**
106: * The attribute that is used to set the user password.
107: */
108: String PASSWORD_ATTR = "password";
109:
110: /**
111: * The attribute that is used to set the connection's DRDA ID.
112: */
113: String DRDAID_ATTR = "drdaID";
114:
115: /**
116: * The attribute that is used to allow upgrade.
117: */
118: String UPGRADE_ATTR = "upgrade";
119:
120: /**
121: * Put the log on a different device.
122: */
123: String LOG_DEVICE = "logDevice";
124:
125: /**
126: * Set the territory for the database.
127: */
128: String TERRITORY = "territory";
129:
130: /**
131: * Set the collation sequence of the database, currently on IDENTITY will be
132: * supported (strings will sort according to binary comparison).
133: */
134: String COLLATE = "collate";
135:
136: /**
137: * Attribute for encrypting a database. Specifies the cryptographic services
138: * provider.
139: */
140: String CRYPTO_PROVIDER = "encryptionProvider";
141:
142: /**
143: * Attribute for encrypting a database. Specifies the cryptographic
144: * algorithm.
145: */
146: String CRYPTO_ALGORITHM = "encryptionAlgorithm";
147:
148: /**
149: * Attribute for encrypting a database. Specifies the key length in bytes
150: * for the specified cryptographic algorithm.
151: */
152: String CRYPTO_KEY_LENGTH = "encryptionKeyLength";
153:
154: /**
155: * Attribute for encrypting a database. Specifies the actual key. When this
156: * is specified all the supplied crypto information is stored external to
157: * the database, ie by the application.
158: */
159: String CRYPTO_EXTERNAL_KEY = "encryptionKey";
160:
161: /**
162: * This attribute is used to request to create a database from backup. This
163: * will throw error if a database with same already exists at the location
164: * where we tring to create.
165: */
166: String CREATE_FROM = "createFrom";
167:
168: /**
169: * This attribute is used to request a database restore from backup. It must
170: * be used only when the active database is corrupted, because it will
171: * cleanup the existing database and replace it from the backup.
172: */
173: String RESTORE_FROM = "restoreFrom";
174:
175: /**
176: * The attribute that is used to request a roll-forward recovery of the
177: * database.
178: */
179: String ROLL_FORWARD_RECOVERY_FROM = "rollForwardRecoveryFrom";
180:
181: /**
182: * securityMechanism sets the mechanism for transmitting the user name and
183: * password from the client. Client driver attribute.
184: */
185: String CLIENT_SECURITY_MECHANISM = "securityMechanism";
186:
187: /**
188: * traceFile sets the client side trace file. Client driver attribute.
189: */
190: String CLIENT_TRACE_FILE = "traceFile";
191:
192: /**
193: * traceDirectory sets the client side trace directory.
194: * Client driver attribute.
195: */
196: String CLIENT_TRACE_DIRECTORY = "traceDirectory";
197:
198: /**
199: * traceFileAppend.
200: * Client driver attribute.
201: */
202: String CLIENT_TRACE_APPEND = "traceFileAppend";
203:
204: /**
205: * traceLevel.
206: * Client driver attribute.
207: */
208: String CLIENT_TRACE_LEVEL = "traceLevel";
209:
210: /**
211: * retrieveMessageText.
212: * Client driver attribute.
213: */
214: String CLIENT_RETIEVE_MESSAGE_TEXT = "retrieveMessageText";
215: }
|