コード例 #1
0
 public AchsenController(IAchsenSegmentService achsensegmentService, IGeoJSONParseService geoJSONParseService, ILocalizationService localizationService, IAchsenReferenzUpdateService achsenReferenzUpdateService)
 {
     this.achsensegmentService        = achsensegmentService;
     this.geoJSONParseService         = geoJSONParseService;
     this.localizationService         = localizationService;
     this.achsenReferenzUpdateService = achsenReferenzUpdateService;
 }
コード例 #2
0
 public InspektionsroutenGISController(IStrassenabschnittGISService strassenabschnittGISService,
                                       IInspektionsRouteGISService inspektionsRouteGISService,
                                       IPackageService packageService,
                                       IInspektionsRouteGISOverviewService inspektionsRouteGISOverviewService,
                                       ISessionService sessionService,
                                       IInspektionsRtStrAbschnitteService inspektionsRtStrAbschnitteService,
                                       IInspektionsRouteStatusverlaufService inspektionsRouteStatusverlaufService,
                                       IInspektionsRouteLockingService inspektionsRouteLockingService,
                                       IEreignisLogService ereignisLogService,
                                       ILocalizationService localizationService,
                                       ICheckInService checkInService,
                                       ICheckOutService checkOutService,
                                       IGeoJSONParseService geoJSONParseService)
     : base(strassenabschnittGISService)
 {
     this.localizationService         = localizationService;
     this.strassenabschnittGISService = strassenabschnittGISService;
     this.inspektionsRouteGISService  = inspektionsRouteGISService;
     this.packageService = packageService;
     this.inspektionsRouteGISOverviewService = inspektionsRouteGISOverviewService;
     this.sessionService = sessionService;
     this.inspektionsRtStrAbschnitteService    = inspektionsRtStrAbschnitteService;
     this.inspektionsRouteStatusverlaufService = inspektionsRouteStatusverlaufService;
     this.inspektionsRouteLockingService       = inspektionsRouteLockingService;
     this.ereignisLogService  = ereignisLogService;
     this.checkInService      = checkInService;
     this.checkOutService     = checkOutService;
     this.geoJSONParseService = geoJSONParseService;
 }
コード例 #3
0
 public StrassenabschnittGISService(
     ITransactionScopeProvider transactionScopeProvider,
     IEntityServiceMappingEngine entityServiceMappingEngine,
     ISecurityService securityService,
     IHistorizationService historizationService,
     IAchsenReferenzService achsenReferenzService,
     IReferenzGruppeService referenzGruppeService,
     IGISService gisService,
     IZustandsabschnittGISService zustandsabschnittGISService,
     IGeoJSONParseService geoJSONParseService,
     IFahrbahnZustandGISService fahrbahnZustandService,
     IAchsenSegmentService achsenSegmentService,
     IFiltererFactory filtererFactory,
     ILocalizationService localizationService)
     : base(transactionScopeProvider, entityServiceMappingEngine, securityService, historizationService)
 {
     this.transactionScopeProvider    = transactionScopeProvider;
     this.achsenSegmentService        = achsenSegmentService;
     this.filtererFactory             = filtererFactory;
     this.localizationService         = localizationService;
     this.achsenReferenzService       = achsenReferenzService;
     this.referenzGruppeService       = referenzGruppeService;
     this.zustandsabschnittGISService = zustandsabschnittGISService;
     this.gisService             = gisService;
     this.geoJSONParseService    = geoJSONParseService;
     this.fahrbahnZustandService = fahrbahnZustandService;
 }
コード例 #4
0
        public RealisierteMassnahmeGISModelValidator(IGeoJSONParseService geoJSONParseService, ILocalizationService localizationService, IRealisierteMassnahmeGISModelService realisierteMassnahmeGISModelService)
            : base(localizationService)
        {
            RuleForNotNullableString(k => k.Projektname);
            RuleForNullableString(k => k.BezeichnungVon);
            RuleForNullableString(k => k.BezeichnungBis);
            RuleForNullableDecimal(k => k.Laenge).NotEmpty();

            RuleForNullableLongString(k => k.Beschreibung);
            RuleForNullableString(k => k.LeitendeOrganisation);
            RuleFor(m => m.Strasseneigentuemer).NotNull();
            RuleFor(m => m.Belastungskategorie).ShouldNotBeEmpty(localizationService);

            RuleForNullableDecimal(s => s.KostenFahrbahn, 0);
            RuleForNullableDecimal(s => s.KostenTrottoirLinks, 0);
            RuleForNullableDecimal(s => s.KostenTrottoirRechts, 0);

            RuleForNullableDecimal(m => m.BreiteFahrbahn, 2)
            .NotNull()
            .When(m => m.KostenFahrbahn.HasValue);
            RuleForNullableDecimal(m => m.BreiteFahrbahn, 2)
            .NotNull()
            .When(m => (!m.BreiteTrottoirLinks.HasValue && !m.BreiteTrottoirRechts.HasValue) || m.MassnahmenvorschlagFahrbahn.HasValue)
            .WithMessage(localizationService.GetLocalizedError(ValidationError.RealisierteMassnahmeBreiteEmpty));
            RuleForNullableDecimal(m => m.BreiteTrottoirLinks, 2)
            .NotNull()
            .When(m => m.KostenTrottoirLinks.HasValue || (!m.BreiteTrottoirRechts.HasValue && m.MassnahmenvorschlagTrottoir.HasValue));
            RuleForNullableDecimal(m => m.BreiteTrottoirRechts, 2)
            .NotNull()
            .When(m => m.KostenTrottoirRechts.HasValue || (!m.BreiteTrottoirLinks.HasValue && m.MassnahmenvorschlagTrottoir.HasValue));

            RuleFor(m => m.MassnahmenvorschlagFahrbahn)
            .ShouldNotBeEmpty(localizationService)
            .When(m => m.BreiteFahrbahn.HasValue || m.KostenFahrbahn.HasValue);
            RuleFor(m => m.MassnahmenvorschlagTrottoir)
            .ShouldNotBeEmpty(localizationService)
            .When(m =>
                  (m.BreiteTrottoirLinks.HasValue || m.BreiteTrottoirRechts.HasValue) ||
                  (m.KostenTrottoirLinks.HasValue || m.KostenTrottoirRechts.HasValue));

            RuleForNullableDecimal(s => s.KostenGesamtprojekt, 0)
            .Must((model, value) => !value.HasValue || value >= model.SumKosten)
            .WithMessage(localizationService.GetLocalizedError(ValidationError.KostenGesamtprojektGraterThanSum));

            RuleFor(m => m.KostenFahrbahn)
            .ShouldNotBeEmpty(localizationService)
            .When(m => m.BreiteFahrbahn.HasValue || m.MassnahmenvorschlagFahrbahn.HasValue);
            RuleFor(m => m.KostenTrottoirLinks)
            .ShouldNotBeEmpty(localizationService)
            .When(m => m.BreiteTrottoirLinks.HasValue || (!m.KostenTrottoirRechts.HasValue && m.MassnahmenvorschlagTrottoir.HasValue));
            RuleFor(m => m.KostenTrottoirRechts)
            .ShouldNotBeEmpty(localizationService)
            .When(m => m.BreiteTrottoirRechts.HasValue || (!m.KostenTrottoirLinks.HasValue && m.MassnahmenvorschlagTrottoir.HasValue));

            RuleFor(m => m.FeatureGeoJSONString).Must(json => json.HasText()).WithMessage(localizationService.GetLocalizedError(ValidationError.GeometryNull)).NotNull().NotEmpty();
            RuleFor(m => m.FeatureGeoJSONString).Must(geoJSONParseService.isAbschnittGISModelBaseValid).When(m => m.FeatureGeoJSONString.HasText()).WithMessage(localizationService.GetLocalizedError(ValidationError.InvalidGeometry));
        }
 public MassnahmenvorschlaegeAndererTeilsystemeController(
     IMassnahmenvorschlagTeilsystemeGISModelService massnahmenvorschlagTeilsystemeGISModelService,
     IMassnahmenvorschlagTeilsystemeGISOverviewModelService massnahmenvorschlagTeilsystemeGISOverviewModelService,
     IGeoJSONParseService geoJSONParseService,
     ILocalizationService localizationService)
 {
     this.localizationService = localizationService;
     this.geoJSONParseService = geoJSONParseService;
     this.massnahmenvorschlagTeilsystemeGISModelService         = massnahmenvorschlagTeilsystemeGISModelService;
     this.massnahmenvorschlagTeilsystemeGISOverviewModelService = massnahmenvorschlagTeilsystemeGISOverviewModelService;
 }
コード例 #6
0
        public AchsenSegmentModelValidator(IGeoJSONParseService geoJSONParseService, ILocalizationService localizationService)
            : base(localizationService)
        {
            RuleForNotNullableString(m => m.Name);

            RuleFor(m => m.FeatureGeoJSONString).Must(json => json.HasText())
            .WithMessage(localizationService.GetLocalizedError(ValidationError.GeometryNull)).NotNull().NotEmpty();

            RuleFor(m => m.FeatureGeoJSONString).Must(geoJSONParseService.isAchsenSegmentModelValid)
            .When(m => m.FeatureGeoJSONString.HasText())
            .WithMessage(localizationService.GetLocalizedError(ValidationError.GeometryNotSimple));
        }
コード例 #7
0
 public KoordinierteMassnahmenController(
     IKoordinierteMassnahmeGISModelService koordinierteMassnahmeGISModelService,
     IKoordinierteMassnahmeGISOverviewModelService koordinierteMassnahmeGISOverviewModelService,
     IMassnahmenvorschlagKatalogService massnahmenvorschlagKatalogService,
     IGeoJSONParseService geoJSONParseService,
     ILocalizationService localizationService)
 {
     this.localizationService = localizationService;
     this.geoJSONParseService = geoJSONParseService;
     this.massnahmenvorschlagKatalogService            = massnahmenvorschlagKatalogService;
     this.koordinierteMassnahmeGISModelService         = koordinierteMassnahmeGISModelService;
     this.koordinierteMassnahmeGISOverviewModelService = koordinierteMassnahmeGISOverviewModelService;
 }
        public MassnahmenvorschlagTeilsystemeGISModelValidator(IGeoJSONParseService geoJSONParseService, ILocalizationService localizationService)
            : base(localizationService)
        {
            RuleForNotNullableString(s => s.Projektname);
            RuleForNullableString(s => s.BezeichnungVon);
            RuleForNullableString(s => s.BezeichnungBis);
            RuleForNullableDecimal(k => k.Laenge).NotEmpty();
            RuleFor(s => s.Teilsystem).NotEmpty();
            RuleForNullableLongString(s => s.Beschreibung);
            RuleForNullableDecimal(s => s.Kosten, 0);

            RuleFor(m => m.FeatureGeoJSONString).Must(json => json.HasText()).WithMessage(localizationService.GetLocalizedError(ValidationError.GeometryNull)).NotNull().NotEmpty();
            RuleFor(m => m.FeatureGeoJSONString).Must(geoJSONParseService.isAbschnittGISModelBaseValid).When(m => m.FeatureGeoJSONString.HasText()).WithMessage(localizationService.GetLocalizedError(ValidationError.InvalidGeometry));
        }
コード例 #9
0
        public ZustandsabschnittGISModelValidator(IGeoJSONParseService geoJSONParseService, ILocalizationService localizationService, IZustandsabschnittGISService zustandsabschnittGISService, IStrassenabschnittGISService strassenabschnittGISService)
            : base(localizationService)
        {
            ZustandsabschnittCommonModelValidator.ApplyRules(this, localizationService);

            RuleFor(m => m.FeatureGeoJSONString).Must(json => json.HasText()).WithMessage(localizationService.GetLocalizedError(ValidationError.GeometryNull)).NotNull().NotEmpty();
            RuleForNullableInt(m => m.Abschnittsnummer);
            RuleForNullableDecimal(m => m.Laenge)
            .NotNull()
            .Must((m, p) => m.Laenge.HasValue && zustandsabschnittGISService.IsZustandsabschnittLaengeValid(m.StrassenabschnittGIS, m.Id, m.Laenge.Value))
            .When(m => m.FeatureGeoJSONString.HasText())
            .WithMessage(localizationService.GetLocalizedError(ValidationError.StrassenabschnittZustandsabschnittLaengeError), m => strassenabschnittGISService.GetById(m.StrassenabschnittGIS).Laenge);
            RuleFor(m => m.FeatureGeoJSONString).Must(geoJSONParseService.isAbschnittGISModelBaseValid).When(m => m.FeatureGeoJSONString.HasText()).WithMessage(localizationService.GetLocalizedError(ValidationError.InvalidGeometry));
        }
コード例 #10
0
 public RealisierteMassnahmenGISController(
     IRealisierteMassnahmeGISModelService realisierteMassnahmeGISModelService,
     IRealisierteMassnahmeGISOverviewModelService realisierteMassnahmeGISOverviewModelService,
     IMassnahmenvorschlagKatalogService massnahmenvorschlagKatalogService,
     IGeoJSONParseService geoJSONParseService,
     ILocalizationService localizationService,
     IBelastungskategorieService belastungskategorieService)
 {
     this.realisierteMassnahmeGISModelService         = realisierteMassnahmeGISModelService;
     this.realisierteMassnahmeGISOverviewModelService = realisierteMassnahmeGISOverviewModelService;
     this.massnahmenvorschlagKatalogService           = massnahmenvorschlagKatalogService;
     this.geoJSONParseService        = geoJSONParseService;
     this.localizationService        = localizationService;
     this.belastungskategorieService = belastungskategorieService;
 }
 public MassnahmenvorschlagTeilsystemeGISModelService(
     ITransactionScopeProvider transactionScopeProvider,
     IEntityServiceMappingEngine entityServiceMappingEngine,
     ISecurityService securityService,
     IAchsenReferenzService achsenReferenzService,
     IReferenzGruppeService referenzGruppeService,
     IGISService gisService,
     IGeoJSONParseService geoJSONParseService,
     IAchsenSegmentService achsenSegmentService)
     : base(transactionScopeProvider, entityServiceMappingEngine, securityService)
 {
     this.achsenReferenzService = achsenReferenzService;
     this.referenzGruppeService = referenzGruppeService;
     this.gisService            = gisService;
     this.geoJSONParseService   = geoJSONParseService;
     this.achsenSegmentService  = achsenSegmentService;
 }
コード例 #12
0
 public NetzdefinitionUndStrassenabschnittGISController(IStrassenabschnittGISService strassenabschnittGISService,
                                                        IAchsenSegmentService achsensegmentService,
                                                        IBelastungskategorieService belastungskategorieService,
                                                        IGeoJSONParseService geoJSONParseService,
                                                        ILocalizationService localizationService,
                                                        IInspektionsRouteGISService inspektionsRouteGISService,
                                                        IAbschnittGisValidationService abschnittGisValidationService) :
     base(strassenabschnittGISService)
 {
     this.localizationService           = localizationService;
     this.geoJSONParseService           = geoJSONParseService;
     this.strassenabschnittGISService   = strassenabschnittGISService;
     this.achsensegmentService          = achsensegmentService;
     this.belastungskategorieService    = belastungskategorieService;
     this.inspektionsRouteGISService    = inspektionsRouteGISService;
     this.abschnittGisValidationService = abschnittGisValidationService;
 }
コード例 #13
0
 public StrassenabschnittGISModelValidator(IGeoJSONParseService geoJSONParseService, ILocalizationService localizationService, IStrassenabschnittGISService strassenabschnittGISService)
     : base(localizationService)
 {
     StrassenabschnittCommonModelValidator.ApplyRules(this, localizationService);
     RuleFor(m => m.FeatureGeoJSONString).Must(json => json.HasText())
     .WithMessage(localizationService.GetLocalizedError(ValidationError.GeometryNull)).NotNull().NotEmpty();
     RuleForNullableInt(m => m.Abschnittsnummer);
     RuleFor(m => m.Laenge)
     .NotNull()
     .When(m => m.FeatureGeoJSONString.HasText())
     .InclusiveBetween(1, 50000)
     .When(m => m.FeatureGeoJSONString.HasText())
     .IsValidDecimalWithDecimalPlaces(1, LocalizationService)
     .When(m => m.FeatureGeoJSONString.HasText())
     .Must((m, p) => m.Laenge.HasValue && (m.Laenge.Value >= strassenabschnittGISService.GetSumOfZustandsabschnittLaenge(m.Id)))
     .WithMessage(localizationService.GetLocalizedError(ValidationError.StrassenabschnittZustandsabschnittLaengeError), m => m.Laenge)
     .When(m => m.FeatureGeoJSONString.HasText());
     RuleFor(m => m.FeatureGeoJSONString).Must(geoJSONParseService.isAbschnittGISModelBaseValid).When(m => m.FeatureGeoJSONString.HasText()).WithMessage(localizationService.GetLocalizedError(ValidationError.InvalidGeometry));
 }
コード例 #14
0
 public ZustandsabschnittGISService(
     ITransactionScopeProvider transactionScopeProvider,
     IEntityServiceMappingEngine entityServiceMappingEngine,
     ISecurityService securityService,
     IHistorizationService historizationService,
     IGISService gisService,
     IAchsenReferenzService achsenReferenzService,
     IReferenzGruppeService referenzGruppeService,
     IGeoJSONParseService geoJSONParseService,
     IFiltererFactory filtererFactory,
     IServerConfigurationProvider serverConfigurationProvider)
     : base(transactionScopeProvider, entityServiceMappingEngine, securityService, historizationService)
 {
     this.transactionScopeProvider = transactionScopeProvider;
     this.achsenReferenzService    = achsenReferenzService;
     this.referenzGruppeService    = referenzGruppeService;
     this.gisService                  = gisService;
     this.geoJSONParseService         = geoJSONParseService;
     this.filtererFactory             = filtererFactory;
     this.serverConfigurationProvider = serverConfigurationProvider;
 }
コード例 #15
0
 public InspektionsRouteGISService(
     ITransactionScopeProvider transactionScopeProvider,
     IEntityServiceMappingEngine entityServiceMappingEngine,
     IInspektionsRtStrAbschnitteService inspektionsRtStrAbschnitteService,
     IGeoJSONParseService geoJSONParseService,
     ISecurityService securityService,
     IHistorizationService historizationService,
     IInspektionsRouteStatusverlaufService inspektionsRouteStatusverlaufService,
     IInspektionsRouteLockingService inspektionsRouteLockingService,
     IStrassenabschnittGISService strassenabschnittGISService,
     IGISService gisService
     ) :
     base(transactionScopeProvider, entityServiceMappingEngine, securityService, historizationService)
 {
     this.gisService = gisService;
     this.strassenabschnittGISService          = strassenabschnittGISService;
     this.inspektionsRouteStatusverlaufService = inspektionsRouteStatusverlaufService;
     this.inspektionsRtStrAbschnitteService    = inspektionsRtStrAbschnitteService;
     this.inspektionsRouteLockingService       = inspektionsRouteLockingService;
     this.geoJSONParseService = geoJSONParseService;
 }
 public ZustaendeUndMassnahmenvorschlaegeGISController
 (
     IZustandsabschnittGISService zustandsabschnittGISService,
     IMassnahmenvorschlagKatalogService massnahmenvorschlagKatalogService,
     IFahrbahnZustandGISService fahrbahnZustandServiceBase,
     ITrottoirZustandGISService trottoirZustandServiceBase,
     IStrassenabschnittGISService strassenabschnittGISService,
     IAchsenSegmentService achsenSegmentService,
     IGeoJSONParseService geoJSONParseService,
     ILocalizationService localizationService,
     IAbschnittGisValidationService abschnittGisValidationService
 )
 {
     this.zustandsabschnittGISService       = zustandsabschnittGISService;
     this.massnahmenvorschlagKatalogService = massnahmenvorschlagKatalogService;
     this.strassenabschnittGISService       = strassenabschnittGISService;
     this.achsensegmentService          = achsenSegmentService;
     this.geoJSONParseService           = geoJSONParseService;
     this.localizationService           = localizationService;
     this.abschnittGisValidationService = abschnittGisValidationService;
     this.trottoirZustandServiceBase    = trottoirZustandServiceBase;
     this.fahrbahnZustandServiceBase    = fahrbahnZustandServiceBase;
 }
コード例 #17
0
        public KoordinierteMassnahmeGISModelValidator(ILocalizationService localizationService, IGeoJSONParseService geoJSONParseService)
            : base(localizationService)
        {
            RuleForNotNullableString(k => k.Projektname);
            RuleForNullableString(k => k.BezeichnungVon);
            RuleForNullableString(k => k.BezeichnungBis);
            RuleForNullableDecimal(k => k.Laenge).NotEmpty();
            RuleForNotNullableDecimal(s => s.BreiteFahrbahn, 2);
            RuleForNullableDecimal(s => s.BreiteTrottoirLinks, 2);
            RuleForNullableDecimal(s => s.BreiteTrottoirRechts, 2);
            RuleFor(s => s.BeteiligteSysteme).NotEmpty().WithMessage(localizationService.GetLocalizedError(ValidationError.BeteiligteSystemeEmpty));
            RuleForNullableDecimal(s => s.KostenGesamtprojekt, 0)
            .Must((model, value) => (value ?? 0) >= model.SumKosten)
            .When(m => m.KostenGesamtprojekt.HasValue)
            .WithMessage(localizationService.GetLocalizedError(ValidationError.KostenGesamtprojektGraterThanSum));
            RuleForNullableDecimal(s => s.KostenFahrbahn, 0);
            RuleForNullableDecimal(s => s.KostenTrottoirLinks, 0);
            RuleForNullableDecimal(s => s.KostenTrottoirRechts, 0);
            RuleForNullableLongString(k => k.Beschreibung);
            RuleForNullableString(k => k.LeitendeOrganisation);

            RuleFor(k => k.AusfuehrungsAnfang)
            .InclusiveBetween(Defaults.MinDateTime, Defaults.MaxDateTime)
            .Must((m, aa) => ValidateAusfuehrungsDatum(m))
            .WithMessage(LocalizationService.GetLocalizedError(ValidationError.AusfuehrungsAnfangAusfuehrungsEndeError));

            RuleFor(k => k.AusfuehrungsEnde)
            .InclusiveBetween(Defaults.MinDateTime, Defaults.MaxDateTime)
            .Must((m, ae) => ValidateAusfuehrungsDatum(m))
            .WithMessage(LocalizationService.GetLocalizedError(ValidationError.AusfuehrungsAnfangAusfuehrungsEndeError));

            RuleFor(m => m.FeatureGeoJSONString).Must(json => json.HasText()).WithMessage(localizationService.GetLocalizedError(ValidationError.GeometryNull)).NotNull().NotEmpty();
            RuleFor(m => m.FeatureGeoJSONString).Must(geoJSONParseService.isAbschnittGISModelBaseValid).When(m => m.FeatureGeoJSONString.HasText()).WithMessage(localizationService.GetLocalizedError(ValidationError.InvalidGeometry));
        }