Revision 44386 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
JDBCConnectionPanel.java | ||
---|---|---|
43 | 43 |
/** |
44 | 44 |
* @author gvSIG Team |
45 | 45 |
* @version $Id$ |
46 |
*
|
|
46 |
* |
|
47 | 47 |
*/ |
48 |
public class JDBCConnectionPanel |
|
49 |
implements ExportPanel |
|
50 |
{ |
|
48 |
public class JDBCConnectionPanel |
|
49 |
implements ExportPanel { |
|
51 | 50 |
|
52 | 51 |
private static final long serialVersionUID = -3278172717881233447L; |
53 | 52 |
|
... | ... | |
57 | 56 |
private final JExportProcessPanel processPanel; |
58 | 57 |
|
59 | 58 |
public JDBCConnectionPanel( |
60 |
JExportProcessPanel processPanel,
|
|
59 |
JExportProcessPanel processPanel, |
|
61 | 60 |
ExportJDBCParameters parameters |
62 |
) {
|
|
61 |
) { |
|
63 | 62 |
this.processPanel = processPanel; |
64 | 63 |
this.parameters = parameters; |
65 | 64 |
initComponents(); |
... | ... | |
69 | 68 |
DataSwingManager manager = DALSwingLocator.getSwingManager(); |
70 | 69 |
this.connectionPanel = manager.createJDBCConnectionPanel(); |
71 | 70 |
} |
72 |
|
|
71 |
|
|
73 | 72 |
@Override |
74 | 73 |
public void previousPanel() { |
75 | 74 |
|
... | ... | |
77 | 76 |
|
78 | 77 |
@Override |
79 | 78 |
public void enterPanel() { |
80 |
// Default do nothing |
|
79 |
if (this.getServerExplorerParameters() != null) { |
|
80 |
this.connectionPanel.setServerExplorerParameters(this.getServerExplorerParameters()); |
|
81 |
} |
|
81 | 82 |
} |
82 |
|
|
83 |
|
|
83 | 84 |
public JDBCServerExplorerParameters getServerExplorerParameters() { |
84 | 85 |
return this.connectionPanel.getServerExplorerParameters(); |
85 | 86 |
} |
... | ... | |
103 | 104 |
@Override |
104 | 105 |
public boolean validatePanel() throws ExportPanelValidationException { |
105 | 106 |
DBServerExplorerParameters connection = this.connectionPanel.getServerExplorerParameters(); |
106 |
if( connection==null ) {
|
|
107 |
if (connection == null) {
|
|
107 | 108 |
return false; |
108 | 109 |
} |
109 | 110 |
try { |
... | ... | |
111 | 112 |
this.parameters.setExplorerParameters(this.getServerExplorerParameters()); |
112 | 113 |
return true; |
113 | 114 |
} catch (ValidateDataParametersException ex) { |
114 |
throw new ExportPanelValidationException(ex.getMessageStack(),ex); |
|
115 |
} catch(Exception ex) { |
|
115 |
throw new ExportPanelValidationException(ex.getMessageStack(), ex);
|
|
116 |
} catch (Exception ex) {
|
|
116 | 117 |
return false; |
117 | 118 |
} |
118 | 119 |
} |
Also available in: Unified diff