use of org.geosdi.geoplatform.gui.client.command.publish.cas.CasProcessEPSGResultRequest in project geo-platform by geosdi.
the class CasProcessEPSGResultCommand method execute.
@Override
public ProcessEPSGResultResponse execute(CasProcessEPSGResultRequest request, HttpServletRequest httpServletRequest) {
GPAccount account;
try {
account = sessionUtility.getLoggedAccount(httpServletRequest);
} catch (GPSessionTimeout timeout) {
throw new GeoPlatformException(timeout);
}
List<EPSGLayerData> previewLayerList = request.getPreviewLayerList();
try {
List<InfoPreview> resultList = casPublisherService.processEPSGResult(new ProcessEPSGResultRequest(account.getNaturalID(), this.trasformPreviewLayerList(previewLayerList), request.getWorkspace())).getInfoPreviews();
return new ProcessEPSGResultResponse(generateJSONObjects(resultList));
} catch (Exception ex) {
ex.printStackTrace();
throw new GeoPlatformException("Error on publish shape.");
}
}
Aggregations