comparison src/java/de/intevation/mxd/writer/MapScriptWriter.java @ 197:cdbf2f2dca35

Check for database connectio user parameter for SDE connections.
author raimund renkert <raimund.renkert@intevation.de>
date Wed, 20 Jul 2011 17:56:29 +0200
parents 5350621a0294
children c56547b228f9
comparison
equal deleted inserted replaced
196:5350621a0294 197:cdbf2f2dca35
266 "SDE datasource found." + 266 "SDE datasource found." +
267 " Please edit password in mapfile."); 267 " Please edit password in mapfile.");
268 layer.setConnectionType( 268 layer.setConnectionType(
269 MS_CONNECTION_TYPE.MS_PLUGIN.swigValue(), 269 MS_CONNECTION_TYPE.MS_PLUGIN.swigValue(),
270 MS_BINDIR + "/ms/plugins/msplugin_sde_93.dll"); 270 MS_BINDIR + "/ms/plugins/msplugin_sde_93.dll");
271 String database_auth = layerElement.getAttribute("database");
272 if (database_auth.equals("") || database_auth == null) {
273 logger.warn("Could not set the database connection user." +
274 " Setting to \"sde\" as default.");
275 database_auth = "sde";
276 }
271 layer.setConnection( 277 layer.setConnection(
272 layerElement.getAttribute("server") + "," + 278 layerElement.getAttribute("server") + "," +
273 "port:" + layerElement.getAttribute("instance") + "," + 279 "port:" + layerElement.getAttribute("instance") + "," +
274 layerElement.getAttribute("database") + "," + 280 database_auth + "," +
275 layerElement.getAttribute("user") + ",<PASSWORD>"); 281 layerElement.getAttribute("user") + ",<PASSWORD>");
276 layer.setData( 282 layer.setData(
277 layerElement.getAttribute("data_source") + 283 layerElement.getAttribute("data_source") +
278 ",SHAPE," + 284 ",SHAPE," +
279 layerElement.getAttribute("version")); 285 layerElement.getAttribute("version"));
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)