Example #1
0
 public DummyEvidenceFilterBase(
     IClaimsDatastore <ClaimsBase> claimDatastore,
     ISolutionsDatastore solutionDatastore,
     IHttpContextAccessor context) :
     base(claimDatastore, solutionDatastore, context)
 {
 }
        protected ReviewsValidatorBase(
            IReviewsDatastore <ReviewsBase> reviewsDatastore,
            IEvidenceDatastore <EvidenceBase> evidenceDatastore,
            IClaimsDatastore <ClaimsBase> claimDatastore,
            ISolutionsDatastore solutionDatastore,
            IHttpContextAccessor context,
            ILogger <ReviewsValidatorBase <T> > logger) :
            base(context, logger)
        {
            _reviewsDatastore  = reviewsDatastore;
            _evidenceDatastore = evidenceDatastore;
            _claimDatastore    = claimDatastore;
            _solutionDatastore = solutionDatastore;

            RuleSet(nameof(IReviewsLogic <T> .Create), () =>
            {
                MustBeValidEvidenceId();
                MustBeSupplier();
                SolutionMustBeInReview();
                MustBeFromSameOrganisation();
                MustBeValidPreviousId();
                PreviousMustBeForSameEvidence();
                PreviousMustNotBeInUse();
            });
        }
 public DummyClaimsLogicBase(
     IClaimsDatastore <ClaimsBase> datastore,
     IClaimsFilter <ClaimsBase> filter,
     IHttpContextAccessor context) :
     base(datastore, filter, context)
 {
 }
 public DummyClaimsEvidenceBlobStoreValidatorBase(
     IHttpContextAccessor context,
     ILogger <DummyClaimsEvidenceBlobStoreValidatorBase> logger,
     ISolutionsDatastore solutionsDatastore,
     IClaimsDatastore <ClaimsBase> claimsDatastore) :
     base(context, logger, solutionsDatastore, claimsDatastore)
 {
 }
Example #5
0
 public DummyReviewsFilterBase(
     IEvidenceDatastore <EvidenceBase> evidenceDatastore,
     IClaimsDatastore <ClaimsBase> claimDatastore,
     ISolutionsDatastore solutionDatastore,
     IHttpContextAccessor context) :
     base(evidenceDatastore, claimDatastore, solutionDatastore, context)
 {
 }
 protected ClaimsLogicBase(
     IClaimsDatastore <T> datastore,
     IClaimsFilter <T> filter,
     IHttpContextAccessor context) :
     base(context)
 {
     _datastore = datastore;
     _filter    = filter;
 }
 public DummyEvidenceValidatorBase(
     IEvidenceDatastore <EvidenceBase> evidenceDatastore,
     IClaimsDatastore <ClaimsBase> claimDatastore,
     ISolutionsDatastore solutionDatastore,
     IHttpContextAccessor context,
     ILogger <DummyEvidenceValidatorBase> logger) :
     base(evidenceDatastore, claimDatastore, solutionDatastore, context, logger)
 {
 }
Example #8
0
 public EvidenceFilterBase(
     IClaimsDatastore <ClaimsBase> claimDatastore,
     ISolutionsDatastore solutionDatastore,
     IHttpContextAccessor context) :
     base(context)
 {
     _claimDatastore    = claimDatastore;
     _solutionDatastore = solutionDatastore;
 }
Example #9
0
 public DummyClaimsValidatorBase(
     IHttpContextAccessor context,
     ILogger <DummyClaimsValidatorBase> logger,
     IClaimsDatastore <ClaimsBase> claimDatastore,
     IContactsDatastore contactsDatastore,
     ISolutionsDatastore solutionsDatastore) :
     base(context, logger, claimDatastore, contactsDatastore, solutionsDatastore)
 {
 }
Example #10
0
 public DummyClaimsLogicBase(
     IClaimsBaseModifier <ClaimsBase> modifier,
     IClaimsDatastore <ClaimsBase> datastore,
     IClaimsValidator <ClaimsBase> validator,
     IClaimsFilter <ClaimsBase> filter,
     IHttpContextAccessor context) :
     base(modifier, datastore, validator, filter, context)
 {
 }
 protected ReviewsFilterBase(
     IEvidenceDatastore <EvidenceBase> evidenceDatastore,
     IClaimsDatastore <ClaimsBase> claimDatastore,
     ISolutionsDatastore solutionDatastore,
     IHttpContextAccessor context) :
     base(context)
 {
     _evidenceDatastore = evidenceDatastore;
     _claimDatastore    = claimDatastore;
     _solutionDatastore = solutionDatastore;
 }
Example #12
0
 protected ClaimsLogicBase(
     IClaimsBaseModifier <T> modifier,
     IClaimsDatastore <T> datastore,
     IClaimsValidator <T> validator,
     IClaimsFilter <T> filter,
     IHttpContextAccessor context) :
     base(context)
 {
     _modifier  = modifier;
     _datastore = datastore;
     _validator = validator;
     _filter    = filter;
 }
Example #13
0
        protected ClaimsValidatorBase(
            IHttpContextAccessor context,
            ILogger <ClaimsValidatorBase <T> > logger,
            IClaimsDatastore <T> claimDatastore,
            IContactsDatastore contactsDatastore,
            ISolutionsDatastore solutionsDatastore) :
            base(context, logger)
        {
            _claimDatastore     = claimDatastore;
            _contactsDatastore  = contactsDatastore;
            _solutionsDatastore = solutionsDatastore;

            RuleSet(nameof(IClaimsLogic <T> .Create), () =>
            {
                MustBeValidSolutionId();
                MustBeSameOrganisation();
                MustBePending();
                MustBeValidOwnerId();
                OwnerMustBeSameOrganisation();
            });

            RuleSet(nameof(IClaimsLogic <T> .Update), () =>
            {
                MustBeValidId();
                MustBeValidSolutionId();
                MustBeSameSolution();
                MustBeSameOrganisation();
                MustBeValidStatusTransition();
                MustBeValidOwnerId();
                OwnerMustBeSameOrganisation();
            });

            RuleSet(nameof(IClaimsLogic <T> .Delete), () =>
            {
                MustBeValidId();
                MustBeValidSolutionId();
                MustBeSameOrganisation();
                MustBePending();
            });
        }
        public ClaimsEvidenceBlobStoreValidatorBase(
            IHttpContextAccessor context,
            ILogger <ClaimsEvidenceBlobStoreValidatorBase> logger,
            ISolutionsDatastore solutionsDatastore,
            IClaimsDatastore <ClaimsBase> claimsDatastore) :
            base(context, logger)
        {
            _solutionsDatastore = solutionsDatastore;
            _claimsDatastore    = claimsDatastore;

            // claimId
            RuleSet(nameof(IEvidenceBlobStoreLogic.AddEvidenceForClaim), () =>
            {
                MustBeValidClaim();
                MustBeSameOrganisation();
            });

            // claimId
            RuleSet(nameof(IEvidenceBlobStoreLogic.GetFileStream), () =>
            {
                MustBeValidClaim();
                MustBeSameOrganisation();
            });

            // claimId
            RuleSet(nameof(IEvidenceBlobStoreLogic.EnumerateFolder), () =>
            {
                MustBeValidClaim();
                MustBeSameOrganisation();
            });

            // solutionId
            RuleSet(nameof(IEvidenceBlobStoreLogic.EnumerateClaimFolderTree), () =>
            {
                MustBeSameOrganisationById();
            });
        }