Revision 32880 branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/dal/store/mysql/MySQLServerExplorerParameters.java
MySQLServerExplorerParameters.java | ||
---|---|---|
32 | 32 |
|
33 | 33 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
34 | 34 |
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
35 |
import org.gvsig.tools.ToolsLocator; |
|
36 |
import org.gvsig.tools.dynobject.DynClass; |
|
37 |
import org.gvsig.tools.dynobject.DynField; |
|
38 |
import org.gvsig.tools.dynobject.DynObjectManager; |
|
39 | 35 |
|
40 | 36 |
/** |
41 | 37 |
* @author jmvivo |
... | ... | |
45 | 41 |
JDBCServerExplorerParameters implements MySQLConnectionParameters { |
46 | 42 |
|
47 | 43 |
|
48 |
public static final String DYNCLASS_NAME = "MySQLServerExplorerParameters";
|
|
44 |
public static final String PARAMETERS_DEFINITION_NAME = "MySQLServerExplorerParameters";
|
|
49 | 45 |
|
50 |
protected DynClass registerDynClass() { |
|
51 |
DynObjectManager dynman = ToolsLocator.getDynObjectManager(); |
|
52 |
DynClass dynClass = dynman.get(DYNCLASS_NAME); |
|
53 |
DynField field; |
|
54 |
|
|
55 |
if (dynClass == null) { |
|
56 |
dynClass = dynman.add(DYNCLASS_NAME); |
|
57 |
|
|
58 |
dynClass.extend(super.registerDynClass()); |
|
59 |
|
|
60 |
dynClass.extend(MySQLResourceParameters.DYNCLASS_NAME); |
|
61 |
|
|
62 |
// Register the DynClass in the PersistenceManager |
|
63 |
ToolsLocator.getPersistenceManager().registerClass( |
|
64 |
MySQLServerExplorerParameters.class, dynClass); |
|
65 |
} |
|
66 |
return dynClass; |
|
46 |
public MySQLServerExplorerParameters() { |
|
47 |
super(PARAMETERS_DEFINITION_NAME, MySQLServerExplorer.NAME); |
|
67 | 48 |
} |
68 |
|
|
69 |
/* (non-Javadoc) |
|
70 |
* @see org.gvsig.fmap.dal.DataServerExplorerParameters#getExplorerName() |
|
71 |
*/ |
|
72 |
public String getExplorerName() { |
|
73 |
return MySQLServerExplorer.NAME; |
|
74 |
} |
|
75 |
|
|
49 |
|
|
76 | 50 |
public Boolean getUseSSL() { |
77 |
return (Boolean) this.getDynValue(DYNFIELDNAME_USESSL);
|
|
51 |
return (Boolean) this.getDynValue(USESSL_PARAMTER_NAME);
|
|
78 | 52 |
} |
79 | 53 |
|
80 | 54 |
public void setUseSSL(Boolean useSSL) { |
81 |
this.setDynValue(DYNFIELDNAME_USESSL, useSSL);
|
|
55 |
this.setDynValue(USESSL_PARAMTER_NAME, useSSL);
|
|
82 | 56 |
} |
83 | 57 |
|
84 | 58 |
public void setUseSSL(boolean useSSL) { |
85 |
this.setDynValue(DYNFIELDNAME_USESSL, new Boolean(useSSL));
|
|
59 |
this.setDynValue(USESSL_PARAMTER_NAME, new Boolean(useSSL));
|
|
86 | 60 |
} |
87 | 61 |
|
88 | 62 |
public void validate() throws ValidateDataParametersException { |
Also available in: Unified diff