Search in sources :

Example 1 with MementoFolderOriginalProperties

use of org.geosdi.geoplatform.gui.client.model.memento.save.storage.MementoFolderOriginalProperties in project geo-platform by geosdi.

the class SaveFolderPropertiesCommand method execute.

@Override
public SaveFolderPropertiesResponse execute(SaveFolderPropertiesRequest request, HttpServletRequest httpServletRequest) {
    logger.info("##################### Executing {} Command", this.getClass().getSimpleName());
    try {
        this.sessionUtility.getLoggedAccount(httpServletRequest);
    } catch (GPSessionTimeout timeout) {
        throw new GeoPlatformException(timeout);
    }
    try {
        MementoFolderOriginalProperties memento = request.getMementoFolderOriginalProperties();
        geoPlatformServiceClient.saveFolderProperties(memento.getIdBaseElement(), memento.getName(), memento.isChecked(), memento.isExpanded());
    } catch (ResourceNotFoundFault ex) {
        SaveFolderPropertiesCommand.logger.error("Failed to save folder on LayerService: " + ex);
        throw new GeoPlatformException(ex);
    } catch (IllegalParameterFault ex) {
        SaveFolderPropertiesCommand.logger.error("Failed to save folder on LayerService: " + ex);
        throw new GeoPlatformException(ex);
    }
    logger.debug("#################### After sending project notification");
    return new SaveFolderPropertiesResponse(Boolean.TRUE);
}
Also used : IllegalParameterFault(org.geosdi.geoplatform.exception.IllegalParameterFault) ResourceNotFoundFault(org.geosdi.geoplatform.exception.ResourceNotFoundFault) GPSessionTimeout(org.geosdi.geoplatform.gui.utility.GPSessionTimeout) GeoPlatformException(org.geosdi.geoplatform.gui.global.GeoPlatformException) MementoFolderOriginalProperties(org.geosdi.geoplatform.gui.client.model.memento.save.storage.MementoFolderOriginalProperties) SaveFolderPropertiesResponse(org.geosdi.geoplatform.gui.client.command.memento.basic.SaveFolderPropertiesResponse)

Aggregations

IllegalParameterFault (org.geosdi.geoplatform.exception.IllegalParameterFault)1 ResourceNotFoundFault (org.geosdi.geoplatform.exception.ResourceNotFoundFault)1 SaveFolderPropertiesResponse (org.geosdi.geoplatform.gui.client.command.memento.basic.SaveFolderPropertiesResponse)1 MementoFolderOriginalProperties (org.geosdi.geoplatform.gui.client.model.memento.save.storage.MementoFolderOriginalProperties)1 GeoPlatformException (org.geosdi.geoplatform.gui.global.GeoPlatformException)1 GPSessionTimeout (org.geosdi.geoplatform.gui.utility.GPSessionTimeout)1