DATAREST-774 - Separated integration tests from core project to avoid classpath overlap.
Extracted store specific tests into separate test modules to prevent classpath overlap between projects. Those tests are now executed in an "it" build profile to prevent the tests being packaged for distribution on release. Use Map-based repositories and mapping contexts for test in the Core and WebMvc module. Slightly changed the configuration API for lookup types on RepositoryRestConfiguration. Related ticket: DATAREST-776.
This commit is contained in:
@@ -29,7 +29,7 @@ import org.springframework.data.mapping.PersistentPropertyAccessor;
|
||||
import org.springframework.data.mapping.SimpleAssociationHandler;
|
||||
import org.springframework.data.mapping.context.PersistentEntities;
|
||||
import org.springframework.data.rest.core.mapping.ResourceMetadata;
|
||||
import org.springframework.data.rest.webmvc.mapping.AssociationLinks;
|
||||
import org.springframework.data.rest.webmvc.mapping.Associations;
|
||||
import org.springframework.data.rest.webmvc.support.ExcerptProjector;
|
||||
import org.springframework.hateoas.core.EmbeddedWrapper;
|
||||
import org.springframework.hateoas.core.EmbeddedWrappers;
|
||||
@@ -42,14 +42,14 @@ import org.springframework.util.Assert;
|
||||
public class EmbeddedResourcesAssembler {
|
||||
|
||||
private final @NonNull PersistentEntities entities;
|
||||
private final @NonNull AssociationLinks associations;
|
||||
private final @NonNull Associations associations;
|
||||
private final @NonNull ExcerptProjector projector;
|
||||
private final @NonNull EmbeddedWrappers wrappers = new EmbeddedWrappers(false);
|
||||
|
||||
/**
|
||||
* Returns the embedded resources to render. This will add an {@link RelatedResource} for linkable associations if
|
||||
* they have an excerpt projection registered.
|
||||
*
|
||||
*
|
||||
* @param instance must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2015 the original author or authors.
|
||||
* Copyright 2013-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,7 +22,7 @@ import org.springframework.data.mapping.PersistentEntity;
|
||||
import org.springframework.data.mapping.context.PersistentEntities;
|
||||
import org.springframework.data.rest.core.support.SelfLinkProvider;
|
||||
import org.springframework.data.rest.webmvc.PersistentEntityResource.Builder;
|
||||
import org.springframework.data.rest.webmvc.mapping.AssociationLinks;
|
||||
import org.springframework.data.rest.webmvc.mapping.Associations;
|
||||
import org.springframework.data.rest.webmvc.support.Projector;
|
||||
import org.springframework.hateoas.Link;
|
||||
import org.springframework.hateoas.ResourceAssembler;
|
||||
@@ -40,7 +40,7 @@ public class PersistentEntityResourceAssembler implements ResourceAssembler<Obje
|
||||
|
||||
private final @NonNull PersistentEntities entities;
|
||||
private final @NonNull Projector projector;
|
||||
private final @NonNull AssociationLinks associations;
|
||||
private final @NonNull Associations associations;
|
||||
private final @NonNull SelfLinkProvider linkProvider;
|
||||
private final @NonNull EmbeddedWrappers wrappers = new EmbeddedWrappers(false);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,7 +30,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class ProfileResourceProcessor implements ResourceProcessor<RepositoryLinksResource> {
|
||||
|
||||
static final String PROFILE_REL = "profile";
|
||||
public static final String PROFILE_REL = "profile";
|
||||
|
||||
private final RepositoryRestConfiguration configuration;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -54,7 +54,7 @@ import org.springframework.data.rest.webmvc.ProfileController;
|
||||
import org.springframework.data.rest.webmvc.RootResourceInformation;
|
||||
import org.springframework.data.rest.webmvc.json.EnumTranslator;
|
||||
import org.springframework.data.rest.webmvc.json.JacksonMetadata;
|
||||
import org.springframework.data.rest.webmvc.mapping.AssociationLinks;
|
||||
import org.springframework.data.rest.webmvc.mapping.Associations;
|
||||
import org.springframework.hateoas.EntityLinks;
|
||||
import org.springframework.hateoas.Link;
|
||||
import org.springframework.hateoas.TemplateVariable;
|
||||
@@ -82,7 +82,7 @@ public class RootResourceInformationToAlpsDescriptorConverter {
|
||||
|
||||
private static final List<HttpMethod> UNDOCUMENTED_METHODS = Arrays.asList(HttpMethod.OPTIONS, HttpMethod.HEAD);
|
||||
|
||||
private final @NonNull AssociationLinks associations;
|
||||
private final @NonNull Associations associations;
|
||||
private final @NonNull Repositories repositories;
|
||||
private final @NonNull PersistentEntities persistentEntities;
|
||||
private final @NonNull EntityLinks entityLinks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,7 +24,7 @@ import org.springframework.data.projection.ProjectionFactory;
|
||||
import org.springframework.data.rest.core.projection.ProjectionDefinitions;
|
||||
import org.springframework.data.rest.core.support.SelfLinkProvider;
|
||||
import org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler;
|
||||
import org.springframework.data.rest.webmvc.mapping.AssociationLinks;
|
||||
import org.springframework.data.rest.webmvc.mapping.Associations;
|
||||
import org.springframework.data.rest.webmvc.support.PersistentEntityProjector;
|
||||
import org.springframework.web.bind.support.WebDataBinderFactory;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
@@ -43,7 +43,7 @@ public class PersistentEntityResourceAssemblerArgumentResolver implements Handle
|
||||
private final @NonNull SelfLinkProvider linkProvider;
|
||||
private final @NonNull ProjectionDefinitions projectionDefinitions;
|
||||
private final @NonNull ProjectionFactory projectionFactory;
|
||||
private final @NonNull AssociationLinks links;
|
||||
private final @NonNull Associations links;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -96,7 +96,7 @@ import org.springframework.data.rest.webmvc.json.PersistentEntityJackson2Module.
|
||||
import org.springframework.data.rest.webmvc.json.PersistentEntityJackson2Module.NestedEntitySerializer;
|
||||
import org.springframework.data.rest.webmvc.json.PersistentEntityToJsonSchemaConverter;
|
||||
import org.springframework.data.rest.webmvc.json.PersistentEntityToJsonSchemaConverter.ValueTypeSchemaPropertyCustomizerFactory;
|
||||
import org.springframework.data.rest.webmvc.mapping.AssociationLinks;
|
||||
import org.springframework.data.rest.webmvc.mapping.Associations;
|
||||
import org.springframework.data.rest.webmvc.mapping.LinkCollector;
|
||||
import org.springframework.data.rest.webmvc.spi.BackendIdConverter;
|
||||
import org.springframework.data.rest.webmvc.spi.BackendIdConverter.DefaultIdConverter;
|
||||
@@ -232,9 +232,10 @@ public class RepositoryRestMvcConfiguration extends HateoasAwareSpringDataWebCon
|
||||
* {@link org.springframework.validation.Validator} instances assigned to specific domain types.
|
||||
*/
|
||||
@Bean
|
||||
public ValidatingRepositoryEventListener validatingRepositoryEventListener(ObjectFactory<Repositories> repositories) {
|
||||
public ValidatingRepositoryEventListener validatingRepositoryEventListener(
|
||||
ObjectFactory<PersistentEntities> entities) {
|
||||
|
||||
ValidatingRepositoryEventListener listener = new ValidatingRepositoryEventListener(repositories);
|
||||
ValidatingRepositoryEventListener listener = new ValidatingRepositoryEventListener(entities);
|
||||
configurerDelegate.configureValidatingRepositoryEventListener(listener);
|
||||
configureValidatingRepositoryEventListener(listener);
|
||||
|
||||
@@ -755,8 +756,8 @@ public class RepositoryRestMvcConfiguration extends HateoasAwareSpringDataWebCon
|
||||
}
|
||||
|
||||
@Bean
|
||||
public AssociationLinks associationLinks() {
|
||||
return new AssociationLinks(resourceMappings(), config());
|
||||
public Associations associationLinks() {
|
||||
return new Associations(resourceMappings(), config());
|
||||
}
|
||||
|
||||
protected List<EntityLookup<?>> getEntityLookups() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,7 @@ import org.springframework.data.mapping.PersistentProperty;
|
||||
import org.springframework.data.mapping.PersistentPropertyAccessor;
|
||||
import org.springframework.data.mapping.SimplePropertyHandler;
|
||||
import org.springframework.data.mapping.context.PersistentEntities;
|
||||
import org.springframework.data.rest.webmvc.mapping.AssociationLinks;
|
||||
import org.springframework.data.rest.webmvc.mapping.Associations;
|
||||
import org.springframework.http.converter.HttpMessageNotReadableException;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -53,7 +53,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
public class DomainObjectReader {
|
||||
|
||||
private final @NonNull PersistentEntities entities;
|
||||
private final @NonNull AssociationLinks associationLinks;
|
||||
private final @NonNull Associations associationLinks;
|
||||
private final @NonNull ClassIntrospector introspector = new BasicClassIntrospector();
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,7 +44,7 @@ import org.springframework.data.rest.core.support.SelfLinkProvider;
|
||||
import org.springframework.data.rest.webmvc.EmbeddedResourcesAssembler;
|
||||
import org.springframework.data.rest.webmvc.PersistentEntityResource;
|
||||
import org.springframework.data.rest.webmvc.ResourceProcessorInvoker;
|
||||
import org.springframework.data.rest.webmvc.mapping.AssociationLinks;
|
||||
import org.springframework.data.rest.webmvc.mapping.Associations;
|
||||
import org.springframework.data.rest.webmvc.mapping.LinkCollector;
|
||||
import org.springframework.hateoas.Link;
|
||||
import org.springframework.hateoas.Links;
|
||||
@@ -110,7 +110,7 @@ public class PersistentEntityJackson2Module extends SimpleModule {
|
||||
* @param converter must not be {@literal null}.
|
||||
* @param linkProvider must not be {@literal null}.
|
||||
*/
|
||||
public PersistentEntityJackson2Module(AssociationLinks associations, PersistentEntities entities,
|
||||
public PersistentEntityJackson2Module(Associations associations, PersistentEntities entities,
|
||||
UriToEntityConverter converter, LinkCollector collector, RepositoryInvokerFactory factory,
|
||||
NestedEntitySerializer serializer, LookupObjectSerializer lookupObjectSerializer) {
|
||||
|
||||
@@ -144,7 +144,7 @@ public class PersistentEntityJackson2Module extends SimpleModule {
|
||||
|
||||
/**
|
||||
* Creates a new {@link PersistentEntityResourceSerializer} using the given {@link PersistentEntities} and
|
||||
* {@link AssociationLinks}.
|
||||
* {@link Associations}.
|
||||
*
|
||||
* @param entities must not be {@literal null}.
|
||||
*/
|
||||
@@ -221,7 +221,7 @@ public class PersistentEntityJackson2Module extends SimpleModule {
|
||||
static class AssociationOmittingSerializerModifier extends BeanSerializerModifier {
|
||||
|
||||
private final @NonNull PersistentEntities entities;
|
||||
private final @NonNull AssociationLinks associations;
|
||||
private final @NonNull Associations associations;
|
||||
private final @NonNull NestedEntitySerializer nestedEntitySerializer;
|
||||
private final @NonNull LookupObjectSerializer lookupObjectSerializer;
|
||||
|
||||
@@ -378,7 +378,7 @@ public class PersistentEntityJackson2Module extends SimpleModule {
|
||||
public static class AssociationUriResolvingDeserializerModifier extends BeanDeserializerModifier {
|
||||
|
||||
private final @NonNull PersistentEntities entities;
|
||||
private final @NonNull AssociationLinks associationLinks;
|
||||
private final @NonNull Associations associationLinks;
|
||||
private final @NonNull UriToEntityConverter converter;
|
||||
private final @NonNull RepositoryInvokerFactory factory;
|
||||
|
||||
@@ -512,7 +512,7 @@ public class PersistentEntityJackson2Module extends SimpleModule {
|
||||
static class ProjectionSerializer extends StdSerializer<TargetAware> {
|
||||
|
||||
private final LinkCollector collector;
|
||||
private final AssociationLinks associations;
|
||||
private final Associations associations;
|
||||
private final boolean unwrapping;
|
||||
|
||||
/**
|
||||
@@ -523,7 +523,7 @@ public class PersistentEntityJackson2Module extends SimpleModule {
|
||||
* @param mappings must not be {@literal null}.
|
||||
* @param unwrapping
|
||||
*/
|
||||
private ProjectionSerializer(LinkCollector collector, AssociationLinks mappings, boolean unwrapping) {
|
||||
private ProjectionSerializer(LinkCollector collector, Associations mappings, boolean unwrapping) {
|
||||
|
||||
super(TargetAware.class);
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ import org.springframework.data.rest.webmvc.json.JsonSchema.Definitions;
|
||||
import org.springframework.data.rest.webmvc.json.JsonSchema.EnumProperty;
|
||||
import org.springframework.data.rest.webmvc.json.JsonSchema.Item;
|
||||
import org.springframework.data.rest.webmvc.json.JsonSchema.JsonSchemaProperty;
|
||||
import org.springframework.data.rest.webmvc.mapping.AssociationLinks;
|
||||
import org.springframework.data.rest.webmvc.mapping.Associations;
|
||||
import org.springframework.data.util.ClassTypeInformation;
|
||||
import org.springframework.data.util.TypeInformation;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -76,7 +76,7 @@ public class PersistentEntityToJsonSchemaConverter implements ConditionalGeneric
|
||||
private static final TypeInformation<?> STRING_TYPE_INFORMATION = ClassTypeInformation.from(String.class);
|
||||
|
||||
private final Set<ConvertiblePair> convertiblePairs = new HashSet<ConvertiblePair>();
|
||||
private final AssociationLinks associations;
|
||||
private final Associations associations;
|
||||
private final PersistentEntities entities;
|
||||
private final MessageSourceAccessor accessor;
|
||||
private final ObjectMapper objectMapper;
|
||||
@@ -93,7 +93,7 @@ public class PersistentEntityToJsonSchemaConverter implements ConditionalGeneric
|
||||
* @param objectMapper must not be {@literal null}.
|
||||
* @param configuration must not be {@literal null}.
|
||||
*/
|
||||
public PersistentEntityToJsonSchemaConverter(PersistentEntities entities, AssociationLinks associations,
|
||||
public PersistentEntityToJsonSchemaConverter(PersistentEntities entities, Associations associations,
|
||||
MessageSourceAccessor accessor, ObjectMapper objectMapper, RepositoryRestConfiguration configuration,
|
||||
ValueTypeSchemaPropertyCustomizerFactory customizerFactory) {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,14 +34,14 @@ import org.springframework.hateoas.Link;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A value object to for {@link Link}s representing an association.
|
||||
* A value object to for {@link Link}s representing associations.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Greg Turnquist
|
||||
* @since 2.1
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
public class AssociationLinks {
|
||||
public class Associations {
|
||||
|
||||
private final @NonNull @Getter ResourceMappings mappings;
|
||||
private final @NonNull RepositoryRestConfiguration config;
|
||||
@@ -39,7 +39,7 @@ public class LinkCollectingAssociationHandler implements SimpleAssociationHandle
|
||||
private static final String AMBIGUOUS_ASSOCIATIONS = "Detected multiple association links with same relation type! Disambiguate association %s using @RestResource!";
|
||||
|
||||
private final PersistentEntities entities;
|
||||
private final AssociationLinks associationLinks;
|
||||
private final Associations associations;
|
||||
private final Path basePath;
|
||||
private final boolean nested;
|
||||
|
||||
@@ -47,25 +47,25 @@ public class LinkCollectingAssociationHandler implements SimpleAssociationHandle
|
||||
|
||||
/**
|
||||
* Creates a new {@link LinkCollectingAssociationHandler} for the given {@link PersistentEntities}, {@link Path} and
|
||||
* {@link AssociationLinks}.
|
||||
* {@link Associations}.
|
||||
*
|
||||
* @param entities must not be {@literal null}.
|
||||
* @param path must not be {@literal null}.
|
||||
* @param associationLinks must not be {@literal null}.
|
||||
* @param associations must not be {@literal null}.
|
||||
*/
|
||||
public LinkCollectingAssociationHandler(PersistentEntities entities, Path path, AssociationLinks associationLinks) {
|
||||
this(entities, path, associationLinks, false);
|
||||
public LinkCollectingAssociationHandler(PersistentEntities entities, Path path, Associations associations) {
|
||||
this(entities, path, associations, false);
|
||||
}
|
||||
|
||||
private LinkCollectingAssociationHandler(PersistentEntities entities, Path path, AssociationLinks associationLinks,
|
||||
private LinkCollectingAssociationHandler(PersistentEntities entities, Path path, Associations associations,
|
||||
boolean nested) {
|
||||
|
||||
Assert.notNull(entities, "PersistentEntities must not be null!");
|
||||
Assert.notNull(path, "Path must not be null!");
|
||||
Assert.notNull(associationLinks, "AssociationLinks must not be null!");
|
||||
Assert.notNull(associations, "AssociationLinks must not be null!");
|
||||
|
||||
this.entities = entities;
|
||||
this.associationLinks = associationLinks;
|
||||
this.associations = associations;
|
||||
this.basePath = path;
|
||||
|
||||
this.links = new ArrayList<Link>();
|
||||
@@ -73,7 +73,7 @@ public class LinkCollectingAssociationHandler implements SimpleAssociationHandle
|
||||
}
|
||||
|
||||
public LinkCollectingAssociationHandler nested() {
|
||||
return nested ? this : new LinkCollectingAssociationHandler(entities, basePath, associationLinks, true);
|
||||
return nested ? this : new LinkCollectingAssociationHandler(entities, basePath, associations, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,11 +94,11 @@ public class LinkCollectingAssociationHandler implements SimpleAssociationHandle
|
||||
|
||||
PersistentProperty<?> property = association.getInverse();
|
||||
|
||||
if (associationLinks.isLinkableAssociation(property)) {
|
||||
if (associations.isLinkableAssociation(property)) {
|
||||
|
||||
Links existingLinks = new Links(links);
|
||||
|
||||
for (Link link : associationLinks.getLinksFor(association, basePath)) {
|
||||
for (Link link : associations.getLinksFor(association, basePath)) {
|
||||
if (existingLinks.hasLink(link.getRel())) {
|
||||
throw new MappingException(String.format(AMBIGUOUS_ASSOCIATIONS, property.toString()));
|
||||
} else {
|
||||
|
||||
@@ -47,17 +47,17 @@ import org.springframework.util.Assert;
|
||||
public class LinkCollector {
|
||||
|
||||
private final PersistentEntities entities;
|
||||
private final AssociationLinks associationLinks;
|
||||
private final Associations associationLinks;
|
||||
private final SelfLinkProvider links;
|
||||
|
||||
/**
|
||||
* Creates a new {@link PersistentEntities}, {@link SelfLinkProvider} and {@link AssociationLinks}.
|
||||
*
|
||||
* Creates a new {@link PersistentEntities}, {@link SelfLinkProvider} and {@link Associations}.
|
||||
*
|
||||
* @param entities must not be {@literal null}.
|
||||
* @param linkProvider must not be {@literal null}.
|
||||
* @param associationLinks must not be {@literal null}.
|
||||
*/
|
||||
public LinkCollector(PersistentEntities entities, SelfLinkProvider linkProvider, AssociationLinks associationLinks) {
|
||||
public LinkCollector(PersistentEntities entities, SelfLinkProvider linkProvider, Associations associationLinks) {
|
||||
|
||||
Assert.notNull(entities, "PersistentEntities must not be null!");
|
||||
Assert.notNull(linkProvider, "SelfLinkProvider must not be null!");
|
||||
@@ -70,7 +70,7 @@ public class LinkCollector {
|
||||
|
||||
/**
|
||||
* Returns all {@link Links} for the given object.
|
||||
*
|
||||
*
|
||||
* @param object must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -80,7 +80,7 @@ public class LinkCollector {
|
||||
|
||||
/**
|
||||
* Returns all {@link Links} for the given object and already existing {@link Link}.
|
||||
*
|
||||
*
|
||||
* @param object must not be {@literal null}.
|
||||
* @param existingLinks must not be {@literal null}.
|
||||
* @return
|
||||
@@ -151,7 +151,7 @@ public class LinkCollector {
|
||||
|
||||
/**
|
||||
* {@link SimpleAssociationHandler} that will collect {@link Link}s for all linkable associations.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 2.1
|
||||
*/
|
||||
@@ -162,19 +162,19 @@ public class LinkCollector {
|
||||
|
||||
private final @NonNull PersistentEntities entities;
|
||||
private final @NonNull Path basePath;
|
||||
private final @NonNull AssociationLinks associationLinks;
|
||||
private final @NonNull Associations associationLinks;
|
||||
private final @NonNull List<Link> links = new ArrayList<Link>();
|
||||
|
||||
/**
|
||||
* Returns the links collected after the {@link Association} has been traversed.
|
||||
*
|
||||
*
|
||||
* @return the links
|
||||
*/
|
||||
public List<Link> getLinks() {
|
||||
return links;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.SimpleAssociationHandler#doWithAssociation(org.springframework.data.mapping.Association)
|
||||
*/
|
||||
@@ -202,10 +202,10 @@ public class LinkCollector {
|
||||
|
||||
private final SelfLinkProvider selfLinks;
|
||||
private final PersistentPropertyAccessor accessor;
|
||||
private final AssociationLinks associations;
|
||||
private final Associations associations;
|
||||
private final @Getter List<Link> links = new ArrayList<Link>();
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.SimpleAssociationHandler#doWithAssociation(org.springframework.data.mapping.Association)
|
||||
*/
|
||||
@@ -234,7 +234,7 @@ public class LinkCollector {
|
||||
|
||||
/**
|
||||
* Returns a link pointing to the given entity using the given {@link ResourceMapping} to detect the link relation.
|
||||
*
|
||||
*
|
||||
* @param entity must not be {@literal null}.
|
||||
* @param mapping must not be {@literal null}.
|
||||
* @return
|
||||
@@ -246,7 +246,7 @@ public class LinkCollector {
|
||||
/**
|
||||
* Returns the given object as {@link Collection}, i.e. the object as is if it's a collection already or wrapped
|
||||
* into a single-element collection otherwise.
|
||||
*
|
||||
*
|
||||
* @param object can be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user