gvsig-raster / org.gvsig.raster.tools / trunk / templates / rasterTaskProjectTemplate / alg_template / sources / io / ProjectTemplateServerExplorerParameters.java @ 1870
History | View | Annotate | Download (1.91 KB)
1 |
package org.gvsig.raster.projecttemplate.io; |
---|---|
2 |
|
3 |
import org.gvsig.fmap.dal.DataServerExplorerParameters; |
4 |
import org.gvsig.fmap.dal.spi.AbstractDataParameters; |
5 |
import org.gvsig.raster.impl.store.AbstractRasterDataParameters; |
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 ProjectTemplateServerExplorerParameters extends AbstractDataParameters implements DataServerExplorerParameters { |
13 |
public static final String DYNCLASS_NAME = "ProjectTemplateServerExplorerParameters"; |
14 |
public static final String FIELD_TESTPARAM = "FIELD_TESTPARAM"; |
15 |
protected static DynClass DYNCLASS = null; |
16 |
private DelegatedDynObject delegatedDynObject = null; |
17 |
|
18 |
public ProjectTemplateServerExplorerParameters() {
|
19 |
super();
|
20 |
initialize(); |
21 |
} |
22 |
|
23 |
protected void initialize() { |
24 |
this.delegatedDynObject = (DelegatedDynObject) ToolsLocator
|
25 |
.getDynObjectManager().createDynObject( |
26 |
DYNCLASS); |
27 |
} |
28 |
|
29 |
public static void registerDynClass() { |
30 |
DynObjectManager dynman = ToolsLocator.getDynObjectManager(); |
31 |
DynClass dynClass; |
32 |
DynField field; |
33 |
|
34 |
if(dynman == null) |
35 |
return;
|
36 |
|
37 |
if (DYNCLASS == null) { |
38 |
dynClass = AbstractRasterDataParameters.registerDynClass(DYNCLASS_NAME); |
39 |
|
40 |
field = dynClass.addDynFieldObject(FIELD_TESTPARAM); |
41 |
field.setDescription("Parameters to test this template");
|
42 |
field.setClassOfValue(Long.class);
|
43 |
field.setMandatory(false);
|
44 |
|
45 |
DYNCLASS = dynClass; |
46 |
} |
47 |
} |
48 |
|
49 |
protected DelegatedDynObject getDelegatedDynObject() {
|
50 |
return delegatedDynObject;
|
51 |
} |
52 |
|
53 |
public String getDataStoreName() { |
54 |
return ProjectTemplateProvider.NAME;
|
55 |
} |
56 |
|
57 |
public String getDescription() { |
58 |
return ProjectTemplateProvider.DESCRIPTION;
|
59 |
} |
60 |
|
61 |
public String getExplorerName() { |
62 |
return ProjectTemplateProvider.NAME;
|
63 |
} |
64 |
} |