#812 - General overhaul and refactorings.

Cleanups in Affordance API and implementations of hypermedia type (de)serializers. Added a lot more domain methods and types to Link, ResourceSupport etc. to be able to move a lot of representation building logic into those.

AffordanceModelFactory is not a Spring Plugin anymore as that functionality is not needed currently as we statically look up all factories via the SpringFactoriesLoader mechanism.

Redesigned LinkRelation to become a first class abstraction in the codebase. IanaLinkRelations is now a collection of constants. Link now keeps a LinkRelation instance around instead of a plain String.

Tweaked LinkDiscoverer API to return Optional and Links instead of nullable Link and List<Link>.

Tweaked API of CurieProvider to make use of the newly introduced HalLinkRelation based on the general LinkRelation.

Additional fixes for the Kotlin extension functions. Make Kotlin build setup compile with JDK 8. Removed Objects helper class in favor of Spring's already existing Assert and it's usage in ResourceAssemblerSupport.
This commit is contained in:
Oliver Drotbohm
2019-02-12 22:04:36 +01:00
committed by Oliver Drotbohm
parent 38b98af786
commit 9e5db1874e
116 changed files with 3282 additions and 2594 deletions

View File

@@ -71,7 +71,7 @@ public interface EntityLinks extends Plugin<Class<?>> {
/**
* Creates a {@link Link} pointing to the collection resource of the given type. The relation type of the link will be
* determined by the implementation class and should be defaulted to {@link IanaLinkRelation#SELF}.
* determined by the implementation class and should be defaulted to {@link IanaLinkRelations#SELF}.
*
* @param type the entity type to point to, must not be {@literal null}.
* @return the {@link Link} pointing to the collection resource exposed for the given entity. Will never be
@@ -82,7 +82,7 @@ public interface EntityLinks extends Plugin<Class<?>> {
/**
* Creates a {@link Link} pointing to single resource backing the given entity type and id. The relation type of the
* link will be determined by the implementation class and should be defaulted to {@link IanaLinkRelation#SELF}.
* link will be determined by the implementation class and should be defaulted to {@link IanaLinkRelations#SELF}.
*
* @param type the entity type to point to, must not be {@literal null}.
* @param id the identifier of the entity of the given type
@@ -94,7 +94,7 @@ public interface EntityLinks extends Plugin<Class<?>> {
/**
* Creates a {@link Link} pointing to single resource backing the given entity. The relation type of the link will be
* determined by the implementation class and should be defaulted to {@link IanaLinkRelation#SELF}.
* determined by the implementation class and should be defaulted to {@link IanaLinkRelations#SELF}.
*
* @param entity the entity type to point to, must not be {@literal null}.
* @return the {@link Link} pointing to the resource exposed for the given entity. Will never be {@literal null}.