Esempio n. 1
0
        public async Task <CoordinateSystemSettings> Get([FromRoute] long projectId)
        {
            var projectUid = await((RaptorPrincipal)User).GetProjectUid(projectId);
            var request    = new ProjectID(projectId, projectUid);

            request.Validate();

            return(await RequestExecutorContainerFactory.Build <CoordinateSystemExecutorGet>(logger,
                                                                                             configStore : configStore, trexCompactionDataProxy : trexCompactionDataProxy, customHeaders : CustomHeaders).ProcessAsync(request) as CoordinateSystemSettings);
        }
Esempio n. 2
0
        public SurveyedSurfaceResult Get([FromRoute] long projectId)
        {
            ProjectID request = new ProjectID(projectId);

            request.Validate();
#if RAPTOR
            return(RequestExecutorContainerFactory.Build <SurveyedSurfaceExecutorGet>(logger, raptorClient).Process(request) as SurveyedSurfaceResult);
#else
            throw new ServiceException(HttpStatusCode.BadRequest,
                                       new ContractExecutionResult(ContractExecutionStatesEnum.ValidationError, "TRex unsupported request"));
#endif
        }
Esempio n. 3
0
        public async Task <SurveyedSurfaceResult> Get([FromRoute] Guid projectUid)
        {
            long projectId = await((RaptorPrincipal)User).GetLegacyProjectId(projectUid);
            var  request   = new ProjectID(projectId, projectUid);

            request.Validate();
#if RAPTOR
            return(RequestExecutorContainerFactory.Build <SurveyedSurfaceExecutorGet>(logger, raptorClient).Process(request) as SurveyedSurfaceResult);
#else
            throw new ServiceException(HttpStatusCode.BadRequest,
                                       new ContractExecutionResult(ContractExecutionStatesEnum.ValidationError, "TRex unsupported request"));
#endif
        }
Esempio n. 4
0
        public CSIBResult GetCSIB([FromRoute] Guid projectUid)
        {
            Log.LogInformation($"{nameof(GetCSIB)}: {Request.QueryString}");

            var request = new ProjectID(null, projectUid);

            request.Validate();

            return(WithServiceExceptionTryExecute(() =>
                                                  RequestExecutorContainer
                                                  .Build <CSIBExecutor>(ConfigStore, LoggerFactory, ServiceExceptionHandler)
                                                  .Process(request) as CSIBResult));
        }
Esempio n. 5
0
        public Task <ContractExecutionResult> GetCoordinateSystem([FromRoute] Guid projectUid)
        {
            Log.LogInformation($"{nameof(GetCoordinateSystem)}: {Request.QueryString}");

            var request = new ProjectID(null, projectUid);

            request.Validate();

            return(WithServiceExceptionTryExecuteAsync(() =>
                                                       RequestExecutorContainer
                                                       .Build <CoordinateSystemGetExecutor>(ConfigStore, LoggerFactory, ServiceExceptionHandler)
                                                       .ProcessAsync(request)));
        }
Esempio n. 6
0
        public ContractExecutionResult GetDel([FromRoute] long projectId, [FromRoute] long surveyedSurfaceId)
        {
            ProjectID projId = new ProjectID(projectId);

            projId.Validate();

            DataID ssId = DataID.CreateDataID(surveyedSurfaceId);

            ssId.Validate();
#if RAPTOR
            return
                (RequestExecutorContainerFactory.Build <SurveyedSurfaceExecutorDelete>(logger, raptorClient)
                 .Process(new Tuple <ProjectID, DataID>(projId, ssId)));
#else
            throw new ServiceException(HttpStatusCode.BadRequest,
                                       new ContractExecutionResult(ContractExecutionStatesEnum.ValidationError, "TRex unsupported request"));
#endif
        }
Esempio n. 7
0
        public async Task <ContractExecutionResult> GetDel([FromRoute] Guid projectUid, [FromRoute] long surveyedSurfaceId)
        {
            long projectId = await((RaptorPrincipal)User).GetLegacyProjectId(projectUid);
            var  projId    = new ProjectID(projectId, projectUid);

            projId.Validate();

            var ssId = DataID.CreateDataID(surveyedSurfaceId);

            ssId.Validate();
#if RAPTOR
            return
                (RequestExecutorContainerFactory.Build <SurveyedSurfaceExecutorDelete>(logger, raptorClient)
                 .Process(new Tuple <ProjectID, DataID>(projId, ssId)));
#else
            throw new ServiceException(HttpStatusCode.BadRequest,
                                       new ContractExecutionResult(ContractExecutionStatesEnum.ValidationError, "TRex unsupported request"));
#endif
        }