Commit Graph

68 Commits

Author SHA1 Message Date
Oliver Drotbohm
9e61d0d225 GH-110 - Remove deprecations and fix Javadoc warnings. 2025-02-14 17:20:30 +01:00
Oliver Drotbohm
e5021d0765 GH-110 - Switch to JSpecify for nullness analysis. 2025-02-14 16:54:47 +01:00
Oliver Drotbohm
509da3be5a GH-108 - Re-introduce PluginRegistryFactoryBean to implement ApplicationContextAware and Initializing bean.
We now implement the aforementioned interfaces again in deprecated form to allow the new arrangement to be a drop-in replacement for the old approach.
2025-02-14 15:31:02 +01:00
Oliver Drotbohm
b8a62c8caa GH-108 - Simplify collection of backing bean lists for PluginRegistry instances.
We now use the API newly introduced in Spring Framework 6.2.3 / 7.0 M2 to select filtered bean instances from an ObjectProvider (via ….stream(Predicate<Class<?>> filter)). This allows us to avoid having to proxy a List as the ultimate target for the plugin registry. Instead, we can switch to a simple Supplier (SingletonSupplier in particular) to delay the actual bean lookup.

String first pass of refactorings and reducing the exposure of intermediate types previously necessary to also be able to handle the ability to inject lists of beans (see GH-107). Also remove the previously AOT runtime hints registration.
2025-02-13 12:48:06 +01:00
Oliver Drotbohm
5c6105d208 GH-107 - Remove support for injecting lists of beans. 2025-02-13 12:42:54 +01:00
Oliver Drotbohm
4d7d024c98 GH-106 - Remove support for XML namespace. 2025-02-13 12:42:34 +01:00
Oliver Drotbohm
e9a0184556 GH-103 - Upgrade to Spring Framework 7.0 M2. 2025-02-13 11:10:46 +01:00
Oliver Drotbohm
63a641de90 #85 - Remove obsolete manual hint for PluginRegistryFactoryBean.
As spring-projects/spring-framework#28913 has been fixed.
2022-08-03 15:11:30 +02:00
Oliver Drotbohm
de36c2147f #85 - Open up PluginRegistryFactoryBean.setType(…) for native reflection. 2022-08-02 14:19:48 +02:00
Oliver Drotbohm
6b29956553 #85 - Register runtime hints for native proxy creation. 2022-08-02 13:41:27 +02:00
Oliver Drotbohm
35371796af #85 - Tweak plugin registry bean definitions to behave better on AOT.
We now set a fully genericised root bean type in the first place, tweak the bean definition's target type as we did before but still set the beanClass property to the original PluginRegistryFactoryBean type.
2022-08-02 13:38:25 +02:00
Oliver Drotbohm
183dd383d0 #76 - Upgrade to JUnit 5. 2021-09-20 17:06:50 +02:00
Spring Operator
f8b2b83065 #54 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://www.springframework.org/schema/plugin/spring-plugin.xsd (404) with 1 occurrences migrated to:
  https://www.springframework.org/schema/plugin/spring-plugin.xsd ([https](https://www.springframework.org/schema/plugin/spring-plugin.xsd) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://www.springframework.org/schema/beans/spring-beans.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans.xsd ([https](https://www.springframework.org/schema/beans/spring-beans.xsd) result 200).
* http://maven.apache.org/maven-v4_0_0.xsd with 3 occurrences migrated to:
  https://maven.apache.org/maven-v4_0_0.xsd ([https](https://maven.apache.org/maven-v4_0_0.xsd) result 301).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 6 occurrences
* http://www.springframework.org/schema/beans with 2 occurrences
* http://www.springframework.org/schema/plugin with 2 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 4 occurrences
2019-09-23 14:12:38 +02:00
Spring Operator
00fe8dabb4 #58 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 27 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-09-23 14:10:53 +02:00
Oliver Drotbohm
907c541633 #53 - Polishing. 2019-03-18 19:41:18 +01:00
Oliver Drotbohm
ec7ca4fb92 #53 - Tightened nullability contract and added nullability annotations. 2019-03-18 19:41:09 +01:00
Oliver Drotbohm
4f05683a85 #48 - Aligned factory methods in SimplePluginRegistry with OrderAwarePluginRegistry. 2019-03-04 16:13:19 +01:00
Oliver Drotbohm
c26af82abf #45 - Polishing.
Mostly trailing whitespace.
2019-02-01 15:27:01 +01:00
Oliver Drotbohm
764772cb13 #45 - Introduced PluginRegistry.of(…) factory methods.
The introduced methods mostly mimic the ones available on OrderAwarePluginRegistry except the one that's implying a certain order in the first place. Also introduced ….of(…) factory methods on OrderAwarePluginRegistry and deprecated the ….create(…) ones.
2019-02-01 15:26:40 +01:00
Oliver Gierke
e6b652d240 #42 - Java 8 cleanups in OrderAwarePluginRegistry.
Removed deprecated use of InvertibleComparator in favor of Java 8's Comparator.reversed(). Made comparator field final. Added non-null assertions. Removed superfluous generic method type hints. Javadoc.
2017-04-21 08:06:23 +02:00
Oliver Gierke
1298d05e9f #41 - Polishing.
Javadoc.
2017-04-21 08:03:32 +02:00
Oliver Gierke
856f662cf9 #41 - Added PluginRegistry.getRequiredPlugin(…).
Added aforementioned method for clients to look up a required plugin with the registry throwing a default exception if none is found. An overload taking a Supplier<String> is available to customize the exception message if needed.
2017-04-21 08:03:23 +02:00
Oliver Gierke
605b22ed82 #37, #38 - Move to Java 8 concepts in PluginRegistry API.
Moved to Optional instead of null values in the API. Removed deprecated methods in favor of methods taking a Supplier for both exceptions to be thrown or plugin defaults.
2017-02-14 12:00:36 +01:00
Marco Collovati
0429686b46 #29 - Fixed assertion in OrderAwarePluginRegistryUnitTest.assertOrder
Fixed assertion to compare result with expected object.

Original pull request: #30.
2017-01-31 11:38:06 +01:00
Oliver Gierke
2abef3aafc #31 - Move away from deprecated assertion methods in Spring 5.
We now consistently use Assert.notNull(…) et al that take an error message as the overload without a message have been deprecated in Spring 5.

Added build profile for Spring 5 releases and snapshots.
2017-01-31 10:48:22 +01:00
Oliver Gierke
a800aa0ecc #18 - Explicitly declare bean definitions target type for plugin registries.
We now use the API introduced in Spring Framework 4.3.3 to explicitly declare a ResolvableType for the BeanDefinition of the plugin registries. This allows to autowire registries as PluginRegisty<Foo, …> and PluginRegistry<Bar, …> without using explicit qualifiers.
2016-08-30 11:53:32 +02:00
Oliver Gierke
ad017e83cd #19 - Exceptions on plugin lookup can now be submitted lazily.
Introduced overloads on PluginRegistry which instead of taking an exception instance immediately (which requires instance creation beforehand) now accept a Supplier<E> so that the exception creation can actually be delayed until it's really needed.

Deprecated the old methods taking exception instances directly.
2016-01-28 10:24:15 +01:00
Oliver Gierke
cfddee95c1 #2 - Added Logback configuration and ditched Log4J. 2012-11-22 10:25:47 +01:00
Oliver Gierke
ccadfe6a50 #3 - Fixed declaration of exported type in namespace XSD. 2012-11-22 10:04:26 +01:00
Oliver Gierke
50857dc867 BeanListFactoryBean creates defensive copy of beans found.
This is necessary to the sorting applied correctly as it would be dropped through the proxy access otherwise.
2012-10-29 14:52:07 +01:00
Oliver Gierke
30e2b2c2fe Added support for exclusions to AbstractTypeAwareSupport.
AbstractTypeAwareSupport now takes an array of type to be excluded from the bean lookup. The BeansOfTypeTaregtSource's actual bean lookup was changed to not trigger bean creation of types to be excluded.
2012-10-29 14:51:26 +01:00
Oliver Gierke
ed7014cd31 Improvements in PluginRegistry implementations.
Improved constructor delegation in OrderAwarePluginRegistry correctly passing empty collections instead of null now. SimplePluginRegistry avoids to look up all plugins for the getPluginFor(…) call. Instead it eagerly returns the first one matching immediately.
2012-10-29 14:49:44 +01:00
Oliver Gierke
f1d9a630f4 Added support for creating PluginRegistry instances via JavaConfig.
Introduced @EnablePluginRegistries to list the Plugin interfaces the container shall expose PluginRegistry instances for.
2012-10-26 13:05:45 +02:00
Oliver Gierke
6d656bc328 #1 - Added integration test for ordering in OrderAwarePluginRegistry.
Expose that we return OrderAwarePluginRegistry from the factory bean to enable auto wiring the implementation type directly.
2012-10-26 13:03:57 +02:00
Oliver Gierke
c0e01afed2 #1 - Restructuring of internals to fix ordering not being applied.
Introduced PluginRegistrySupport base class to make sure we create a copy of the plugin list on first access to it as otherwise the sorting calls get lost in the proxy created by the AbstractTypeAwareSupport.

Removed MutablePluginRegistry interfaces and implementation along the way as it causes more bad than good currently and there doesn't seem to be a real need for it.
2012-10-26 12:51:02 +02:00
Oliver Gierke
ce3647339d #1 - Added test case to show implementing Ordered is considered on proxies as well. 2012-10-25 12:26:53 +02:00
Oliver Gierke
6ab36253aa Switch from Docbook to Markdown for documentation.
Added README.markdown with the current state of the reference docs in Markdown.
2012-02-22 16:05:51 +01:00
Oliver Gierke
d039caecaf Fixed documentation build. 2012-02-22 11:39:09 +01:00
Oliver Gierke
b4a036b66a Moved project to SpringSource. 2012-02-21 16:04:32 +01:00
Oliver Gierke
7693b8ed51 Major overhaul of entire project infrastructure.
Formatted source with Spring formatter. Fixed license headers and author tags.
2012-02-15 21:58:56 +01:00
Oliver Gierke
b4e6491e45 * drop own implementation of a reverting comparator by using @InvertibleComparator@ of Spring * fixed some generics
git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@11640 5a64d73e-33d6-4ccc-9058-23f8668ecac9
2010-06-24 13:27:26 +00:00
Oliver Gierke
cc883dea1a * added @spring.tooling@ for namespace IDE integration
git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@11638 5a64d73e-33d6-4ccc-9058-23f8668ecac9
2010-06-24 13:27:25 +00:00
Oliver Gierke
14433f43c1 * removed redundant exception declaration
git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@11632 5a64d73e-33d6-4ccc-9058-23f8668ecac9
2010-06-24 13:27:21 +00:00
Oliver Gierke
98335fb78c * fixed PMD issue with @Comparator@ implementation
git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@8598 5a64d73e-33d6-4ccc-9058-23f8668ecac9
2010-01-12 13:42:00 +00:00
Oliver Gierke
d20e429879 * restructured test cases
* do sorting in the appropriate place

git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@8547 5a64d73e-33d6-4ccc-9058-23f8668ecac9
2010-01-11 14:40:30 +00:00
Oliver Gierke
4fa39f3744 * simplified generic signatures
* made @SimplePluginRegistry@ safe against @null@ values

git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@8546 5a64d73e-33d6-4ccc-9058-23f8668ecac9
2010-01-11 14:40:28 +00:00
Oliver Gierke
efb58730e3 * replaced @EasyMock@ with @Mockito@
git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@8545 5a64d73e-33d6-4ccc-9058-23f8668ecac9
2010-01-11 14:40:26 +00:00
Oliver Gierke
7984449b0b * fixed licence texts and year's in licence texts
git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@8544 5a64d73e-33d6-4ccc-9058-23f8668ecac9
2010-01-11 14:40:22 +00:00
Oliver Gierke
68efadea79 * made @plugins@ property protected to allow mutable access for sorting
* created dedicated method for setting a @Comparator@ to clean up internal code
* use @plugins@ property for sorting access instead of @getPlugins@ which returns an immutable @List@ now

git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@8543 5a64d73e-33d6-4ccc-9058-23f8668ecac9
2010-01-11 14:23:20 +00:00
Oliver Gierke
4944e4259c * added @getPlugins@ method to @PluginRegistry@ interface
git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@8542 5a64d73e-33d6-4ccc-9058-23f8668ecac9
2010-01-11 14:23:18 +00:00