SDI Interaction Exception is now not rethrown
This commit is contained in:
parent
ad39435e96
commit
972b1a3a1e
|
@ -17,6 +17,7 @@ import org.gcube.application.geoportal.model.content.PersistedContent;
|
||||||
import org.gcube.application.geoportal.model.content.UploadedImage;
|
import org.gcube.application.geoportal.model.content.UploadedImage;
|
||||||
import org.gcube.application.geoportal.model.content.WorkspaceContent;
|
import org.gcube.application.geoportal.model.content.WorkspaceContent;
|
||||||
import org.gcube.application.geoportal.model.fault.PersistenceException;
|
import org.gcube.application.geoportal.model.fault.PersistenceException;
|
||||||
|
import org.gcube.application.geoportal.model.fault.SDIInteractionException;
|
||||||
import org.gcube.application.geoportal.model.gis.SDILayerDescriptor;
|
import org.gcube.application.geoportal.model.gis.SDILayerDescriptor;
|
||||||
import org.gcube.application.geoportal.model.report.ValidationReport;
|
import org.gcube.application.geoportal.model.report.ValidationReport;
|
||||||
import org.gcube.application.geoportal.utils.Files;
|
import org.gcube.application.geoportal.utils.Files;
|
||||||
|
@ -42,11 +43,6 @@ public class ContentHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register files as to be associated with content
|
* Register files as to be associated with content
|
||||||
*
|
*
|
||||||
|
@ -110,6 +106,7 @@ public class ContentHandler {
|
||||||
description="Layer concessione : "+content.getTitolo();
|
description="Layer concessione : "+content.getTitolo();
|
||||||
|
|
||||||
if(publish) {
|
if(publish) {
|
||||||
|
try {
|
||||||
//if not present create workspace for current project
|
//if not present create workspace for current project
|
||||||
if(workspace==null)
|
if(workspace==null)
|
||||||
workspace=sdiManager.createWorkspace("gna_conc_"+record.getId());
|
workspace=sdiManager.createWorkspace("gna_conc_"+record.getId());
|
||||||
|
@ -117,6 +114,9 @@ public class ContentHandler {
|
||||||
GeoServerContent geoserverPersisted=sdiManager.pushShapeLayerFileSet((SDILayerDescriptor)content, entry.getValue(),workspace);
|
GeoServerContent geoserverPersisted=sdiManager.pushShapeLayerFileSet((SDILayerDescriptor)content, entry.getValue(),workspace);
|
||||||
geoserverPersisted.setAssociated(content);
|
geoserverPersisted.setAssociated(content);
|
||||||
persisted.add(geoserverPersisted);
|
persisted.add(geoserverPersisted);
|
||||||
|
}catch(SDIInteractionException e) {
|
||||||
|
log.warn("Unable to publish layers.",e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}else throw new Exception("Invalid SDI Content "+content);
|
}else throw new Exception("Invalid SDI Content "+content);
|
||||||
|
|
Loading…
Reference in New Issue