SDI Interaction Exception is now not rethrown

This commit is contained in:
Fabio Sinibaldi 2020-11-03 15:59:19 +01:00
parent ad39435e96
commit 972b1a3a1e
1 changed files with 21 additions and 21 deletions

View File

@ -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);