public void Build(IListedCapabilityStatement statement)
 {
     foreach (var resource in ModelInfo.SupportedResources)
     {
         AddResourceCapability(statement, resource);
     }
 }
 public void Build(IListedCapabilityStatement statement)
 {
     if (_featureConfiguration.SupportsXml)
     {
         statement.Format.Add(KnownContentTypes.XmlContentType);
     }
 }
示例#3
0
 protected override void AddResourceCapability(IListedCapabilityStatement statement, string resourceType)
 {
     if (_featureEnabled)
     {
         statement.BuildRestResourceComponent(resourceType, x => x.ConditionalUpdate = true);
     }
 }
示例#4
0
        public void Build(IListedCapabilityStatement statement)
        {
            EnsureArg.IsNotNull(statement, nameof(statement));

            statement.SupportsInclude = true;

            foreach (var resource in ModelInfoProvider.GetResourceTypeNames())
            {
                statement.BuildRestResourceComponent(resource, builder =>
                {
                    builder.AddResourceVersionPolicy(ResourceVersionPolicy.NoVersion);
                    builder.AddResourceVersionPolicy(ResourceVersionPolicy.Versioned);
                    builder.AddResourceVersionPolicy(ResourceVersionPolicy.VersionedUpdate);
                    builder.ReadHistory  = true;
                    builder.UpdateCreate = true;
                });
            }

            if (_coreFeatures.SupportsBatch)
            {
                // Batch supported added in listedCapability
                statement.TryAddRestInteraction(SystemRestfulInteraction.Batch);
            }

            if (_coreFeatures.SupportsTransaction)
            {
                // Transaction supported added in listedCapability
                statement.TryAddRestInteraction(SystemRestfulInteraction.Transaction);
            }
        }
示例#5
0
        public void Build(IListedCapabilityStatement statement)
        {
            foreach (var resource in _modelInfoProvider.GetResourceTypeNames())
            {
                statement.TryAddRestInteraction(resource, TypeRestfulInteraction.HistoryType);
                statement.TryAddRestInteraction(resource, TypeRestfulInteraction.HistoryInstance);
            }

            statement.TryAddRestInteraction(SystemRestfulInteraction.HistorySystem);
        }
        public void Build(IListedCapabilityStatement statement)
        {
            EnsureArg.IsNotNull(statement, nameof(statement));

            foreach (var resource in ModelInfo.SupportedResources)
            {
                statement.BuildRestResourceComponent(resource, builder =>
                {
                    builder.AddResourceVersionPolicy(ResourceVersionPolicy.NoVersion);
                    builder.AddResourceVersionPolicy(ResourceVersionPolicy.Versioned);
                    builder.AddResourceVersionPolicy(ResourceVersionPolicy.VersionedUpdate);
                    builder.ReadHistory  = true;
                    builder.UpdateCreate = true;
                });
            }
        }
示例#7
0
        public void Build(IListedCapabilityStatement statement)
        {
            if (_securityConfiguration.Enabled)
            {
                var capabilityStatement = (ListedCapabilityStatement)statement;

                if (_securityConfiguration.EnableAadSmartOnFhirProxy)
                {
                    capabilityStatement.AddProxyOAuthSecurityService(_urlResolver, RouteNames.AadSmartOnFhirProxyAuthorize, RouteNames.AadSmartOnFhirProxyToken);
                }
                else
                {
                    capabilityStatement.AddOAuthSecurityService(_securityConfiguration.Authentication.Authority, _httpClientFactory, _logger);
                }
            }
        }
示例#8
0
        void IProvideCapability.Build(IListedCapabilityStatement statement)
        {
            EnsureArg.IsNotNull(statement, nameof(statement));

            foreach (KeyValuePair <string, IDictionary <string, SearchParameter> > entry in _typeLookup)
            {
                IEnumerable <CapabilityStatement.SearchParamComponent> searchParameters = entry.Value.Select(
                    searchParameter => new CapabilityStatement.SearchParamComponent
                {
                    Name = searchParameter.Key,
                    Type = searchParameter.Value.Type,
                });

                var resourceType = Enum.Parse <ResourceType>(entry.Key);

                var capabilityStatement = (ListedCapabilityStatement)statement;

                capabilityStatement.TryAddSearchParams(resourceType, searchParameters);
                capabilityStatement.TryAddRestInteraction(resourceType, CapabilityStatement.TypeRestfulInteraction.SearchType);
            }
        }
 protected virtual void AddResourceCapability(IListedCapabilityStatement statement, string resourceType)
 {
 }
 protected override void AddResourceCapability(IListedCapabilityStatement statement, string resourceType)
 {
     statement.TryAddRestInteraction(resourceType, TypeRestfulInteraction.Update);
 }