Revision 25389
branches/v2_0_0_prep/libraries/libFMap_dalfile/src/org/gvsig/fmap/dal/serverexplorer/filesystem/FilesystemServerExplorerParameters.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.dal.serverexplorer.filesystem; |
2 | 2 |
|
3 | 3 |
import org.gvsig.fmap.dal.DataServerExplorerParameters; |
4 |
import org.gvsig.fmap.dal.DataTypes; |
|
4 | 5 |
import org.gvsig.fmap.dal.spi.AbstractDataParameters; |
5 | 6 |
import org.gvsig.tools.ToolsLocator; |
7 |
import org.gvsig.tools.dynobject.DynClass; |
|
8 |
import org.gvsig.tools.dynobject.DynField; |
|
9 |
import org.gvsig.tools.dynobject.DynObjectManager; |
|
6 | 10 |
|
7 | 11 |
public class FilesystemServerExplorerParameters extends AbstractDataParameters |
8 | 12 |
implements DataServerExplorerParameters { |
9 | 13 |
|
14 |
public static final String DYNCLASS_NAME = "FilesystemServerExplorerParameters"; |
|
15 |
|
|
10 | 16 |
public FilesystemServerExplorerParameters() { |
11 | 17 |
this.delegatedDynObjet = ToolsLocator.getDynObjectManager() |
12 |
.createDynObject( |
|
13 |
ToolsLocator.getDynObjectManager().get( |
|
14 |
"FilesystemServerExplorerParameters")); |
|
18 |
.createDynObject(this.registerDynClass()); |
|
15 | 19 |
} |
16 | 20 |
|
21 |
private DynClass registerDynClass() { |
|
22 |
DynObjectManager dynman = ToolsLocator.getDynObjectManager(); |
|
23 |
DynClass dynClass = dynman.get(DYNCLASS_NAME); |
|
24 |
DynField field; |
|
25 |
if (dynClass == null) { |
|
26 |
dynClass = dynman.add(DYNCLASS_NAME); |
|
27 |
|
|
28 |
field = dynClass.addDynField("root"); |
|
29 |
field.setTheTypeOfAvailableValues(DataTypes.STRING); |
|
30 |
field.setDescription("Root directory path of the explorer"); |
|
31 |
|
|
32 |
field = dynClass.addDynField("initialpath"); |
|
33 |
field.setTheTypeOfAvailableValues(DataTypes.STRING); |
|
34 |
field.setDescription("Initial path of the explorer"); |
|
35 |
|
|
36 |
} |
|
37 |
return dynClass; |
|
38 |
} |
|
39 |
|
|
17 | 40 |
public void setRoot(String path) { |
18 | 41 |
this.setDynValue("root", path); |
19 | 42 |
} |
Also available in: Unified diff