Commit Graph

226 Commits

Author SHA1 Message Date
James Agnew 48c10bddc5
Narrative Generator refactoring (#1219)
* Starting work on this

* Working on narrative templates

* Work on new narrative system

* Account for some failing tests due to refactoring of narrative mode

* Another test fix

* More test fixes

* One more test fix

* Work on searches

* Address review comments
2019-02-27 14:59:57 -05:00
James Agnew 72c4726328 Tweaks to the way that subscriptions are serialized 2019-02-17 19:17:51 -05:00
Ken Stevens 3af0bc7206 changes needed to support different number of consumers in matching vs delivery 2019-02-17 15:23:01 -05:00
James Agnew 14e04085ae Try for a test fix and a bit of cleanup 2019-02-16 16:11:33 -05:00
James Agnew c6fcb4fcbf Allow canonical subscription to hold multiple extensions with the same
URL
2019-02-16 15:28:39 -05:00
Ken Stevens badbde7e4a SubscriptionRegistry re-uses channel and handlers if channel type didn't change when subscription is updated 2019-02-14 19:38:31 -05:00
Ken Stevens 435f57335d sonar 2019-02-13 20:50:04 -05:00
Ken Stevens 455761f9b3 fix npe 2019-02-13 16:54:38 -05:00
Ken Stevens 68171ba950 don't call SUBSCRIPTION_BEFORE_PERSISTED_RESOURCE_CHECKED and SUBSCRIPTION_AFTER_PERSISTED_RESOURCE_CHECKED for DELETE operations (since we don't currently match subscriptions for DELETE operations) 2019-02-12 14:25:36 -05:00
James Agnew a5e10740c0
Merge pull request #1194 from jamesagnew/ja_more_subscription_logger
More subscription logger work
2019-02-09 11:45:25 -05:00
James Agnew 4699c51997 Address review comments 2019-02-08 17:26:34 -05:00
Ken Stevens f40614a1aa fixed bug in in-memory matching for reference id when searchparam has two components 2019-02-08 16:37:08 -05:00
James Agnew 0f8c8d18e2 Bump version to 3.8.0-SNAPSHOT 2019-02-06 20:02:28 -05:00
jamesagnew 207015c3af Version bump to 3.7.0 2019-02-05 21:36:38 -05:00
jamesagnew d4af1ee2a3 Add tests and license headers 2019-02-04 16:34:39 -05:00
James Agnew 88eb2c424e formatting 2019-02-04 13:50:47 -05:00
James Agnew 87a6c24bde More subscription logger work 2019-02-04 13:49:10 -05:00
James Agnew 447c394cac
Ja subscription debug logger (#1190)
Squashed commit adding subscription debug logger

* Work on subscription debug logger

* Add subscription logging interceptor

* Remove unneeded variables

* A bit of cleanup

* Tweak the output logs a bit

* Address review comments
2019-02-03 16:33:54 -05:00
Ken Stevens 4a49a9362e just clearing the cache doesn't shut down the channel consumers. Switching to unregisterAll 2019-02-02 19:26:20 -05:00
Ken Stevens 84db66d2e3 fixed 2019-02-02 19:07:06 -05:00
Ken Stevens 37670ac039 actually, we shouldn't be trying to match on deleted resources. Corrected assertion in test. 2019-02-02 19:00:14 -05:00
Ken Stevens 4106d67eb7 ready for review 2019-02-02 18:03:09 -05:00
Ken Stevens dd0b56142d found another bug in standalone subscriptions 2019-02-02 17:14:05 -05:00
Ken Stevens 6616fbc9bb added CannonicalSubscription.toString() 2019-02-02 13:15:07 -05:00
Ken Stevens 9280cde491
Subscription only registers active (#1189)
* Fixed a bug in standalone subscription subscriber:  It was adding REQUESTED subscriptions to the active subscription registry.  (Only ACTIVE subscriptions should be added.)
2019-02-01 10:14:46 -05:00
jamesagnew 503d1d8aff Subscription NPE fix 2019-01-26 18:42:01 -05:00
Ken Stevens 10c59fceeb
Subscription strategy tag (#1178)
tests pass
2019-01-25 13:01:04 -05:00
James Agnew f55be0b6d0 Test fix 2019-01-25 10:56:17 -05:00
James Agnew 38d03ea99a
Invalid ids in subscription queue (#1175)
* Start work on this

* Work on interceptors

* Attempt fix

* Avoid environment dependency

* Test fixes

* One more test fix

* One more build tweak

* Lots of cleanup

* A bit more cleanup

* Still more cleanup

* Some test fixes

* Add legacy methods temporarily

* Don't auto-scan interceptor beans

* One more test fix

* rsolve merge conflicts

* Address review comments
2019-01-23 21:17:47 -05:00
Ken Stevens 0eb70b81fe Oops. This was supposed to be automatically backed out. But SQUASH MERGE prevented that from happening. Hmmmmm...... 2019-01-23 18:13:29 -05:00
Ken Stevens cdd75bbe3a Merge branch 'master' into windows-fixes
# Conflicts:
#	hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionDeliveringRestHookSubscriber.java
2019-01-23 17:16:08 -05:00
Ken Stevens 5a08593abd
_id support (#1176)
* added support for _id in in-memory matcher
2019-01-23 14:37:34 -05:00
Ken Stevens 707bf07099 optimistic the windows tests will now finally pass! 2019-01-23 11:57:59 -05:00
Ken Stevens 2c7eb39b29 final batch of windows fixes (to deal with jumpy windows clock)
also added semaphore to PointcutLatch
2019-01-22 18:53:54 -05:00
Ken Stevens 6b22977d7c fixing more tests for Windows 2019-01-21 22:28:48 -05:00
Ken Stevens c92cbdd3e2 Merge remote-tracking branch 'remotes/origin/submit-retry-extension' into windows-fixes 2019-01-21 20:35:04 -05:00
Ken Stevens 00320da9dc Merge branch 'master' into windows-fixes 2019-01-21 20:34:01 -05:00
Ken Stevens a6d1cc56c7 added maxRetriex extension to canonical subscription 2019-01-21 16:58:14 -05:00
James Agnew 9cf64f78d0 Deprecate a bad setter on RetfulServer, fix a paging issue, and add a
disabled unit test to the subscription matcher
2019-01-21 14:46:17 -05:00
Ken Stevens 29f483d7b4 Merge branch 'master' into windows-fixes 2019-01-21 11:06:42 -05:00
Ken Stevens b4350bbdae Working through failed tests. Consolidating sleep calls 2019-01-21 11:05:53 -05:00
jamesagnew 690af1c7ff Add interceptor example 2019-01-20 19:43:08 -05:00
Ken Stevens 10aa6c9f07 Merge branch 'master' into windows-fixes
# Conflicts:
#	hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/interceptor/api/Pointcut.java
#	hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/cache/SubscriptionRegistry.java
2019-01-20 17:04:16 -05:00
James Agnew c3c7d156e9 Interceptor cleanup 2019-01-20 10:16:18 -05:00
Ken Stevens b3bdbea19c Merge branch 'master' into windows-fixes
quickly update tests to new interceptor
2019-01-20 09:39:34 -05:00
Ken Stevens f7e05f6e58 Merge branch 'master' into windows-fixes
quickly update tests to new interceptor
2019-01-20 09:39:14 -05:00
jamesagnew cd1e0e881c Add headers 2019-01-19 18:31:17 -05:00
jamesagnew b0cbd52ae9 Interceptor cleanup 2019-01-19 18:01:00 -05:00
James Agnew 29c3cee287
Merge pull request #1172 from jamesagnew/ja-subscription-interceptors
Ja subscription interceptors
2019-01-19 07:13:14 -06:00
James Agnew 3e84173180 Merge branch 'master' into ja-subscription-interceptors 2019-01-18 17:52:23 -05:00
Ken Stevens 3d07fc1c22
fixed null subscription id (#1170)
* fixed null subscription id
2019-01-18 10:39:35 -05:00
James Agnew 5ce9d444e9 Work on interceptors 2019-01-18 09:04:45 -05:00
jamesagnew 5fd084d7cf Fix a couple of merge conflicts 2019-01-18 05:47:37 -05:00
Volker Schmidt 432ad8e5bc Subscription without Payload did not contain header. 2019-01-18 05:41:47 -05:00
Ken Stevens 7ffbe9505b Prototype.
Not working yet.
2019-01-16 23:35:14 -05:00
Ken Stevens 19afcb7e09 all tests pass 2019-01-15 18:22:08 -05:00
Ken Stevens 4f5640e541
Resilient searchparamregistry (#1165)
SearchParamRegistry and SubscriptionRegistry now both poll retrying connection to the server. This will help in particular in the scenario where the subscriptions are managed in a standalone server that depends on a FHIR Server being available to pull search parameters and subscriptions from.
2019-01-14 11:39:28 -05:00
James Agnew 93bf2788ec Add subscription narrowing interceptor and refactor RuleBuilder to be a
bit cleaner
2019-01-12 14:23:26 -06:00
Ken Stevens 0b6c4fb450 improved test name 2019-01-09 13:39:32 -05:00
Ken Stevens 5671ca88ca Simplified access to extension 2019-01-09 13:39:32 -05:00
Ken Stevens 3142ebb892 Fixed typo in class name
Added channel extensions to CanonicalSubscription
2019-01-09 13:39:32 -05:00
Ken Stevens d809569a2d Added new DaoConfig parameter to control whether subscription matching happens on this server. 2019-01-09 13:39:32 -05:00
jamesagnew a8a97ae6b2 Two test fixes 2019-01-07 09:18:11 -05:00
jamesagnew 8f8385627f Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-01-05 11:33:08 -05:00
jamesagnew 98d93df12a License header updates 2019-01-04 16:22:15 -05:00
James Agnew 5b8fee869e Add config options for default Prefer header and _total param on server 2019-01-04 16:12:45 -05:00
James Agnew f39cf58a4a Test fix 2019-01-04 11:29:14 -05:00
James Agnew a1275874f8 Correct subscription delivery metadata 2019-01-04 10:56:21 -05:00
James Agnew 14a132a937 Squashed commit of the following:
commit 9659655830
Author: James Agnew <jamesagnew@gmail.com>
Date:   Thu Dec 27 17:54:25 2018 -0500

    Finish sync

commit 70da25b76f
Author: jamesagnew <jamesagnew@gmail.com>
Date:   Thu Dec 27 10:32:51 2018 -0500

    Work on RI4 sync
2018-12-27 17:58:47 -05:00
jamesagnew 49e418edf0 Adjust migrator to handle updated Hibernate version 2018-12-23 15:11:44 -05:00
Ken Stevens fedc59a8d6 Subscription module startup changes (#1154)
* Reorganizing packages and dependencies to support standalone subscription running within a CDR container where all hapi modules are on the classpath.

* EXPERIMENTAL: Moved Subscription registry out of interceptor and introduced ISubscriptionLoader that will be either a Database or FhirClient loader.

5 tests fail.  Looks like we're getting too many matches--likely because there is now just one list of subscriptions instead of one list per interceptor.

* Created ActiveSubscription and moved cache bits into it

* Compiles.  Next step is get app context to load.

* Application context loads.  Now fix NullPointer.

* All subscription tests pass

* FIXME cleanup

* jpa-subscription tests

* fixed config so other module tests work

* MAJOR MILESTONE: All hapi-fhir tests pass.

updated READMEs in example projects

* Moved ExecutorQueue stuff out into its own class

* Organize Imports

* FIXME cleanup

* Null check -> Optional

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

* Added SubscriptionCheckingSubscriber test that works without a database

* Moved a few beans to @ComponentScan

* Replaced use of beanFactory with concrete factory classes

* Switched test to use subscribablechannel

* Added SubscriptionLoaderFhirClientTest

* Undid changes that caused SearchParamProviderFhirClientTest to revert to the Database version.  It's now calling the FhirClient version again.  (oops)

* Confirm that our SubscriptionProviderFhirClient works with a live fhir client

* Organize imports

* Organize imports

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

* Ready to go

* organize imports

* add processing queue

* Fixed interface implementation names

* Fix triggering service so it uses new subscriptionmatcherinterceptor

* fixed example

* Renamed "Database" classes to "Dao"

* Tightened up StoppableSubscriber API

* final code review

* processing -> matching naming change

* fix required by CDR

* oops

* Updated changes.xml

* Renamed subscriptioncheckingsubscriber to subscriptionmatchingsubscriber

* Renamed subscriptioncheckingsubscriber to subscriptionmatchingsubscriber

* CDR integration now works

* Changing subscribable channel abstraction layer in preparation for supporting more types of subscribable channels

* Add interface over both types of messages put on queues

* cosmetic change

* added subscription support for r4

* fixed again

* oops

* self code-review
2018-12-23 13:52:26 -05:00
James Agnew a0cb7edd08 Version bump a few dependencies 2018-12-22 20:13:03 -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
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