Skip to content

Commit

Permalink
Polish Javadoc to prepare builds with JDK 17.
Browse files Browse the repository at this point in the history
Issue #2068.
  • Loading branch information
odrotbohm committed Sep 21, 2021
1 parent 806a886 commit c6b77e3
Show file tree
Hide file tree
Showing 22 changed files with 44 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class ValidationErrors extends AbstractPropertyBindingResult {
* Creates a new {@link ValidationErrors} instance for the given source object and {@link PersistentEntity}.
*
* @param source the source object to gather validation errors on, must not be {@literal null}.
* @param entity the {@link PersistentEntity} for the given source instance, must not be {@literal null}.
* @param entities the {@link PersistentEntities} for the given source instance, must not be {@literal null}.
*/
public ValidationErrors(Object source, PersistentEntities entities) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public boolean omitUnresolvableDescriptionKeys() {
/**
* Configures whether to expose the ALPS resources.
*
* @param alpsEnabled the alpsEnabled to set
* @param enableAlps whether to expose ALPS resources.
*/
public void setAlpsEnabled(boolean enableAlps) {
this.alpsEnabled = enableAlps;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
* @author Greg Turnquist
* @author Mark Paluch
*/
@SuppressWarnings("deprecation")
public class RepositoryRestConfiguration {

static final URI NO_URI = URI.create("");
Expand Down Expand Up @@ -367,7 +366,7 @@ public boolean returnBodyOnUpdate(String acceptHeader) {
/**
* Set whether to return a response body after updating an entity.
*
* @param returnBody can be {@literal null}, expressing the decision shall be derived from the presence of an
* @param returnBodyOnUpdate can be {@literal null}, expressing the decision shall be derived from the presence of an
* {@code Accept} header in the request.
* @return {@literal this}
*/
Expand Down Expand Up @@ -535,7 +534,7 @@ public MetadataConfiguration getMetadataConfiguration() {
/**
* Configures whether to enable enum value translation via the Spring Data REST default resource bundle. Defaults to
* {@literal false} for backwards compatibility reasons. Will use the fully qualified enum name as key. For further
* details see {@link EnumTranslator}.
* details see {code EnumTranslator}.
*
* @param enableEnumTranslation
* @see #getEnumTranslationConfiguration()
Expand Down Expand Up @@ -675,7 +674,7 @@ public LinkRelationProvider getRelProvider() {
}

/**
* The {@link RelProvider} to be used to calculate the link relation defaults for repositories.
* The {@link LinkRelationProvider} to be used to calculate the link relation defaults for repositories.
*
* @deprecated since 3.5, use {@link #setLinkRelationProvider(LinkRelationProvider)} instead.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public boolean allowsPutForCreation(ResourceMetadata metadata) {
/**
* Returns whether PUT requests can be used to create new instances of the given domain type.
*
* @param metadata must not be {@literal null}.
* @param domainType must not be {@literal null}.
* @return
*/
public boolean allowsPutForCreation(Class<?> domainType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ public final class ParameterMetadata {
/**
* Creates a new {@link ParameterMetadata} for the given {@link MethodParameter} and base rel.
*
* @param name must not be {@literal null} or empty.
* @param parameter must not be {@literal null} or empty.
* @param baseRel must not be {@literal null} or empty.
*/
public ParameterMetadata(MethodParameter parameter, String baseRel) {

Assert.notNull(parameter, "MethodParameter must not be null!");

this.name = parameter.getParameterName();

Assert.hasText(name, "Parameter name must not be null or empty!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ public interface ResourceMetadata extends CollectionResourceMapping {
SearchResourceMappings getSearchResourceMappings();

/**
* Returns the supported {@link HttpMethod}s for the given {@link ResourceType}.
* Returns the supported {@link HttpMethod}s.
*
* @param resourcType must not be {@literal null}.
* @return
*/
SupportedHttpMethods getSupportedHttpMethods();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.springframework.util.Assert;

/**
* A {@link RelProvider} based on the {@link ResourceMappings} for the registered repositories.
* A {@link LinkRelationProvider} based on the {@link ResourceMappings} for the registered repositories.
*
* @author Oliver Gierke
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static <R extends RepresentationModel<?>> ResponseEntity<RepresentationMo
}

/**
* Wrap a resource as a {@link ResourceEntity} and attach given headers and status.
* Wrap a resource as a {@link ResponseEntity} and attach given headers and status.
*
* @param status
* @param headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public EmbeddedResourcesAssembler(PersistentEntities entities, Associations asso
}

/**
* Returns the embedded resources to render. This will add an {@link RelatedResource} for linkable associations if
* they have an excerpt projection registered.
* Returns the embedded resources to render. This will add a projection for linkable associations if they have an
* excerpt projection registered.
*
* @param instance must not be {@literal null}.
* @return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
* A Spring HATEOAS {@link Resource} subclass that holds a reference to the entity's {@link PersistentEntity} metadata.
* A Spring HATEOAS {@link EntityModel} subclass that holds a reference to the entity's {@link PersistentEntity}
* metadata.
*
* @author Jon Brisbin
* @author Oliver Gierke
Expand Down Expand Up @@ -168,8 +169,9 @@ private Builder(Object content, PersistentEntity<?, ?> entity) {
}

/**
* Configures the builder to embed the given {@link EmbeddedWrapper} instances. Creates a {@link Resources} instance
* to make sure the {@link EmbeddedWrapper} handling gets applied to the serialization output ignoring the links.
* Configures the builder to embed the given {@link EmbeddedWrapper} instances. Creates a {@link CollectionModel}
* instance to make sure the {@link EmbeddedWrapper} handling gets applied to the serialization output ignoring the
* links.
*
* @param resources can be {@literal null}.
* @return the builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.springframework.util.Assert;

/**
* {@link ResourceAssembler} to create {@link PersistentEntityResource}s for arbitrary domain objects.
* {@link RepresentationModelAssembler} to create {@link PersistentEntityResource}s for arbitrary domain objects.
*
* @author Oliver Gierke
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package org.springframework.data.rest.webmvc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
import org.springframework.hateoas.Link;
import org.springframework.hateoas.server.RepresentationModelProcessor;
import org.springframework.util.Assert;

/**
* {@link ResourceProcessor} to add a {@code profile} link to the root resource to point to multiple forms of metadata.
* {@link RepresentationModelProcessor} to add a {@code profile} link to the root resource to point to multiple forms of
* metadata.
*
* @author Oliver Gierke
* @author Greg Turnquist
Expand All @@ -39,7 +39,6 @@ public class ProfileResourceProcessor implements RepresentationModelProcessor<Re
*
* @param configuration must not be {@literal null}.
*/
@Autowired
public ProfileResourceProcessor(RepositoryRestConfiguration configuration) {

Assert.notNull(configuration, "RepositoryRestConfiguration must not be null!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ public class RepositoryRestHandlerAdapter extends RequestMappingHandlerAdapter {
private final List<HandlerMethodArgumentResolver> argumentResolvers;

/**
* Creates a new {@link RepositoryRestHandlerAdapter} using the given {@link HandlerMethodArgumentResolver} and
* {@link org.springframework.hateoas.server.mvc.ResourceProcessorInvoker}.
* Creates a new {@link RepositoryRestHandlerAdapter} using the given {@link HandlerMethodArgumentResolver}s.
*
* @param argumentResolvers must not be {@literal null}.
* @param invoker must not be {@literal null}.
*/
public RepositoryRestHandlerAdapter(List<HandlerMethodArgumentResolver> argumentResolvers) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
package org.springframework.data.rest.webmvc;

import org.springframework.hateoas.RepresentationModel;
import org.springframework.hateoas.server.RepresentationModelProcessor;
import org.springframework.util.Assert;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
* A custom {@link ResourceSupport} type to be able to write custom {@link ResourceProcessor}s to add additional links
* to ones automatically exposed for Spring Data repository query methods.
* A custom {@link RepresentationModel} type to be able to write custom {@link RepresentationModelProcessor}s to add
* additional links to ones automatically exposed for Spring Data repository query methods.
*
* @author Oliver Gierke
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import java.util.Set;
import java.util.stream.Collectors;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.BeanClassLoaderAware;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.ObjectFactory;
Expand Down Expand Up @@ -114,6 +116,7 @@
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.plugin.core.PluginRegistry;
import org.springframework.util.ClassUtils;
import org.springframework.web.bind.support.ConfigurableWebBindingInitializer;
Expand All @@ -136,7 +139,7 @@
/**
* Main application configuration for Spring Data REST. To customize how the exporter works, subclass this and override
* any of the {@literal configure*} methods.
* <p/>
* <p>
* Any XML files located in the classpath under the {@literal META-INF/spring-data-rest/} path will be automatically
* found and loaded into this {@link org.springframework.context.ApplicationContext}.
*
Expand Down Expand Up @@ -388,20 +391,13 @@ public BaseUri baseUri(RepositoryRestConfiguration repositoryRestConfiguration)
return new BaseUri(repositoryRestConfiguration.getBasePath());
}

/**
* {@link org.springframework.beans.factory.config.BeanPostProcessor} to turn beans annotated as
* {@link org.springframework.data.rest.repository.annotation.RepositoryEventHandler}s.
*
* @return
*/
@Bean
public static AnnotatedEventHandlerInvoker annotatedEventHandlerInvoker() {
return new AnnotatedEventHandlerInvoker();
}

/**
* Turns an {@link javax.servlet.http.HttpServletRequest} into a
* {@link org.springframework.http.server.ServerHttpRequest}.
* Turns an {@link HttpServletRequest} into a {@link ServerHttpRequest}.
*
* @return
*/
Expand Down Expand Up @@ -459,7 +455,6 @@ public ETagArgumentResolver eTagArgumentResolver() {
* configuration into account when generating links.
*
* @return
* @throws Exception
*/
@Bean
public RepositoryEntityLinks entityLinks(ObjectFactory<HateoasPageableHandlerMethodArgumentResolver> pageableResolver, //
Expand Down Expand Up @@ -640,7 +635,6 @@ public UriListHttpMessageConverter uriListHttpMessageConverter() {
* Special {@link org.springframework.web.servlet.HandlerAdapter} that only recognizes handler methods defined in the
* provided controller classes.
*
* @param resourceProcessors {@link ResourceProcessor}s available in the {@link ApplicationContext}.
* @return
*/
@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;

/**
* SPI to be able to register extensions that add static resource routes.
* SPI to be able to register extensions that add static resource routes. See
* {@code org.springframework.data.rest.webmvc.halexplorer.HalExplorerConfiguration} in the HAL Explorer module.
*
* @author Oliver Drotbohm
* @since 3.2
* @see org.springframework.data.rest.webmvc.halbrowser.HalBrowserConfiguration
* @see org.springframework.data.rest.webmvc.halexplorer.HalExplorerConfiguration
*/
public interface StaticResourceProvider {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
import org.springframework.http.converter.HttpMessageNotWritableException;

/**
* {@link Converter} to render all {@link Link}s contained in a {@link ResourceSupport} as {@code text/uri-list} and
* parse a request of that media type back into a {@link ResourceSupport} instance.
* {@link Converter} to render all {@link Link}s contained in a {@link RepresentationModel} as {@code text/uri-list} and
* parse a request of that media type back into a {@link RepresentationModel} instance.
*
* @author Jon Brisbin
* @author Greg Turnquist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public PersistentEntityJackson2Module(Associations associations, PersistentEntit

/**
* Custom {@link JsonSerializer} for {@link PersistentEntityResource}s to turn associations into {@link Link}s.
* Delegates to standard {@link Resource} serialization afterwards.
* Delegates to standard {@link EntityModel} serialization afterwards.
*
* @author Oliver Gierke
*/
Expand Down Expand Up @@ -331,7 +331,7 @@ private Optional<? extends PersistentProperty<?>> findProperty(String finalName,
}

/**
* Serializer to wrap values into an {@link Resource} instance and collecting all association links.
* Serializer to wrap values into an {@link EntityModel} instance and collecting all association links.
*
* @author Oliver Gierke
* @author Alex Leigh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,11 @@ public class PersistentEntityToJsonSchemaConverter implements ConditionalGeneric
* {@link ResourceMappings}.
*
* @param entities must not be {@literal null}.
* @param mappings must not be {@literal null}.
* @param associations must not be {@literal null}.
* @param resolver must not be {@literal null}.
* @param objectMapper must not be {@literal null}.
* @param configuration must not be {@literal null}.
* @param customizerFactory must not be {@literal null}.
*/
public PersistentEntityToJsonSchemaConverter(PersistentEntities entities, Associations associations,
MessageResolver resolver, ObjectMapper objectMapper, RepositoryRestConfiguration configuration,
Expand All @@ -101,6 +102,7 @@ public PersistentEntityToJsonSchemaConverter(PersistentEntities entities, Associ
Assert.notNull(resolver, "MessageResolver must not be null!");
Assert.notNull(objectMapper, "ObjectMapper must not be null!");
Assert.notNull(configuration, "RepositoryRestConfiguration must not be null!");
Assert.notNull(customizerFactory, "ValueTypeSchemaPropertyCustomizerFactory must not be null!");

this.entities = entities;
this.associations = associations;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ protected PatchOperation(String op, UntypedSpelPath path, Object value) {
*
* @param targetObject the target object, used as assistance in determining the evaluated object's type.
* @param entityType the entityType
* @param <T> the entity type
* @return the result of late-value evaluation if the value is a {@link LateObjectEvaluator}; the value itself
* otherwise.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.data.rest.webmvc.support;

import static org.springframework.http.HttpHeaders.*;
Expand All @@ -27,7 +26,7 @@
import org.springframework.web.method.support.ModelAndViewContainer;

/**
* {@link HandlerMethodArgumentResolver} to resolve If-Match headers for optimistic locking handling {@link IfMatch}.
* {@link HandlerMethodArgumentResolver} to resolve If-Match headers for optimistic locking handling {@link ETag}.
*
* @author Pablo Lozano
* @author Oliver Gierke
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
public interface ExcerptProjector {

/**
* Creates a excerpt projection for the given source. If no excerpt projection is available, the call will fall back
* to the behavior of {@link #project(Object)}. If you completely wish to skip handling the object, check for the
* presence of an excerpt projection using {@link #hasExcerptProjection(Class)}.
* Creates a excerpt projection for the given source. If no excerpt projection is available, the object will be
* returned as is. If you completely wish to skip handling the object, check for the presence of an excerpt projection
* using {@link #hasExcerptProjection(Class)}.
*
* @param source must not be {@literal null}.
* @return
Expand Down

0 comments on commit c6b77e3

Please sign in to comment.