use of au.org.ala.spatial.composer.sandbox.SandboxEmbeddedController in project spatial-portal by AtlasOfLivingAustralia.
the class MapComposer method importSpecies.
/**
* Species are imported through the species list tool.
*
* @param event
*/
public void importSpecies(Event event) {
String type = (String) event.getData();
if (type != null && type.length() > 0) {
if ("assemblage".equalsIgnoreCase(type)) {
Map params = new HashMap();
params.put("enableImportAssemblage", true);
openModal("WEB-INF/zul/add/AddSpecies.zul", params, "addspecieswindow");
} else {
if (StringUtils.isNotEmpty((String) CommonData.getSettings().getProperty("sandbox.url", null)) && CommonData.getSettings().getProperty("import.points.layers-service", "false").equals("false")) {
String sandboxEmbedded = CommonData.getSettings().getProperty("sandbox.embedded", "false");
if (sandboxEmbedded != null && Boolean.parseBoolean(sandboxEmbedded)) {
SandboxEmbeddedController spc = (SandboxEmbeddedController) Executions.createComponents("WEB-INF/zul/sandbox/SandboxExternal.zul", getMapComposer(), null);
spc.setAddToMap(true);
spc.setParent(getMapComposer());
spc.doModal();
} else {
SandboxPasteController spc = (SandboxPasteController) Executions.createComponents("WEB-INF/zul/sandbox/SandboxPaste.zul", getMapComposer(), null);
spc.setAddToMap(true);
spc.setParent(getMapComposer());
spc.doModal();
}
} else {
Map params = new HashMap();
params.put("setTbInstructions", "3. Select file (comma separated ID (text), " + "longitude (decimal degrees), latitude(decimal degrees))");
params.put("addToMap", true);
openModal("WEB-INF/zul/input/UploadSpecies.zul", params, "uploadspecieswindow");
}
}
}
}
Aggregations