root / branches / v2_0_0_prep / libraries / libFMap_dalfile / src / org / gvsig / fmap / dal / serverexplorer / filesystem / FilesystemServerExplorerParameters.java @ 25789
History | View | Annotate | Download (1.95 KB)
1 |
package org.gvsig.fmap.dal.serverexplorer.filesystem; |
---|---|
2 |
|
3 |
import org.gvsig.fmap.dal.DataServerExplorerParameters; |
4 |
import org.gvsig.fmap.dal.DataTypes; |
5 |
import org.gvsig.fmap.dal.spi.AbstractDataParameters; |
6 |
import org.gvsig.tools.ToolsLocator; |
7 |
import org.gvsig.tools.dynobject.DelegatedDynObject; |
8 |
import org.gvsig.tools.dynobject.DynClass; |
9 |
import org.gvsig.tools.dynobject.DynField; |
10 |
import org.gvsig.tools.dynobject.DynObjectManager; |
11 |
|
12 |
public class FilesystemServerExplorerParameters extends AbstractDataParameters |
13 |
implements DataServerExplorerParameters {
|
14 |
|
15 |
public static final String DYNCLASS_NAME = "FilesystemServerExplorerParameters"; |
16 |
|
17 |
private static final String FIELD_ROOT = "root"; |
18 |
|
19 |
public FilesystemServerExplorerParameters() {
|
20 |
this.delegatedDynObjet = (DelegatedDynObject) ToolsLocator
|
21 |
.getDynObjectManager() |
22 |
.createDynObject(this.registerDynClass());
|
23 |
} |
24 |
|
25 |
private DynClass registerDynClass() {
|
26 |
DynObjectManager dynman = ToolsLocator.getDynObjectManager(); |
27 |
DynClass dynClass = dynman.get(DYNCLASS_NAME); |
28 |
DynField field; |
29 |
if (dynClass == null) { |
30 |
dynClass = dynman.add(DYNCLASS_NAME); |
31 |
|
32 |
field = dynClass.addDynField(FIELD_ROOT); |
33 |
field.setType(DataTypes.STRING); |
34 |
field.setDescription("Root directory path of the explorer");
|
35 |
field.setTheTypeOfAvailableValues(DynField.SINGLE); |
36 |
|
37 |
|
38 |
field = dynClass.addDynField("initialpath");
|
39 |
field.setType(DataTypes.STRING); |
40 |
field.setDescription("Initial path of the explorer");
|
41 |
field.setTheTypeOfAvailableValues(DynField.SINGLE); |
42 |
|
43 |
} |
44 |
return dynClass;
|
45 |
} |
46 |
|
47 |
public void setRoot(String path) { |
48 |
this.setDynValue(FIELD_ROOT, path);
|
49 |
} |
50 |
|
51 |
public String getRoot() { |
52 |
return (String) this.getDynValue(FIELD_ROOT); |
53 |
} |
54 |
|
55 |
public void setInitialpath(String path) { |
56 |
this.setDynValue("initialpath", path); |
57 |
} |
58 |
|
59 |
public String getInitialpath() { |
60 |
return (String) this.getDynValue("initialpath"); |
61 |
} |
62 |
|
63 |
public String getExplorerName() { |
64 |
return FilesystemServerExplorer.NAME;
|
65 |
} |
66 |
|
67 |
} |