Commit Graph

1626 Commits

Author SHA1 Message Date
James Agnew f5f9dff391 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-12-18 14:09:20 -05:00
James Agnew bca958564f Just a javadoc change 2018-12-18 14:09:11 -05:00
jamesagnew 86b3e45a32 License header updates 2018-12-18 14:08:01 -05:00
Ken Stevens 84a34eb3c9
Subscription module support (#1147)
* Reorganizing packages and dependencies to support standalone subscription running within a CDR container where all hapi modules are on the classpath.

Moved Subscription registry out of interceptor and introduced SubscriptionLoader

* Created ActiveSubscription and moved cache bits into it

* Moved ExecutorQueue stuff out into its own class

* Add test and supporting code to validate SubscriptionConstants.EXT_SUBSCRIPTION_RESTHOOK_DELIVER_LATEST_VERSION behaviour

* Added SubscriptionCheckingSubscriber

* Moved a few beans to @ComponentScan

* Replaced use of beanFactory with concrete factory classes

* Switched test to use subscribablechannel

* Added SubscriptionLoaderFhirClientTest

* Confirm that our SubscriptionProviderFhirClient works with a live fhir client

* Register interceptors with DaoConfig instead of RestServer.
Also, Rename @VisibleForTesting methods with ForUnitTest

* Fix triggering service so it uses new subscriptionmatcherinterceptor

* Renamed "Database" classes to "Dao"

* processing -> matching naming change
2018-12-18 13:09:06 -05:00
James Agnew dc1f48ffed Test fix 2018-12-14 14:13:02 -05:00
James Agnew f978bc3039 Always apply new search params to any resource reindexing 2018-12-14 13:43:25 -05:00
James Agnew 11b8304cb4 Fix case sensitivity issue 2018-12-13 08:31:35 -05:00
James Agnew b442982310 Add media interceptor 2018-12-08 18:49:58 -05:00
James Agnew 5a80e70d93 Correctly reindex string indexes 2018-12-06 14:44:42 -05:00
James Agnew a5b1f684f7 Try to prevent intermittent test failure 2018-12-05 19:28:37 -05:00
James Agnew cbaa39fd63
Try to reuse index rows in JPA server (#1133)
* Try to reuse index rows in JPA server

* Address review comments

* One more test fix

* One more test
2018-12-05 19:25:59 -05:00
James Agnew d150340d53 One more test fix 2018-12-04 19:55:14 -05:00
James Agnew 29af6160d6 Fix typo 2018-12-04 18:54:26 -05:00
James Agnew 1d3bcd9e8f Fix indexing bug 2018-12-04 18:50:49 -05:00
James Agnew d9ce0ebf7c Unit test fix 2018-12-04 18:24:19 -05:00
James Agnew 8c7f249a21 Migrator enhancements and adjust reindexer to account for missing
versions
2018-12-04 17:33:29 -05:00
James Agnew c484c69664 Better error message for unqualified search parameter types 2018-12-03 13:14:10 -05:00
jamesagnew 82f40f0423 License header updates 2018-12-03 05:22:10 -05:00
Ken Stevens 6baee4dc3f
Standalone subscription (#1125) 2018-11-30 17:19:16 -05:00
James Agnew b2179b1696 Syntax fixes for the JPA migrator 2018-11-30 12:39:37 -05:00
James Agnew 364b6cc5fd One more test fix 2018-11-22 18:40:39 -05:00
James Agnew 055478e1f1 Test fixes 2018-11-22 18:22:33 -05:00
James Agnew ce3b7c82ce Avoid issues when using subscription delivery in a serializing/queuing
environment
2018-11-22 17:53:42 -05:00
James Agnew d0b194f9d7 Fix two test failures 2018-11-22 08:41:12 -05:00
James Agnew 2e030eebaa Make sure that reindexing happens correctly 2018-11-21 12:06:10 -05:00
James Agnew e8482f5c87 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-11-20 13:59:51 -05:00
James Agnew 7cbad7f4e3 A bit of cleanup around subscription wiring following in-memory matcher
landing
2018-11-20 13:59:31 -05:00
jamesagnew 4c84b8fc89 Add a bit more test logging 2018-11-20 05:33:32 -05:00
Ken Stevens 03ebcafdf5
In-memory matcher (#1116)
* Initial refactoring to move database matcher out into its own class

* MAJOR REFACTOR: Pulled indexing code out of BaseHapiFhirDao into a new class ResourceIndexedSearchParams

* Moved calculateHashes

* Replaced @Bean definitions in BaseConfig.java with @ComponentScan

Annotated bean classes with either @Service (if it's stateless) or @Component (if it's stateful).  It doesn't really matter which annotation is used, but it's helpful to see at a glance whether a bean is stateful or stateless.

* Move services out of BaseHapiFhirDao

Moved services required by ResourceIndexedSearchParams out of BaseHapiFhirDao and into new classes called LogicalReferenceHelper, IdHelperService, MatchUrlService, and DaoProvider.

Converted SearchBuilder into Prototype Bean

Mark Spring components that depend on daos and entitymanagers with @Lazy so they aren't picked up by hapi-fhir-spring-boot-autoconfigure.

* Added SubscriptionMatcherInMemory

Moved static data out of BaseHapiFhirDao into ResourceMetaParams

Moved translateMatchUrl methods out of BaseHapiFhirDao into MatchUrlService bean

Simplified SubscriptionMatcherInMemory to not depend on entity or dao

Turned all subscribers into prototype beans

* Moved searchParam method out to mySearchParamProvider

Also removed dao and contest parameters from of myMatchUrlService methods

Moved code out of SearchBuilder into SearchParameterMap.clean() so it can be used by inMemoryMatcher

Introduced a new composite subscription matcher that tries to match in memory and if it finds a parameter in the criteria it doesn't support, it falls back to the database matcher.

* Added support for references

Also fixed a small bug in SearchParameterMap that was missing the ";" after "_has" when creating a normalized query from search params.

* Finished implementing all tests from FhirResourceDaoR4SearchNoFtTest

* Make in-memory matcher configurable, disabled by default

* Validate Subscription criteria when they're submitted

Send HTTP 422 UnprocessableEntityException if the criteria fail validation.

* fixed Sonar "Blocker" issues.

*  Don't reload the resource before sending it out

Since we can always force a reload using restHookDetails.isDeliverLatestVersion

* Added tests to cover Custom Search param.

* Split ResourceIndexedSearchParam into separate state and service classes

* Cleaned up SearchBuilder.

Removed uses of myCallingDao as an injection mechanism.
Left // FIXME KHS cookie crumbs to clean up

* Reduced dependencies on BaseHapiFhirDao

Removed methods from IDao interface that were used for injection

* Updated change log
2018-11-19 16:19:52 -05:00
James Agnew 45a5db6fd8 One more fix 2018-11-19 13:31:01 -05:00
James Agnew 719339fc14 One more test fix 2018-11-19 10:27:16 -05:00
James Agnew 67dbc802be Better detection of binary content in ResponseHighlighterInterceptor 2018-11-18 14:32:54 +01:00
James Agnew fad53c6669 Fix a test 2018-11-16 13:15:14 +01:00
James Agnew 6a6451f694 Reduce number of queries on some DB operations 2018-11-16 12:41:50 +01:00
James Agnew 1de0ef405c Clean up test compile and reenable GraphQL on hapi.fhir.org 2018-11-16 11:15:44 +01:00
James Agnew 84acafe3af Streamline expunge operation 2018-11-15 11:37:16 +01:00
James Agnew 75210d614b Bump to 3.7.0-SNAPSHOT 2018-11-12 22:37:52 -05:00
James Agnew 63af04a7b4 Prepare for 3.6.0 release 2018-11-12 05:40:55 -05:00
jamesagnew 030b33a0f2 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-11-09 15:59:34 -05:00
jamesagnew 4a0c45a494 License updates 2018-11-09 15:59:23 -05:00
James Agnew c81a59bb9a Only use FHIRPath to validate searchparameterr paths in R4 2018-11-09 15:57:34 -05:00
James Agnew 7f6f06dddf Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-11-09 15:47:22 -05:00
James Agnew 5834e6aa62 Test fixes 2018-11-09 15:32:55 -05:00
jamesagnew 3942f1bb29 License header updates 2018-11-09 14:41:57 -05:00
James Agnew f61df5c3fe Use FHIRPath expression parser for custom SP validation 2018-11-09 14:41:20 -05:00
jamesagnew a3e79b5759 License updates only 2018-11-08 15:28:09 -05:00
James Agnew 3ae5f9a3b7 Build tweak 2018-11-08 14:04:21 -05:00
James Agnew cca49425ae Some work on collection processing 2018-11-08 08:56:51 -05:00
James Agnew 76cd3f6b47 Allow client assigned IDs to be purely numeric in JPA server if
configured to do so
2018-11-07 18:25:50 -05:00
James Agnew 62145e1b74 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-11-07 11:02:02 +01:00