[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[udig-devel] [jira] Created: (UDIG-1577) Allow empty schema for oracle DB
|
Allow empty schema for oracle DB
--------------------------------
Key: UDIG-1577
URL: http://jira.codehaus.org/browse/UDIG-1577
Project: uDIG
Issue Type: Improvement
Components: application
Affects Versions: UDIG 1.2.x
Reporter: Ugo Taddei
Priority: Trivial
The OracleSpatialWizardPage requires the user to be the same as its schema. In theory, it should allow any schema (or even an empty one, which in this case should default to the user's schema).
A start is provided by the code in OracleServiceExtension:
/** Create a "jdbc_url" from the provided parameters */
static String getJDBCUrl(Map<String,Serializable> params) {
final String JDBC_PATH = "jdbc:oracle:thin:@";
try {
String host = (String) OracleNGDataStoreFactory.HOST.lookUp(params);
String db = (String) OracleNGDataStoreFactory.DATABASE.lookUp(params);
int port = (Integer) OracleNGDataStoreFactory.PORT.lookUp(params);
String schema = (String) OracleNGDataStoreFactory.SCHEMA.lookUp(params);
if( schema == null || schema.length() == 0 ) {
schema = "";
} else {
schema = "/" + schema;
}
if( db.startsWith("(") ){
return JDBC_PATH + db;
}
else if( db.startsWith("/") ){
return JDBC_PATH + "//" + host + ":" + port + db + schema;
}
else {
return JDBC_PATH + host + ":" + port + ":" + db + schema;
}
} catch (IOException e) {
return null; // not for us then
}
}
The wizard page should also fill in the blank, whenever no schema is provided. Currently the code fails when no schema is passed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira