Revision 46337
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/export/jdbc/swing/panels/JDBCConnectionPanel.java | ||
---|---|---|
82 | 82 |
} |
83 | 83 |
|
84 | 84 |
public JDBCServerExplorerParameters getServerExplorerParameters() { |
85 |
return this.connectionPanel.getServerExplorerParameters(); |
|
85 |
return this.connectionPanel.getServerExplorerParametersAndRegister();
|
|
86 | 86 |
} |
87 | 87 |
|
88 | 88 |
@Override |
... | ... | |
103 | 103 |
|
104 | 104 |
@Override |
105 | 105 |
public boolean validatePanel() throws ExportPanelValidationException { |
106 |
DBServerExplorerParameters connection = this.connectionPanel.getServerExplorerParameters(); |
|
106 |
DBServerExplorerParameters connection = this.connectionPanel.getServerExplorerParametersWithoutRegister();
|
|
107 | 107 |
if (connection == null) { |
108 | 108 |
return false; |
109 | 109 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionDialog.java | ||
---|---|---|
285 | 285 |
try { |
286 | 286 |
String problems = this.jdbcServerExplorer.getParametersProblems(); |
287 | 287 |
if( StringUtils.isBlank(problems) ) { |
288 |
JDBCServerExplorerParameters params = this.jdbcServerExplorer.getServerExplorerParameters(); |
|
288 |
JDBCServerExplorerParameters params = this.jdbcServerExplorer.getServerExplorerParametersWithoutRegister();
|
|
289 | 289 |
JDBCServerExplorer server = (JDBCServerExplorer) DALLocator.getDataManager().openServerExplorer( |
290 | 290 |
params.getProviderName(), params |
291 | 291 |
); |
... | ... | |
313 | 313 |
} |
314 | 314 |
|
315 | 315 |
protected void doAdvanced() { |
316 |
JDBCServerExplorerParameters myParams = this.getServerExplorerParameters();
|
|
316 |
JDBCServerExplorerParameters myParams = this.jdbcServerExplorer.getServerExplorerParametersWithoutRegister();
|
|
317 | 317 |
try { |
318 | 318 |
myParams.validate(); |
319 | 319 |
} catch (Exception e) { |
... | ... | |
369 | 369 |
|
370 | 370 |
@Override |
371 | 371 |
public JDBCServerExplorerParameters getServerExplorerParameters() { |
372 |
return this.jdbcServerExplorer.getServerExplorerParameters(); |
|
372 |
return this.jdbcServerExplorer.getServerExplorerParametersAndRegister();
|
|
373 | 373 |
} |
374 | 374 |
|
375 | 375 |
@Override |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/jdbc/DefaultJDBCConnectionPanel.java | ||
---|---|---|
231 | 231 |
} |
232 | 232 |
|
233 | 233 |
@Override |
234 |
public JDBCServerExplorerParameters getServerExplorerParameters() { |
|
234 |
public JDBCServerExplorerParameters getServerExplorerParametersAndRegister() { |
|
235 |
JDBCServerExplorerParameters params = this.getServerExplorerParametersWithoutRegister(); |
|
236 |
addServerExplorerParametersToThePool(this.getConnectionName(), params); |
|
237 |
return params; |
|
238 |
} |
|
239 |
|
|
240 |
public JDBCServerExplorerParameters getServerExplorerParametersWithoutRegister() { |
|
235 | 241 |
JDBCServerExplorerParameters params; |
236 | 242 |
JDBCServerExplorerParameters connector = this.getConnector(); |
237 | 243 |
if( connector==null ) { |
... | ... | |
262 | 268 |
if( s!=null ) { |
263 | 269 |
params.setPassword(s); |
264 | 270 |
} |
265 |
addServerExplorerParametersToThePool(this.getConnectionName(), params); |
|
266 | 271 |
return params; |
267 | 272 |
} |
268 | 273 |
|
... | ... | |
274 | 279 |
|
275 | 280 |
@Override |
276 | 281 |
public LabeledValue<JDBCServerExplorerParameters> getLabeledServerExplorerParameters() { |
277 |
JDBCServerExplorerParameters params = this.getServerExplorerParameters(); |
|
282 |
JDBCServerExplorerParameters params = this.getServerExplorerParametersAndRegister();
|
|
278 | 283 |
if( params == null ) { |
279 | 284 |
return null; |
280 | 285 |
} |
... | ... | |
312 | 317 |
@Override |
313 | 318 |
public boolean areTheParametersValid() { |
314 | 319 |
try { |
315 |
LabeledValue<JDBCServerExplorerParameters> params = this.getLabeledServerExplorerParameters();
|
|
316 |
params.getValue().validate();
|
|
320 |
JDBCServerExplorerParameters params = this.getServerExplorerParametersWithoutRegister();
|
|
321 |
params.validate(); |
|
317 | 322 |
return true; |
318 | 323 |
} catch (ValidateDataParametersException ex) { |
319 | 324 |
return false; |
... | ... | |
324 | 329 |
public String getParametersProblems() { |
325 | 330 |
try { |
326 | 331 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
327 |
JDBCServerExplorerParameters params = this.getServerExplorerParameters(); |
|
332 |
JDBCServerExplorerParameters params = this.getServerExplorerParametersWithoutRegister();
|
|
328 | 333 |
if( params == null ) { |
329 | 334 |
return i18n.getTranslation("You need to select a connector"); |
330 | 335 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.api/src/main/java/org/gvsig/fmap/dal/swing/jdbc/JDBCConnectionPanel.java | ||
---|---|---|
16 | 16 |
|
17 | 17 |
public void setLabeledServerExplorerParameters(LabeledValue<JDBCServerExplorerParameters> parameters); |
18 | 18 |
|
19 |
public JDBCServerExplorerParameters getServerExplorerParameters(); |
|
19 |
public JDBCServerExplorerParameters getServerExplorerParametersAndRegister();
|
|
20 | 20 |
|
21 |
public JDBCServerExplorerParameters getServerExplorerParametersWithoutRegister(); |
|
22 |
|
|
21 | 23 |
public LabeledValue<JDBCServerExplorerParameters> getLabeledServerExplorerParameters(); |
22 | 24 |
|
23 | 25 |
public boolean areTheParametersValid(); |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/wizard/VectorialDBConnectionParamsDialog.java | ||
---|---|---|
96 | 96 |
} |
97 | 97 |
|
98 | 98 |
protected void doAdvanced() { |
99 |
JDBCServerExplorerParameters myParams = this.getServerExplorerParameters();
|
|
99 |
JDBCServerExplorerParameters myParams = this.jdbcServerExplorer.getServerExplorerParametersWithoutRegister();
|
|
100 | 100 |
try { |
101 | 101 |
myParams.validate(); |
102 | 102 |
} catch (Exception e) { |
... | ... | |
143 | 143 |
} |
144 | 144 |
|
145 | 145 |
public JDBCServerExplorerParameters getServerExplorerParameters() { |
146 |
return this.jdbcServerExplorer.getServerExplorerParameters(); |
|
146 |
return this.jdbcServerExplorer.getServerExplorerParametersAndRegister();
|
|
147 | 147 |
} |
148 | 148 |
|
149 | 149 |
public String getConnectionName() { |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial/org.gvsig.h2spatial.h2gis132/org.gvsig.h2spatial.h2gis132.app/org.gvsig.h2spatial.h2gis132.app.mainplugin/src/main/java/org/gvsig/h2spatial/H2SpatialExtension.java | ||
---|---|---|
362 | 362 |
); |
363 | 363 |
dlg.addActionListener((ActionEvent e) -> { |
364 | 364 |
if( dlg.getAction()==WindowManager_v2.BUTTONS_OK ) { |
365 |
JDBCServerExplorerParameters params = jdbcConnectionPanel.getServerExplorerParameters(); |
|
365 |
JDBCServerExplorerParameters params = jdbcConnectionPanel.getServerExplorerParametersAndRegister();
|
|
366 | 366 |
linkLayers(layers, params); |
367 | 367 |
} |
368 | 368 |
}); |
... | ... | |
431 | 431 |
doDownloadOSM( |
432 | 432 |
env, |
433 | 433 |
files[0], |
434 |
jdbcConnectionPanel.getServerExplorerParameters() |
|
434 |
jdbcConnectionPanel.getServerExplorerParametersAndRegister()
|
|
435 | 435 |
); |
436 | 436 |
} |
437 | 437 |
}); |
Also available in: Unified diff