public void Execute(IUploadFeatureTypeInfoToGeoserverRequest request, Action <IUploadFeatureTypeInfoToGeoserverResponse> responseBoundary)
        {
            if (request == null)
            {
                throw new ArgumentNullException("request", "Use case request cannot be null!");
            }
            if (responseBoundary == null)
            {
                throw new ArgumentNullException("responseBoundary", "Response handler cannot be null!");
            }

            try
            {
                var response = restClient.PostLayer(request.Layer);


                var status = GetStatusFromResponse(response);

                if (status == FeatureTypeInfoStatus.Ok)
                {
                    restClient.PutLayer(request.Layer);
                }

                responseBoundary(new UploadFeatureTypeInfoToGeoserverResponse(status));
            }
            catch (Exception ex)
            {
                throw new UseCaseExecutionException("An error occurred while trying to get Layer Status!", ex);
            }
        }
        public void Execute(IUploadFeatureTypeInfoToGeoserverRequest request, Action<IUploadFeatureTypeInfoToGeoserverResponse> responseBoundary)
        {
            if (request == null)
                throw new ArgumentNullException("request", "Use case request cannot be null!");
            if (responseBoundary == null)
                throw new ArgumentNullException("responseBoundary", "Response handler cannot be null!");

            try
            {
                var response = restClient.PostLayer(request.Layer);

                var status = GetStatusFromResponse(response);

                if (status == FeatureTypeInfoStatus.Ok)
                    restClient.PutLayer(request.Layer);

                responseBoundary(new UploadFeatureTypeInfoToGeoserverResponse(status));
            }
            catch (Exception ex)
            {
                throw new UseCaseExecutionException("An error occurred while trying to get Layer Status!", ex);
            }
        }