DATAREST-1170 - Update copyright years to 2018.

This commit is contained in:
Mark Paluch
2017-01-30 08:59:42 +01:00
parent 1ebdeb9589
commit 5d9dbf1823
387 changed files with 1417 additions and 1417 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2018 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.util.StringUtils;
/**
* Simple value object to build up (URI) paths. Allows easy concatenation of {@link String}s and will take care of
* removal of whitespace and reducing slashes to single ones.
*
*
* @author Oliver Gierke
*/
public class Path {
@@ -34,7 +34,7 @@ public class Path {
/**
* Creates a new {@link Path} from the given {@link String}.
*
*
* @param path
*/
public Path(String path) {
@@ -43,7 +43,7 @@ public class Path {
/**
* Creates a new {@link Path} from the given string and potentially bypasses the cleanup.
*
*
* @param path
* @param cleanUp
*/
@@ -53,7 +53,7 @@ public class Path {
/**
* Returns whether the given reference String matches the current {@link Path}.
*
*
* @param reference
* @return
*/
@@ -63,7 +63,7 @@ public class Path {
/**
* Appends the given {@link String} to the current {@link Path}.
*
*
* @param path
* @return
*/
@@ -75,7 +75,7 @@ public class Path {
return slash(path.toString());
}
/*
/*
* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@@ -101,7 +101,7 @@ public class Path {
return trimmed.contains("://") ? trimmed : SLASH + trimmed;
}
/*
/*
* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@@ -110,7 +110,7 @@ public class Path {
return path;
}
/*
/*
* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.
@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
/**
* A {@link GenericConverter} that can convert a {@link URI} into an entity.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -51,7 +51,7 @@ public class UriToEntityConverter implements ConditionalGenericConverter {
/**
* Creates a new {@link UriToEntityConverter} using the given {@link PersistentEntities},
* {@link RepositoryInvokerFactory} and {@link Repositories}.
*
*
* @param entities must not be {@literal null}.
* @param invokerFactory must not be {@literal null}.
* @param repositories must not be {@literal null}.
@@ -81,7 +81,7 @@ public class UriToEntityConverter implements ConditionalGenericConverter {
this.repositories = repositories;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.core.convert.converter.ConditionalConverter#matches(org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 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.
@@ -36,7 +36,7 @@ import org.springframework.validation.Errors;
/**
* An {@link Errors} implementation for use in the events mechanism of Spring Data REST. Customizes actual field lookup
* by using a {@link PersistentPropertyAccessor} for actual value lookups.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -49,7 +49,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}.
*/
@@ -64,7 +64,7 @@ public class ValidationErrors extends AbstractPropertyBindingResult {
this.source = source;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.validation.AbstractPropertyBindingResult#getPropertyAccessor()
*/
@@ -109,7 +109,7 @@ public class ValidationErrors extends AbstractPropertyBindingResult {
};
}
/*
/*
* (non-Javadoc)
* @see org.springframework.validation.AbstractBindingResult#getTarget()
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2018 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.
@@ -23,7 +23,7 @@ import java.lang.annotation.Target;
/**
* Annotation to describe semantics of a resource.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -33,7 +33,7 @@ public @interface Description {
/**
* The textual description of the resource. Can be a resource bundle key for internationalization.
*
*
* @return
*/
String value();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -32,7 +32,7 @@ public @interface HandleAfterCreate {
/**
* The domain type which you want to listen for events for.
*
*
* @deprecated the domain type of interest is derived from the type of the first parameter of the annotated handler
* method.
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -23,7 +23,7 @@ import java.lang.annotation.Target;
/**
* Denotes a component that should handle the {@literal afterDelete} event.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -34,7 +34,7 @@ public @interface HandleAfterDelete {
/**
* The domain type which you want to listen for events for.
*
*
* @deprecated the domain type of interest is derived from the type of the first parameter of the annotated handler
* method.
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -23,7 +23,7 @@ import java.lang.annotation.Target;
/**
* Denotes a component that should handle the {@literal afterLinkDelete} event.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -34,7 +34,7 @@ public @interface HandleAfterLinkDelete {
/**
* The domain type which you want to listen for events for.
*
*
* @deprecated the domain type of interest is derived from the type of the first parameter of the annotated handler
* method.
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -23,7 +23,7 @@ import java.lang.annotation.Target;
/**
* Denotes a component that should handle the {@literal afterLinkSave} event.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -34,7 +34,7 @@ public @interface HandleAfterLinkSave {
/**
* The domain type which you want to listen for events for.
*
*
* @deprecated the domain type of interest is derived from the type of the first parameter of the annotated handler
* method.
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -23,7 +23,7 @@ import java.lang.annotation.Target;
/**
* Denotes a component that should handle the {@literal afterSave} event.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -34,7 +34,7 @@ public @interface HandleAfterSave {
/**
* The domain type which you want to listen for events for.
*
*
* @deprecated the domain type of interest is derived from the type of the first parameter of the annotated handler
* method.
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -32,7 +32,7 @@ public @interface HandleBeforeCreate {
/**
* The domain type which you want to listen for events for.
*
*
* @deprecated the domain type of interest is derived from the type of the first parameter of the annotated handler
* method.
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -23,7 +23,7 @@ import java.lang.annotation.Target;
/**
* Denotes a component that should handle the {@literal beforeDelete} event.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -34,7 +34,7 @@ public @interface HandleBeforeDelete {
/**
* The domain type which you want to listen for events for.
*
*
* @deprecated the domain type of interest is derived from the type of the first parameter of the annotated handler
* method.
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -23,7 +23,7 @@ import java.lang.annotation.Target;
/**
* Denotes a component that should handle the {@literal beforeLinkDelete} event.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -34,7 +34,7 @@ public @interface HandleBeforeLinkDelete {
/**
* The domain type which you want to listen for events for.
*
*
* @deprecated the domain type of interest is derived from the type of the first parameter of the annotated handler
* method.
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -23,7 +23,7 @@ import java.lang.annotation.Target;
/**
* Denotes a component that should handle the {@literal beforeLinkSave} event.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -34,7 +34,7 @@ public @interface HandleBeforeLinkSave {
/**
* The domain type which you want to listen for events for.
*
*
* @deprecated the domain type of interest is derived from the type of the first parameter of the annotated handler
* method.
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -23,7 +23,7 @@ import java.lang.annotation.Target;
/**
* Denotes a component that should handle the {@literal beforeSave} event.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -34,7 +34,7 @@ public @interface HandleBeforeSave {
/**
* The domain type which you want to listen for events for.
*
*
* @deprecated the domain type of interest is derived from the type of the first parameter of the annotated handler
* method.
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -23,7 +23,7 @@ import java.lang.annotation.Target;
/**
* Advertises classes annotated with this that they are event handlers.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -34,7 +34,7 @@ public @interface RepositoryEventHandler {
/**
* The list of {@link org.springframework.context.ApplicationEvent} classes this event handler cares about.
*
*
* @deprecated the type the handler is interested in is determined by the type of the first parameter of a handler
* method.
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2018 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.
@@ -23,7 +23,7 @@ import java.lang.annotation.Target;
/**
* Annotate a {@link org.springframework.data.repository.Repository} with this to customize export mapping and rels.
*
*
* @author Oliver Gierke
*/
@Target({ ElementType.TYPE })
@@ -33,42 +33,42 @@ public @interface RepositoryRestResource {
/**
* Flag indicating whether this resource is exported at all.
*
*
* @return {@literal true} if the resource is to be exported, {@literal false} otherwise.
*/
boolean exported() default true;
/**
* The path segment under which this resource is to be exported.
*
*
* @return A valid path segment.
*/
String path() default "";
/**
* The rel value to use when generating links to the collection resource.
*
*
* @return A valid rel value.
*/
String collectionResourceRel() default "";
/**
* The description of the collection resource.
*
*
* @return
*/
Description collectionResourceDescription() default @Description(value = "");
/**
* The rel value to use when generating links to the item resource.
*
*
* @return A valid rel value.
*/
String itemResourceRel() default "";
/**
* The description of the item resource.
*
*
* @return
*/
Description itemResourceDescription() default @Description(value = "");
@@ -77,7 +77,7 @@ public @interface RepositoryRestResource {
* Configures the projection type to be used when embedding item resources into collections and related resources.
* Defaults to {@link None}, which indicates full rendering of the items in a collection resource and no inlining of
* related resources.
*
*
* @return
*/
Class<?> excerptProjection() default None.class;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -27,7 +27,7 @@ import java.lang.annotation.Target;
* <p>
* As of Spring Data REST 2.0, prefer using {@link RepositoryRestResource} to also be able to customize the relation
* type and description for the item resources exposed by the repository.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -38,28 +38,28 @@ public @interface RestResource {
/**
* Flag indicating whether this resource is exported at all.
*
*
* @return {@literal true} if the resource is to be exported, {@literal false} otherwise.
*/
boolean exported() default true;
/**
* The path segment under which this resource is to be exported.
*
*
* @return A valid path segment.
*/
String path() default "";
/**
* The rel value to use when generating links to this resource.
*
*
* @return A valid rel value.
*/
String rel() default "";
/**
* The description of the collection resource.
*
*
* @return
*/
Description description() default @Description(value = "");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2018 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.
@@ -36,7 +36,7 @@ import org.springframework.util.Assert;
/**
* Configuration instance to implement {@link EntityLookupRegistrar}. Exposed via
* {@link RepositoryRestConfiguration#withEntityLookup()}.
*
*
* @author Oliver Gierke
* @since 2.5
*/
@@ -57,7 +57,7 @@ class EntityLookupConfiguration implements EntityLookupRegistrar {
return this;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.config.EntityLookupRegistrar#forValueRepository(java.lang.Class)
*/
@@ -76,7 +76,7 @@ class EntityLookupConfiguration implements EntityLookupRegistrar {
return new MappingBuilder<T, ID, R>(type);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.config.EntityLookupRegistrar#forValueRepository(java.lang.Class, org.springframework.core.convert.converter.Converter, org.springframework.data.rest.core.config.EntityLookupRegistrar.LookupRegistrar.Lookup)
*/
@@ -102,7 +102,7 @@ class EntityLookupConfiguration implements EntityLookupRegistrar {
/**
* Creates a new {@link MappingBuilder} using the given repository type and identifier mapping.
*
*
* @param repositoryType must not be {@literal null}.
* @param mapping must not be {@literal null}.
*/
@@ -130,7 +130,7 @@ class EntityLookupConfiguration implements EntityLookupRegistrar {
return EntityLookupConfiguration.this;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.config.EntityLookupRegistrar.IdMappingRegistrar#withIdMapping(org.springframework.core.convert.converter.Converter)
*/
@@ -142,7 +142,7 @@ class EntityLookupConfiguration implements EntityLookupRegistrar {
/**
* Returns the {@link EntityLookup}s registered on this configuration.
*
*
* @param repositories must not be {@literal null}.
* @return
*/
@@ -172,7 +172,7 @@ class EntityLookupConfiguration implements EntityLookupRegistrar {
/**
* Creates a new {@link RepositoriesEntityLookup} for the given {@link Repositories} and {@link LookupInformation}.
*
*
* @param repositories must not be {@literal null}.
* @param lookupInformation must not be {@literal null}.
*/
@@ -194,7 +194,7 @@ class EntityLookupConfiguration implements EntityLookupRegistrar {
"No repository found for type " + information.getDomainType().getName() + "!"));
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.support.EntityLookup#getResourceIdentifier(java.lang.Object)
*/
@@ -203,7 +203,7 @@ class EntityLookupConfiguration implements EntityLookupRegistrar {
return lookupInfo.getIdentifierMapping().convert(entity);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.support.EntityLookup#lookupEntity(java.io.Serializable)
*/
@@ -216,7 +216,7 @@ class EntityLookupConfiguration implements EntityLookupRegistrar {
return Optional.class.isInstance(result) ? (Optional<T>) result : Optional.ofNullable((T) result);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.plugin.core.Plugin#supports(java.lang.Object)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 the original author or authors.
* Copyright 2015-2018 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.rest.core.support.EntityLookup;
/**
* Configuration interfaces to ease the configuration of custom {@link EntityLookup}s for repositories.
*
*
* @author Oliver Gierke
* @since 2.5
*/
@@ -30,7 +30,7 @@ public interface EntityLookupRegistrar {
/**
* Starts building a custom {@link EntityLookup} for the given repository type.
*
*
* @param type must not be {@literal null}.
* @return
*/
@@ -39,7 +39,7 @@ public interface EntityLookupRegistrar {
/**
* Starts building a custom {@link EntityLookup} for the given repository type and registers the domain type of the
* given repository as lookup type.
*
*
* @param type must not be {@literal null}.
* @return
*/
@@ -49,7 +49,7 @@ public interface EntityLookupRegistrar {
/**
* Registers the given {@link Converter} to map the entity to its identifying property.
*
*
* @param mapping must not be {@literal null}.
* @return
*/
@@ -58,7 +58,7 @@ public interface EntityLookupRegistrar {
/**
* Registers an {@link EntityLookup} for the given repository type, identifier mapping and lookup operation.
*
*
* @param type must not be {@literal null}.
* @param identifierMapping must not be {@literal null}.
* @param lookup must not be {@literal null}.
@@ -69,7 +69,7 @@ public interface EntityLookupRegistrar {
/**
* Registers an {@link EntityLookup} for the given repository type, identifier mapping and lookup operation and
* registers the domain type managed by the given repository as lookup type.
*
*
* @param type must not be {@literal null}.
* @param identifierMapping must not be {@literal null}.
* @param lookup must not be {@literal null}.
@@ -81,7 +81,7 @@ public interface EntityLookupRegistrar {
/**
* Registers the given {@link Lookup} to obtain entity instances.
*
*
* @param lookup must not be {@literal null}.
*/
EntityLookupRegistrar withLookup(Lookup<R, ID> lookup);
@@ -90,7 +90,7 @@ public interface EntityLookupRegistrar {
/**
* Looks up the entity using the given {@link Repository} and identifier.
*
*
* @param repository
* @param identifier
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2018 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.
@@ -17,7 +17,7 @@ package org.springframework.data.rest.core.config;
/**
* Configuration options for enum value translation.
*
*
* @author Oliver Gierke
* @since 2.4
* @soundtrack Wallis Bird - Measuring Cities (Yeah! Wallis Bird live 2007-2014)
@@ -28,7 +28,7 @@ public interface EnumTranslationConfiguration {
* Configures whether the default translation of enum names shall be applied. Defaults to {@literal true}. This means
* the configuration will turn enum names into human friendly {@link String}s and also parse them if - only if - no
* explicit translation is available.
*
*
* @param enableDefaultTranslation whether to enable the default translation of enum names.
*/
void setEnableDefaultTranslation(boolean enableDefaultTranslation);
@@ -36,7 +36,7 @@ public interface EnumTranslationConfiguration {
/**
* Configures whether to always accept the raw enum name when parsing. This is useful if clients were used to send the
* Java enum names shall not be broken even if on the serialization side enum translation is activated.
*
*
* @param parseEnumNameAsFallback whether to parse the raw enum value as fallback, even if an explicit translation is
* available.
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2018 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.util.Assert;
/**
* Configuration for metadata exposure.
*
*
* @author Oliver Gierke
*/
public class MetadataConfiguration {
@@ -38,7 +38,7 @@ public class MetadataConfiguration {
* Configures whether to omit documentation attributes for unresolvable resource bundle keys. Defaults to
* {@literal true}, which means that an unsuccessful attempt to resolve the message will cause no documentation entry
* to be rendered for the metadata resources.
*
*
* @param omitUnresolvableDescriptionKeys whether to omit documentation attributes for unresolvable resource bundle
* keys.
*/
@@ -48,7 +48,7 @@ public class MetadataConfiguration {
/**
* Returns whether to omit documentation attributes for unresolvable resource bundle keys.
*
*
* @return the omitUnresolvableDescriptionKeys
*/
public boolean omitUnresolvableDescriptionKeys() {
@@ -57,7 +57,7 @@ public class MetadataConfiguration {
/**
* Configures whether to expose the ALPS resources.
*
*
* @param alpsEnabled the alpsEnabled to set
*/
public void setAlpsEnabled(boolean enableAlps) {
@@ -66,7 +66,7 @@ public class MetadataConfiguration {
/**
* Returns whether the ALPS resources are exposed.
*
*
* @return the alpsEnabled
*/
public boolean alpsEnabled() {
@@ -84,7 +84,7 @@ public class MetadataConfiguration {
/**
* Returns the {@link JsonSchemaFormat} to be used for the given type.
*
*
* @param type must not be {@literal null}.
* @return
*/
@@ -94,7 +94,7 @@ public class MetadataConfiguration {
/**
* Registers the given formatting patter for the given value type.
*
*
* @param pattern must not be {@literal null} or empty.
* @param type must not be {@literal null}.
*/
@@ -108,7 +108,7 @@ public class MetadataConfiguration {
/**
* Returns the {@link Pattern} registered for the given value type.
*
*
* @param type must not be {@literal null}.
* @return
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2018 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 java.lang.annotation.Target;
/**
* Annotation to tie a particular projection type to a source type. Used to find projection interfaces at startup time.
*
*
* @author Oliver Gierke
*/
@Inherited
@@ -35,14 +35,14 @@ public @interface Projection {
/**
* The type the projection type is bound to.
*
*
* @return
*/
Class<?>[] types();
/**
* The name of projection to refer to.
*
*
* @return
*/
String name() default "";

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2018 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.
@@ -33,7 +33,7 @@ import org.springframework.util.StringUtils;
/**
* Wrapper class to register projection definitions for later lookup by name and source type.
*
*
* @author Oliver Gierke
*/
public class ProjectionDefinitionConfiguration implements ProjectionDefinitions {
@@ -61,7 +61,7 @@ public class ProjectionDefinitionConfiguration implements ProjectionDefinitions
/**
* Configures the request parameter name to be used to accept the projection name to be returned.
*
*
* @param parameterName defaults to {@value ProjectionDefinitionConfiguration#DEFAULT_PROJECTION_PARAMETER_NAME}, will
* be set back to this default if {@literal null} or an empty value is configured.
*/
@@ -72,7 +72,7 @@ public class ProjectionDefinitionConfiguration implements ProjectionDefinitions
/**
* Adds the given projection type to the configuration. The type has to be annotated with {@link Projection} for
* additional metadata.
*
*
* @param projectionType must not be {@literal null}.
* @return
* @see Projection
@@ -96,7 +96,7 @@ public class ProjectionDefinitionConfiguration implements ProjectionDefinitions
/**
* Adds a projection type for the given source types. The name of the projection will be defaulted to the
* uncapitalized simply class name.
*
*
* @param projectionType must not be {@literal null}.
* @param sourceTypes must not be {@literal null} or empty.
* @return
@@ -109,7 +109,7 @@ public class ProjectionDefinitionConfiguration implements ProjectionDefinitions
/**
* Adds the given projection type for the given source types under the given name.
*
*
* @param projectionType must not be {@literal null}.
* @param name must not be {@literal null} or empty.
* @param sourceTypes must not be {@literal null} or empty.
@@ -129,7 +129,7 @@ public class ProjectionDefinitionConfiguration implements ProjectionDefinitions
return this;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.config.ProjectionDefinitions#getProjectionType(java.lang.Class, java.lang.String)
*/
@@ -138,7 +138,7 @@ public class ProjectionDefinitionConfiguration implements ProjectionDefinitions
return getProjectionsFor(sourceType).get(name);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.projection.ProjectionDefinitions#hasProjectionFor(java.lang.Class)
*/
@@ -156,7 +156,7 @@ public class ProjectionDefinitionConfiguration implements ProjectionDefinitions
/**
* Returns all projections registered for the given source type.
*
*
* @param sourceType must not be {@literal null}.
* @return
*/
@@ -191,7 +191,7 @@ public class ProjectionDefinitionConfiguration implements ProjectionDefinitions
/**
* Value object to define lookup keys for projections.
*
*
* @author Oliver Gierke
*/
@Value
@@ -203,7 +203,7 @@ public class ProjectionDefinitionConfiguration implements ProjectionDefinitions
/**
* Creates a new {@link ProjectionDefinitionKey} for the given source type and name;
*
*
* @param sourceType must not be {@literal null}.
* @param targetType must not be {@literal null}.
* @param name must not be {@literal null} or empty.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.
@@ -38,7 +38,7 @@ import org.springframework.web.servlet.config.annotation.CorsRegistration;
/**
* Spring Data REST configuration options.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
* @author Jeremy Rickard
@@ -81,7 +81,7 @@ public class RepositoryRestConfiguration {
/**
* Creates a new {@link RepositoryRestConfiguration} with the given {@link ProjectionDefinitionConfiguration}.
*
*
* @param projectionConfiguration must not be {@literal null}.
* @param metadataConfiguration must not be {@literal null}.
* @param enumTranslationConfiguration must not be {@literal null}.
@@ -101,7 +101,7 @@ public class RepositoryRestConfiguration {
/**
* The base URI against which the exporter should calculate its links.
*
*
* @return The base URI.
*/
public URI getBaseUri() {
@@ -110,7 +110,7 @@ public class RepositoryRestConfiguration {
/**
* The base path to expose repository resources under.
*
*
* @return the basePath
*/
public URI getBasePath() {
@@ -119,7 +119,7 @@ public class RepositoryRestConfiguration {
/**
* Configures the base path to be used by Spring Data REST to expose repository resources.
*
*
* @param basePath the basePath to set
*/
public RepositoryRestConfiguration setBasePath(String basePath) {
@@ -135,7 +135,7 @@ public class RepositoryRestConfiguration {
/**
* Get the default size of {@link org.springframework.data.domain.Pageable}s. Default is 20.
*
*
* @return The default page size.
*/
public int getDefaultPageSize() {
@@ -144,7 +144,7 @@ public class RepositoryRestConfiguration {
/**
* Set the default size of {@link org.springframework.data.domain.Pageable}s.
*
*
* @param defaultPageSize The default page size.
* @return {@literal this}
*/
@@ -156,7 +156,7 @@ public class RepositoryRestConfiguration {
/**
* Get the maximum size of pages.
*
*
* @return Maximum page size.
*/
public int getMaxPageSize() {
@@ -165,7 +165,7 @@ public class RepositoryRestConfiguration {
/**
* Set the maximum size of pages.
*
*
* @param maxPageSize Maximum page size.
* @return {@literal this}
*/
@@ -177,7 +177,7 @@ public class RepositoryRestConfiguration {
/**
* Get the name of the URL query string parameter that indicates what page to return. Default is 'page'.
*
*
* @return Name of the query parameter used to indicate the page number to return.
*/
public String getPageParamName() {
@@ -186,7 +186,7 @@ public class RepositoryRestConfiguration {
/**
* Set the name of the URL query string parameter that indicates what page to return.
*
*
* @param pageParamName Name of the query parameter used to indicate the page number to return.
* @return {@literal this}
*/
@@ -199,7 +199,7 @@ public class RepositoryRestConfiguration {
/**
* Get the name of the URL query string parameter that indicates how many results to return at once. Default is
* 'limit'.
*
*
* @return Name of the query parameter used to indicate the maximum number of entries to return at a time.
*/
public String getLimitParamName() {
@@ -208,7 +208,7 @@ public class RepositoryRestConfiguration {
/**
* Set the name of the URL query string parameter that indicates how many results to return at once.
*
*
* @param limitParamName Name of the query parameter used to indicate the maximum number of entries to return at a
* time.
* @return {@literal this}
@@ -221,7 +221,7 @@ public class RepositoryRestConfiguration {
/**
* Get the name of the URL query string parameter that indicates what direction to sort results. Default is 'sort'.
*
*
* @return Name of the query string parameter used to indicate what field to sort on.
*/
public String getSortParamName() {
@@ -230,7 +230,7 @@ public class RepositoryRestConfiguration {
/**
* Set the name of the URL query string parameter that indicates what direction to sort results.
*
*
* @param sortParamName Name of the query string parameter used to indicate what field to sort on.
* @return {@literal this}
*/
@@ -242,7 +242,7 @@ public class RepositoryRestConfiguration {
/**
* Get the {@link MediaType} to use as a default when none is specified.
*
*
* @return Default content type if none has been specified.
*/
public MediaType getDefaultMediaType() {
@@ -251,7 +251,7 @@ public class RepositoryRestConfiguration {
/**
* Set the {@link MediaType} to use as a default when none is specified.
*
*
* @param defaultMediaType default content type if none has been specified.
* @return {@literal this}
*/
@@ -264,7 +264,7 @@ public class RepositoryRestConfiguration {
* Returns whether HAL will be served as primary representation in case on {@code application/json} is requested. This
* defaults to {@literal true}. If configured to {@literal false} the legacy Spring Data representation will be
* rendered.
*
*
* @return
*/
public boolean useHalAsDefaultJsonMediaType() {
@@ -275,7 +275,7 @@ public class RepositoryRestConfiguration {
* Configures whether HAL will be served as primary representation in case on {@code application/json} is requested.
* This defaults to {@literal true}. If configured to {@literal false} the legacy Spring Data representation will be
* rendered.
*
*
* @param useHalAsDefaultJsonMediaType
* @return
*/
@@ -287,7 +287,7 @@ public class RepositoryRestConfiguration {
/**
* Convenience method to activate returning response bodies for all {@code PUT} and {@code POST} requests, i.e. both
* creating and updating entities.
*
*
* @param returnBody can be {@literal null}, expressing the decision shall be derived from the presence of an
* {@code Accept} header in the request.
* @return
@@ -302,7 +302,7 @@ public class RepositoryRestConfiguration {
/**
* Whether to return a response body after creating an entity.
*
*
* @return {@link java.lang.Boolean#TRUE} to enforce returning a body on create, {@link java.lang.Boolean#FALSE}
* otherwise. If {@literal null} and an {@code Accept} header present in the request will cause a body being
* returned. If the {@code Accept} header is not present, no body will be rendered.
@@ -315,7 +315,7 @@ public class RepositoryRestConfiguration {
/**
* Whether to return a response body after creating an entity considering the given accept header.
*
*
* @param acceptHeader can be {@literal null} or empty.
* @return
*/
@@ -325,7 +325,7 @@ public class RepositoryRestConfiguration {
/**
* Set whether to return a response body after creating an entity.
*
*
* @param returnBody can be {@literal null}, expressing the decision shall be derived from the presence of an
* {@code Accept} header in the request.
* @return {@literal this}
@@ -337,7 +337,7 @@ public class RepositoryRestConfiguration {
/**
* Whether to return a response body after updating an entity.
*
*
* @return {@link java.lang.Boolean#TRUE} to enforce returning a body on create, {@link java.lang.Boolean#FALSE}
* otherwise. If {@literal null} and an {@code Accept} header present in the request will cause a body being
* returned. If the {@code Accept} header is not present, no body will be rendered.
@@ -350,7 +350,7 @@ public class RepositoryRestConfiguration {
/**
* Whether to return a response body after updating an entity considering the given accept header.
*
*
* @param acceptHeader can be {@literal null} or empty.
* @return
*/
@@ -372,7 +372,7 @@ public class RepositoryRestConfiguration {
/**
* Start configuration a {@link ResourceMapping} for a specific domain type.
*
*
* @param domainType The {@link Class} of the domain type to configure a mapping for.
* @return A new {@link ResourceMapping} for configuring how a domain type is mapped.
*/
@@ -382,7 +382,7 @@ public class RepositoryRestConfiguration {
/**
* Get the {@link ResourceMapping} for a specific domain type.
*
*
* @param domainType The {@link Class} of the domain type.
* @return A {@link ResourceMapping} for that domain type or {@literal null} if none exists.
*/
@@ -392,7 +392,7 @@ public class RepositoryRestConfiguration {
/**
* Whether there is a {@link ResourceMapping} for the given domain type.
*
*
* @param domainType The domain type to find a {@link ResourceMapping} for.
* @return {@literal true} if a {@link ResourceMapping} exists for this domain class, {@literal false} otherwise.
*/
@@ -402,7 +402,7 @@ public class RepositoryRestConfiguration {
/**
* Get the {@link ResourceMappingConfiguration} that is currently configured.
*
*
* @return
*/
public ResourceMappingConfiguration getDomainTypesResourceMappingConfiguration() {
@@ -411,7 +411,7 @@ public class RepositoryRestConfiguration {
/**
* Start configuration a {@link ResourceMapping} for a specific repository interface.
*
*
* @param repositoryInterface The {@link Class} of the repository interface to configure a mapping for.
* @return A new {@link ResourceMapping} for configuring how a repository interface is mapped.
*/
@@ -421,7 +421,7 @@ public class RepositoryRestConfiguration {
/**
* Get the {@link ResourceMapping} for a specific repository interface.
*
*
* @param repositoryInterface The {@link Class} of the repository interface.
* @return A {@link ResourceMapping} for that repository interface or {@literal null} if none exists.
*/
@@ -431,7 +431,7 @@ public class RepositoryRestConfiguration {
/**
* Whether there is a {@link ResourceMapping} configured for this {@literal Repository} class.
*
*
* @param repositoryInterface
* @return
*/
@@ -449,7 +449,7 @@ public class RepositoryRestConfiguration {
/**
* Should we expose the ID property for this domain type?
*
*
* @param domainType The domain type we may need to expose the ID for.
* @return {@literal true} is the ID is to be exposed, {@literal false} otherwise.
*/
@@ -459,7 +459,7 @@ public class RepositoryRestConfiguration {
/**
* Set the list of domain types for which we will expose the ID value as a normal property.
*
*
* @param domainTypes Array of types to expose IDs for.
* @return {@literal this}
*/
@@ -470,7 +470,7 @@ public class RepositoryRestConfiguration {
/**
* Returns the {@link ProjectionDefinitionConfiguration} to register addition projections.
*
*
* @return
* @deprecated since 2.4, use {@link #getProjectionConfiguration()} instead.
*/
@@ -481,7 +481,7 @@ public class RepositoryRestConfiguration {
/**
* Returns the {@link ProjectionDefinitionConfiguration} to register addition projections.
*
*
* @return
*/
public ProjectionDefinitionConfiguration getProjectionConfiguration() {
@@ -490,7 +490,7 @@ public class RepositoryRestConfiguration {
/**
* Returns the {@link MetadataConfiguration} to customize metadata exposure.
*
*
* @return
* @deprecated since 2.4, use {@link #getMetadataConfiguration()} instead.
*/
@@ -501,7 +501,7 @@ public class RepositoryRestConfiguration {
/**
* Returns the {@link MetadataConfiguration} to customize metadata exposure.
*
*
* @return
*/
public MetadataConfiguration getMetadataConfiguration() {
@@ -512,7 +512,7 @@ public class RepositoryRestConfiguration {
* 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}.
*
*
* @param enableEnumTranslation
* @see #getEnumTranslationConfiguration()
*/
@@ -525,7 +525,7 @@ public class RepositoryRestConfiguration {
/**
* Returns whether enum value translation is enabled.
*
*
* @return
* @since 2.4
*/
@@ -535,7 +535,7 @@ public class RepositoryRestConfiguration {
/**
* Returns the {@link EnumTranslationConfiguration} to be used.
*
*
* @return must not be {@literal null}.
* @since 2.4
*/
@@ -546,7 +546,7 @@ public class RepositoryRestConfiguration {
/**
* Returns the {@link RepositoryDetectionStrategy} to be used to decide which repositories get exposed. Will be
* {@link RepositoryDetectionStrategies#DEFAULT} by default.
*
*
* @return will never be {@literal null}.
* @see RepositoryDetectionStrategies
* @since 2.5
@@ -558,7 +558,7 @@ public class RepositoryRestConfiguration {
/**
* Configures the {@link RepositoryDetectionStrategy} to be used to determine which repositories get exposed. Defaults
* to {@link RepositoryDetectionStrategies#DEFAULT}.
*
*
* @param repositoryDetectionStrategy can be {@literal null}.
* @since 2.5
*/
@@ -586,7 +586,7 @@ public class RepositoryRestConfiguration {
/**
* Returns the {@link EntityLookupRegistrar} to create custom {@link EntityLookup} instances registered in the
* configuration.
*
*
* @return the {@link EntityLookupRegistrar} to build custom {@link EntityLookup}s.
* @since 2.5
*/
@@ -596,7 +596,7 @@ public class RepositoryRestConfiguration {
/**
* Returns all {@link EntityLookup}s considering the customizations made to the configuration.
*
*
* @param repositories must not be {@literal null}.
* @return
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013 the original author or authors.
* Copyright 2013-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013 the original author or authors.
* Copyright 2013-2018 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.
@@ -21,7 +21,7 @@ import java.util.Map;
/**
* Manages the {@link ResourceMapping} configurations for any resources being exported. This includes domain entities
* and repositories.
*
*
* @author Jon Brisbin
*/
@SuppressWarnings("deprecation")

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.context.ApplicationListener;
/**
* Abstract class that listens for generic {@link RepositoryEvent}s and dispatches them to a specific method based on
* the event type.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -69,35 +69,35 @@ public abstract class AbstractRepositoryEventListener<T> implements ApplicationL
/**
* Override this method if you are interested in {@literal beforeCreate} events.
*
*
* @param entity The entity being created.
*/
protected void onBeforeCreate(T entity) {}
/**
* Override this method if you are interested in {@literal afterCreate} events.
*
*
* @param entity The entity that was created.
*/
protected void onAfterCreate(T entity) {}
/**
* Override this method if you are interested in {@literal beforeSave} events.
*
*
* @param entity The entity being saved.
*/
protected void onBeforeSave(T entity) {}
/**
* Override this method if you are interested in {@literal afterSave} events.
*
*
* @param entity The entity that was just saved.
*/
protected void onAfterSave(T entity) {}
/**
* Override this method if you are interested in {@literal beforeLinkSave} events.
*
*
* @param parent The parent entity to which the child object is linked.
* @param linked The linked, child entity.
*/
@@ -105,7 +105,7 @@ public abstract class AbstractRepositoryEventListener<T> implements ApplicationL
/**
* Override this method if you are interested in {@literal afterLinkSave} events.
*
*
* @param parent The parent entity to which the child object is linked.
* @param linked The linked, child entity.
*/
@@ -113,7 +113,7 @@ public abstract class AbstractRepositoryEventListener<T> implements ApplicationL
/**
* Override this method if you are interested in {@literal beforeLinkDelete} events.
*
*
* @param parent The parent entity to which the child object is linked.
* @param linked The linked, child entity.
*/
@@ -121,7 +121,7 @@ public abstract class AbstractRepositoryEventListener<T> implements ApplicationL
/**
* Override this method if you are interested in {@literal afterLinkDelete} events.
*
*
* @param parent The parent entity to which the child object is linked.
* @param linked The linked, child entity.
*/
@@ -129,14 +129,14 @@ public abstract class AbstractRepositoryEventListener<T> implements ApplicationL
/**
* Override this method if you are interested in {@literal beforeDelete} events.
*
*
* @param entity The entity that is being deleted.
*/
protected void onBeforeDelete(T entity) {}
/**
* Override this method if you are interested in {@literal afterDelete} events.
*
*
* @param entity The entity that was just deleted.
*/
protected void onAfterDelete(T entity) {}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 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.
@@ -52,7 +52,7 @@ import org.springframework.util.ReflectionUtils;
/**
* Component to discover annotated repository event handlers and trigger them on {@link ApplicationEvent}s.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -142,7 +142,7 @@ public class AnnotatedEventHandlerInvoker implements ApplicationListener<Reposit
/**
* Inspects the given handler method for an annotation of the given type. If the annotation present an
* {@link EventHandlerMethod} is registered for the given {@link RepositoryEvent} type.
*
*
* @param handler must not be {@literal null}.
* @param method must not be {@literal null}.
* @param annotationType must not be {@literal null}.
@@ -199,7 +199,7 @@ public class AnnotatedEventHandlerInvoker implements ApplicationListener<Reposit
return new EventHandlerMethod(targetType, method, handler);
}
/*
/*
* (non-Javadoc)
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2018 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.
@@ -17,7 +17,7 @@ package org.springframework.data.rest.core.event;
/**
* Base class for {@link RepositoryEvent}s that deal with saving/updating or deleting a linked object.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -28,7 +28,7 @@ public abstract class LinkedEntityEvent extends RepositoryEvent {
/**
* Creates a new {@link LinkedEntityEvent} for th given source and linked instance.
*
*
* @param source must not be {@literal null}.
* @param linked can be {@literal null}.
*/
@@ -40,7 +40,7 @@ public abstract class LinkedEntityEvent extends RepositoryEvent {
/**
* Get the linked object.
*
*
* @return The entity representing the right-hand side of this relationship.
*/
public Object getLinked() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.
@@ -36,7 +36,7 @@ import org.springframework.validation.Validator;
/**
* {@link org.springframework.context.ApplicationListener} implementation that dispatches {@link RepositoryEvent}s to a
* specific {@link Validator}.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@@ -49,7 +49,7 @@ public class ValidatingRepositoryEventListener extends AbstractRepositoryEventLi
/**
* Creates a new {@link ValidatingRepositoryEventListener} using the given repositories.
*
*
* @param persistentEntitiesFactory must not be {@literal null}.
*/
public ValidatingRepositoryEventListener(ObjectFactory<PersistentEntities> persistentEntitiesFactory) {
@@ -62,7 +62,7 @@ public class ValidatingRepositoryEventListener extends AbstractRepositoryEventLi
/**
* Assign a Map of {@link Validator}s that are assigned to the various {@link RepositoryEvent}s.
*
*
* @param validators A Map of Validators to wire.
* @return @this
*/
@@ -77,7 +77,7 @@ public class ValidatingRepositoryEventListener extends AbstractRepositoryEventLi
/**
* Add a {@link Validator} that will be triggered on the given event.
*
*
* @param event The event to listen for.
* @param validator The Validator to execute when that event fires.
* @return @this

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2018 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.util.StringUtils;
/**
* A {@link ResourceDescription} that is customized based on a {@link Description} annotation. Allows to fall back on
* another {@link ResourceDescription} to provide defaults.
*
*
* @author Oliver Gierke
*/
public class AnnotationBasedResourceDescription extends ResolvableResourceDescriptionSupport {
@@ -34,7 +34,7 @@ public class AnnotationBasedResourceDescription extends ResolvableResourceDescri
/**
* Creates a new {@link AnnotationBasedResourceDescription} for the given {@link Description} and fallback.
*
*
* @param description must not be {@literal null}.
* @param fallback must not be {@literal null}.
*/
@@ -55,7 +55,7 @@ public class AnnotationBasedResourceDescription extends ResolvableResourceDescri
this.fallback = fallback;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.context.MessageSourceResolvable#getCodes()
*/
@@ -64,7 +64,7 @@ public class AnnotationBasedResourceDescription extends ResolvableResourceDescri
return fallback.getCodes();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceDescription#getMessage()
*/
@@ -80,7 +80,7 @@ public class AnnotationBasedResourceDescription extends ResolvableResourceDescri
return null;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceDescription#isDefault()
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2018 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.
@@ -17,21 +17,21 @@ package org.springframework.data.rest.core.mapping;
/**
* A custom resource mapping for collection resources.
*
*
* @author Oliver Gierke
*/
public interface CollectionResourceMapping extends ResourceMapping {
/**
* Returns the relation type pointing to the item resource within a collection.
*
*
* @return
*/
String getItemResourceRel();
/**
* Returns the {@link ResourceDescription} for the item resource.
*
*
* @return
*/
ResourceDescription getItemResourceDescription();
@@ -39,7 +39,7 @@ public interface CollectionResourceMapping extends ResourceMapping {
/**
* Returns the projection type to be used when embedding item resources into collections and related resources. If
* {@literal null} is returned this will mean full rendering for collections and no rendering for related resources.
*
*
* @return
*/
Class<?> getExcerptProjection();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2018 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.
@@ -36,7 +36,7 @@ import org.springframework.util.Assert;
/**
* {@link SupportedHttpMethods} that are determined by a {@link CrudMethods} instance.
*
*
* @author Oliver Gierke
* @since 2.3
*/
@@ -46,7 +46,7 @@ public class CrudMethodsSupportedHttpMethods implements SupportedHttpMethods {
/**
* Creates a new {@link CrudMethodsSupportedHttpMethods} for the given {@link CrudMethods}.
*
*
* @param crudMethods must not be {@literal null}.
*/
public CrudMethodsSupportedHttpMethods(CrudMethods crudMethods) {
@@ -56,7 +56,7 @@ public class CrudMethodsSupportedHttpMethods implements SupportedHttpMethods {
this.exposedMethods = new DefaultExposureAwareCrudMethods(crudMethods);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.SupportedHttpMethods#getSupportedHttpMethods(org.springframework.data.rest.core.mapping.ResourceType)
*/
@@ -108,7 +108,7 @@ public class CrudMethodsSupportedHttpMethods implements SupportedHttpMethods {
return Collections.unmodifiableSet(methods);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.SupportedHttpMethods#getMethodsFor(org.springframework.data.mapping.PersistentProperty)
*/
@@ -144,7 +144,7 @@ public class CrudMethodsSupportedHttpMethods implements SupportedHttpMethods {
private final @NonNull CrudMethods crudMethods;
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ExposureAwareCrudMethods#exposesSave()
*/
@@ -153,7 +153,7 @@ public class CrudMethodsSupportedHttpMethods implements SupportedHttpMethods {
return exposes(crudMethods.getSaveMethod());
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ExposureAwareCrudMethods#exposesDelete()
*/
@@ -162,7 +162,7 @@ public class CrudMethodsSupportedHttpMethods implements SupportedHttpMethods {
return exposes(crudMethods.getDeleteMethod()) && crudMethods.hasFindOneMethod();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ExposureAwareCrudMethods#exposesFindOne()
*/
@@ -171,7 +171,7 @@ public class CrudMethodsSupportedHttpMethods implements SupportedHttpMethods {
return exposes(crudMethods.getFindOneMethod());
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ExposureAwareCrudMethods#exposesFindAll()
*/
@@ -198,28 +198,28 @@ public class CrudMethodsSupportedHttpMethods implements SupportedHttpMethods {
/**
* Returns whether the repository exposes the save method.
*
*
* @return
*/
boolean exposesSave();
/**
* Returns whether the repository exposes the delete method.
*
*
* @return
*/
boolean exposesDelete();
/**
* Returns whether the repository exposes the method to find a single object.
*
*
* @return
*/
boolean exposesFindOne();
/**
* Returns whether the repository exposes the method to find all objects.
*
*
* @return
*/
boolean exposesFindAll();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013 the original author or authors.
* Copyright 2013-2018 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.
@@ -21,14 +21,14 @@ import org.springframework.hateoas.RelProvider;
/**
* {@link TypeBasedCollectionResourceMapping} extension to use Evo Inflector to pluralize the simple class name by as
* default path.
*
*
* @author Oliver Gierke
*/
class EvoInflectorTypeBasedCollectionResourceMapping extends TypeBasedCollectionResourceMapping {
/**
* Creates a new {@link EvoInflectorTypeBasedCollectionResourceMapping} for the given type and {@link RelProvider}.
*
*
* @param type must not be {@literal null}.
* @param relProvider must not be {@literal null}.
*/
@@ -36,7 +36,7 @@ class EvoInflectorTypeBasedCollectionResourceMapping extends TypeBasedCollection
super(type, relProvider);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.TypeBasedCollectionResourceMapping#getDefaultPathFor(java.lang.Class)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2018 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.
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
/**
* {@link RootResourceMetadata} based on a {@link PersistentEntity}.
*
*
* @author Oliver Gierke
* @since 2.1
*/
@@ -43,7 +43,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
/**
* Creates a new {@link MappingResourceMetadata} for the given {@link PersistentEntity}.
*
*
* @param entity must not be {@literal null}.
*/
public MappingResourceMetadata(PersistentEntity<?, ?> entity, ResourceMappings resourceMappings) {
@@ -61,7 +61,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
.orElse(false);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMetadata#getDomainType()
*/
@@ -70,7 +70,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
return entity.getType();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMetadata#isExported(org.springframework.data.mapping.PersistentProperty)
*/
@@ -79,7 +79,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
return getMappingFor(property).isExported();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMetadata#getMappingFor(org.springframework.data.mapping.PersistentProperty)
*/
@@ -88,7 +88,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
return propertyMappings.getMappingFor(property);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMetadata#getSearchResourceMappings()
*/
@@ -97,7 +97,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
return new SearchResourceMappings(Collections.<MethodResourceMapping> emptyList());
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMetadata#getSupportedHttpMethods()
*/
@@ -106,7 +106,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
return NoSupportedMethods.INSTANCE;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.RootResourceMetadata#getProperty(java.lang.String)
*/
@@ -115,7 +115,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
return propertyMappings.getMappingFor(mappedPath);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.TypeBasedCollectionResourceMapping#isExported()
*/
@@ -126,7 +126,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
/**
* Value object for {@link ResourceMapping}s for {@link PersistentProperty} instances.
*
*
* @author Oliver Gierke
* @see 2.1
*/
@@ -137,7 +137,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
/**
* Creates a new {@link PropertyMappings} instance for the given {@link ResourceMappings}.
*
*
* @param resourceMappings
*/
public PropertyMappings(ResourceMappings resourceMappings) {
@@ -148,7 +148,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
this.propertyMappings = new HashMap<PersistentProperty<?>, PropertyAwareResourceMapping>();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.mapping.SimpleAssociationHandler#doWithAssociation(org.springframework.data.mapping.Association)
*/
@@ -157,7 +157,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
doWithPersistentProperty(association.getInverse());
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.mapping.SimplePropertyHandler#doWithPersistentProperty(org.springframework.data.mapping.PersistentProperty)
*/
@@ -172,7 +172,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
/**
* Returns the {@link PropertyAwareResourceMapping} for the given mapped path.
*
*
* @param mappedPath must not be {@literal null} or empty.
* @return the {@link PropertyAwareResourceMapping} if found, {@literal null} otherwise.
*/
@@ -191,7 +191,7 @@ class MappingResourceMetadata extends TypeBasedCollectionResourceMapping impleme
/**
* Returns the {@link ResourceMapping} for the given {@link PersistentProperty}.
*
*
* @param property must not be {@literal null}.
* @return
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2018 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,28 +22,28 @@ import java.util.Optional;
/**
* A {@link ResourceMapping} that is backed by a {@link Method}.
*
*
* @author Oliver Gierke
*/
public interface MethodResourceMapping extends ResourceMapping {
/**
* Returns the {@link Method} backing the resource.
*
*
* @return
*/
Method getMethod();
/**
* Returns {@link ParameterMetadata} instances for all named parameters.
*
*
* @return
*/
ParametersMetadata getParametersMetadata();
/**
* Returns whether the resource is sortable.
*
*
* @return
*/
boolean isSortableResource();
@@ -51,7 +51,7 @@ public interface MethodResourceMapping extends ResourceMapping {
/**
* Returns the domain type that the query method returns. This will inspect wrapper types ({@link Collection}s,
* {@link Map}s, {@link Optional}s etc.) for their element or value types.
*
*
* @return will never be {@literal null}.
* @since 2.3
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2018 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.
@@ -21,7 +21,7 @@ import org.springframework.util.Assert;
/**
* Value object to capture metadata for query method parameters.
*
*
* @author Oliver Gierke
*/
public final class ParameterMetadata {
@@ -31,7 +31,7 @@ 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 baseRel must not be {@literal null} or empty.
*/
@@ -51,7 +51,7 @@ public final class ParameterMetadata {
/**
* Return sthe name of the method parameter.
*
*
* @return the name
*/
public String getName() {
@@ -60,14 +60,14 @@ public final class ParameterMetadata {
/**
* Returns the description for the method parameter.
*
*
* @return the description
*/
public ResourceDescription getDescription() {
return description;
}
/*
/*
* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@@ -86,7 +86,7 @@ public final class ParameterMetadata {
return this.name.equals(that.name) && this.description.equals(that.description);
}
/*
/*
* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2018 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.
@@ -23,7 +23,7 @@ import org.springframework.util.Assert;
/**
* Value object for a list of {@link ParameterMetadata} instances.
*
*
* @author Oliver Gierke
*/
public class ParametersMetadata implements Iterable<ParameterMetadata> {
@@ -32,7 +32,7 @@ public class ParametersMetadata implements Iterable<ParameterMetadata> {
/**
* Creates a new {@link ParametersMetadata} instance for the given {@link ParameterMetadata} instances.
*
*
* @param parameterMetadata must not be {@literal null}.
*/
ParametersMetadata(List<ParameterMetadata> parameterMetadata) {
@@ -44,7 +44,7 @@ public class ParametersMetadata implements Iterable<ParameterMetadata> {
/**
* Returns all parameter names.
*
*
* @return
*/
public List<String> getParameterNames() {
@@ -58,7 +58,7 @@ public class ParametersMetadata implements Iterable<ParameterMetadata> {
return names;
}
/*
/*
* (non-Javadoc)
* @see java.lang.Iterable#iterator()
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2017 the original author or authors.
* Copyright 2015-2018 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.
@@ -31,7 +31,7 @@ import org.springframework.util.ClassUtils;
/**
* {@link ResourceMappings} for {@link PersistentEntities}.
*
*
* @author Oliver Gierke
* @author Mark Paluch
*/
@@ -47,14 +47,14 @@ public class PersistentEntitiesResourceMappings implements ResourceMappings {
/**
* Creates a new {@link PersistentEntitiesResourceMappings} from the given {@link PersistentEntities}.
*
*
* @param entities must not be {@literal null}.
*/
public PersistentEntitiesResourceMappings(PersistentEntities entities) {
this.entities = entities;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMappings#getMappingFor(java.lang.Class)
*/
@@ -77,7 +77,7 @@ public class PersistentEntitiesResourceMappings implements ResourceMappings {
/**
* Returns the {@link MappingResourceMetadata} for the given type.
*
*
* @param type must not be {@literal null}.
* @return the {@link MappingResourceMetadata} if the given type is a {@link PersistentEntity}, {@literal null}
* otherwise.
@@ -104,7 +104,7 @@ public class PersistentEntitiesResourceMappings implements ResourceMappings {
}).orElse(null);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMappings#getSearchResourceMappings(java.lang.Class)
*/
@@ -113,7 +113,7 @@ public class PersistentEntitiesResourceMappings implements ResourceMappings {
return searchResourceMappings;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMappings#exportsMappingFor(java.lang.Class)
*/
@@ -128,7 +128,7 @@ public class PersistentEntitiesResourceMappings implements ResourceMappings {
return metadata.isExported();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMappings#exportsTopLevelResourceFor(java.lang.String)
*/
@@ -146,7 +146,7 @@ public class PersistentEntitiesResourceMappings implements ResourceMappings {
return false;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMappings#hasMappingFor(java.lang.Class)
*/
@@ -160,7 +160,7 @@ public class PersistentEntitiesResourceMappings implements ResourceMappings {
return false;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMetadataProvider#getMappingFor(org.springframework.data.mapping.PersistentProperty)
*/
@@ -185,7 +185,7 @@ public class PersistentEntitiesResourceMappings implements ResourceMappings {
return metadata != null && metadata.isExported();
}
/*
/*
* (non-Javadoc)
* @see java.lang.Iterable#iterator()
*/
@@ -205,7 +205,7 @@ public class PersistentEntitiesResourceMappings implements ResourceMappings {
/**
* Adds the given {@link ResourceMetadata} to the cache.
*
*
* @param type must not be {@literal null}.
* @param metadata can be {@literal null}.
*/
@@ -215,7 +215,7 @@ public class PersistentEntitiesResourceMappings implements ResourceMappings {
/**
* Returns whether we currently already have {@link ResourceMetadata} for the given type.
*
*
* @param type must not be {@literal null}.
* @return
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2018 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.
@@ -27,7 +27,7 @@ import org.springframework.util.StringUtils;
/**
* Special resource mapping for {@link PersistentProperty} instances.
*
*
* @author Oliver Gierke
*/
class PersistentPropertyResourceMapping implements PropertyAwareResourceMapping {
@@ -39,7 +39,7 @@ class PersistentPropertyResourceMapping implements PropertyAwareResourceMapping
/**
* Creates a new {@link RootPropertyResourceMapping}.
*
*
* @param property must not be {@literal null}.
* @param exported whether the property is exported or not.
*/
@@ -54,7 +54,7 @@ class PersistentPropertyResourceMapping implements PropertyAwareResourceMapping
this.description = Optional.ofNullable(property.findAnnotation(Description.class));
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getPath()
*/
@@ -66,7 +66,7 @@ class PersistentPropertyResourceMapping implements PropertyAwareResourceMapping
.orElseGet(() -> new Path(property.getName()));
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getRel()
*/
@@ -78,7 +78,7 @@ class PersistentPropertyResourceMapping implements PropertyAwareResourceMapping
.orElseGet(() -> property.getName());
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#isExported()
*/
@@ -93,7 +93,7 @@ class PersistentPropertyResourceMapping implements PropertyAwareResourceMapping
return !typeMapping.isExported() ? false : annotation.map(it -> it.exported()).orElse(true);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#isPagingResource()
*/
@@ -102,7 +102,7 @@ class PersistentPropertyResourceMapping implements PropertyAwareResourceMapping
return false;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getDescription()
*/
@@ -118,7 +118,7 @@ class PersistentPropertyResourceMapping implements PropertyAwareResourceMapping
.orElse(fallback);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.PropertyAwareResourceMapping#getProperty()
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2018 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.
@@ -25,7 +25,7 @@ import org.springframework.util.Assert;
/**
* {@link ResourceMetadata} for a single repository.
*
*
* @author Oliver Gierke
*/
class RepositoryAwareResourceMetadata implements ResourceMetadata {
@@ -40,7 +40,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
/**
* Creates a new {@link RepositoryAwareResourceMetadata} for the given {@link CollectionResourceMapping},
* {@link ResourceMappings} and {@link RepositoryMetadata}.
*
*
* @param entity must not be {@literal null}.
* @param mapping must not be {@literal null}.
* @param provider must not be {@literal null}.
@@ -63,14 +63,14 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
/**
* Returns whether the current {@link RootResourceMetadata} instance for the repository is the primary one to be used.
* Reflects to the primary state of the bean definition.
*
*
* @return
*/
public boolean isPrimary() {
return AnnotationUtils.findAnnotation(repositoryMetadata.getRepositoryInterface(), Primary.class) != null;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMetadata#getDomainType()
*/
@@ -79,7 +79,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return repositoryMetadata.getDomainType();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.RootResourceMetadata#getProperty(java.lang.String)
*/
@@ -93,7 +93,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return mappingMetadata.getProperty(mappedPath);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMetadataProvider#getMappingFor(org.springframework.data.mapping.PersistentProperty)
*/
@@ -102,7 +102,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return provider.getMappingFor(property);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMetadataProvider#hasMappingFor(org.springframework.data.mapping.PersistentProperty)
*/
@@ -111,7 +111,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return provider.isMapped(property);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#isExported()
*/
@@ -120,7 +120,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return mapping.isExported();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#getCollectionRel()
*/
@@ -129,7 +129,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return mapping.getRel();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#getSingleResourceRel()
*/
@@ -138,7 +138,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return mapping.getItemResourceRel();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#getPath()
*/
@@ -147,7 +147,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return mapping.getPath();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#isPagingResource()
*/
@@ -156,7 +156,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return mapping.isPagingResource();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getDescription()
*/
@@ -165,7 +165,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return mapping.getDescription();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#getItemResourceDescription()
*/
@@ -174,7 +174,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return mapping.getItemResourceDescription();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#getExcerptProjection()
*/
@@ -183,7 +183,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return mapping.getExcerptProjection();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMetadata#getSearchResourceMappings()
*/
@@ -192,7 +192,7 @@ class RepositoryAwareResourceMetadata implements ResourceMetadata {
return provider.getSearchResourceMappings(repositoryMetadata.getDomainType());
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMetadata#getSupportedHttpMethods()
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2018 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.
@@ -32,7 +32,7 @@ import org.springframework.util.StringUtils;
* {@link CollectionResourceMapping} to be built from repository interfaces. Will inspect {@link RestResource}
* annotations on the repository interface but fall back to the mapping information of the managed domain type for
* defaults.
*
*
* @author Oliver Gierke
*/
class RepositoryCollectionResourceMapping implements CollectionResourceMapping {
@@ -53,7 +53,7 @@ class RepositoryCollectionResourceMapping implements CollectionResourceMapping {
/**
* Creates a new {@link RepositoryCollectionResourceMapping} for the given repository using the given
* {@link RelProvider}.
*
*
* @param strategy must not be {@literal null}.
* @param relProvider must not be {@literal null}.
* @param repositoryType must not be {@literal null}.
@@ -84,7 +84,7 @@ class RepositoryCollectionResourceMapping implements CollectionResourceMapping {
}
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getPath()
*/
@@ -106,7 +106,7 @@ class RepositoryCollectionResourceMapping implements CollectionResourceMapping {
return fallback;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getRel()
*/
@@ -128,7 +128,7 @@ class RepositoryCollectionResourceMapping implements CollectionResourceMapping {
return fallback;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#getSingleResourceRel()
*/
@@ -145,7 +145,7 @@ class RepositoryCollectionResourceMapping implements CollectionResourceMapping {
return fallback;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#isExported()
*/
@@ -154,7 +154,7 @@ class RepositoryCollectionResourceMapping implements CollectionResourceMapping {
return repositoryExported;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#isPagingResource()
*/
@@ -163,7 +163,7 @@ class RepositoryCollectionResourceMapping implements CollectionResourceMapping {
return metadata.isPagingRepository();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getDescription()
*/
@@ -179,7 +179,7 @@ class RepositoryCollectionResourceMapping implements CollectionResourceMapping {
return fallback;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#getItemResourceDescription()
*/
@@ -195,7 +195,7 @@ class RepositoryCollectionResourceMapping implements CollectionResourceMapping {
return fallback;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#getExcerptProjection()
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2018 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.rest.core.annotation.RestResource;
/**
* The strategy to determine whether a given repository is to be exported by Spring Data REST.
*
*
* @author Oliver Gierke
* @since 2.5
* @soundtrack Katinka - Ausverkauf
@@ -33,7 +33,7 @@ public interface RepositoryDetectionStrategy {
/**
* Returns whether the repository described by the given {@link RepositoryMetadata} is exported or not.
*
*
* @param metadata must not be {@literal null}.
* @return
*/
@@ -61,7 +61,7 @@ public interface RepositoryDetectionStrategy {
/**
* Exposes public interfaces or ones explicitly annotated with {@link RepositoryRestResource}.
*
*
* @see #VISIBILITY
* @see #ANNOTATED
*/
@@ -101,7 +101,7 @@ public interface RepositoryDetectionStrategy {
/**
* Returns whether the given type was explicitly exported using {@link RepositoryRestResource} or
* {@link RestResource}. In case no decision can be made based on the annotations, the fallback will be used.
*
*
* @param type must not be {@literal null}.
* @param fallback
* @return

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2018 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.
@@ -37,7 +37,7 @@ import org.springframework.util.StringUtils;
/**
* A {@link RepositoryMethodResourceMapping} created from a {@link Method}.
*
*
* @author Oliver Gierke
*/
class RepositoryMethodResourceMapping implements MethodResourceMapping {
@@ -58,7 +58,7 @@ class RepositoryMethodResourceMapping implements MethodResourceMapping {
/**
* Creates a new {@link RepositoryMethodResourceMapping} for the given {@link Method}.
*
*
* @param method must not be {@literal null}.
* @param resourceMapping must not be {@literal null}.
*/
@@ -98,7 +98,7 @@ class RepositoryMethodResourceMapping implements MethodResourceMapping {
return Collections.unmodifiableList(result);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#isExported()
*/
@@ -107,7 +107,7 @@ class RepositoryMethodResourceMapping implements MethodResourceMapping {
return isExported;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getRel()
*/
@@ -116,7 +116,7 @@ class RepositoryMethodResourceMapping implements MethodResourceMapping {
return rel;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getPath()
*/
@@ -125,7 +125,7 @@ class RepositoryMethodResourceMapping implements MethodResourceMapping {
return path;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.MethodResourceMapping#getMethod()
*/
@@ -134,7 +134,7 @@ class RepositoryMethodResourceMapping implements MethodResourceMapping {
return method;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.MethodResourceMapping#getParameterMetadata()
*/
@@ -143,7 +143,7 @@ class RepositoryMethodResourceMapping implements MethodResourceMapping {
return new ParametersMetadata(parameterMetadata);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#isPagingResource()
*/
@@ -152,7 +152,7 @@ class RepositoryMethodResourceMapping implements MethodResourceMapping {
return paging;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.MethodResourceMapping#isSortableResource()
*/
@@ -161,7 +161,7 @@ class RepositoryMethodResourceMapping implements MethodResourceMapping {
return sorting;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getDescription()
*/
@@ -170,7 +170,7 @@ class RepositoryMethodResourceMapping implements MethodResourceMapping {
return null;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.MethodResourceMapping#getProjectionSourceType()
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2018 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,7 +34,7 @@ import org.springframework.util.Assert;
/**
* Central abstraction obtain {@link ResourceMetadata} and {@link ResourceMapping} instances for domain types and
* repositories.
*
*
* @author Oliver Gierke
*/
public class RepositoryResourceMappings extends PersistentEntitiesResourceMappings {
@@ -45,7 +45,7 @@ public class RepositoryResourceMappings extends PersistentEntitiesResourceMappin
/**
* Creates a new {@link RepositoryResourceMappings} using the given {@link Repositories} and
* {@link PersistentEntities}.
*
*
* @param repositories must not be {@literal null}.
* @param entities must not be {@literal null}.
* @param strategy must not be {@literal null}.
@@ -58,7 +58,7 @@ public class RepositoryResourceMappings extends PersistentEntitiesResourceMappin
/**
* Creates a new {@link RepositoryResourceMappings} from the given {@link RepositoryRestConfiguration},
* {@link Repositories} and {@link RelProvider}.
*
*
* @param repositories must not be {@literal null}.
* @param entities must not be {@literal null}.
* @param strategy must not be {@literal null}.
@@ -98,7 +98,7 @@ public class RepositoryResourceMappings extends PersistentEntitiesResourceMappin
}
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMappings#getSearchResourceMappings(java.lang.Class)
*/
@@ -130,7 +130,7 @@ public class RepositoryResourceMappings extends PersistentEntitiesResourceMappin
return searchResourceMappings;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMappings#hasMappingFor(java.lang.Class)
*/
@@ -148,7 +148,7 @@ public class RepositoryResourceMappings extends PersistentEntitiesResourceMappin
return false;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.PersistentEntitiesResourceMappings#isMapped(org.springframework.data.mapping.PersistentProperty)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2018 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.
@@ -19,12 +19,12 @@ import org.springframework.context.MessageSourceResolvable;
/**
* Adapter class for the {@link MessageSourceResolvable} part of a {@link ResourceDescription}.
*
*
* @author Oliver Gierke
*/
public abstract class ResolvableResourceDescriptionSupport implements ResourceDescription {
/*
/*
* (non-Javadoc)
* @see org.springframework.context.MessageSourceResolvable#getArguments()
*/
@@ -33,7 +33,7 @@ public abstract class ResolvableResourceDescriptionSupport implements ResourceDe
return new Object[0];
}
/*
/*
* (non-Javadoc)
* @see org.springframework.context.MessageSourceResolvable#getDefaultMessage()
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2018 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.
@@ -21,7 +21,7 @@ import org.springframework.http.MediaType;
/**
* A description of a resource. Resolvable to plain text by using a {@link MessageSource}.
*
*
* @author Oliver Gierke
*/
public interface ResourceDescription extends MessageSourceResolvable {
@@ -29,14 +29,14 @@ public interface ResourceDescription extends MessageSourceResolvable {
/**
* Returns the description. This can be a message source code or a custom text format. Prefer resolving the
* {@link ResourceDescription} using a {@link MessageSource}.
*
*
* @return
*/
String getMessage();
/**
* Returns whether this is the default description.
*
*
* @return
*/
boolean isDefault();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2018 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.
@@ -19,42 +19,42 @@ import org.springframework.data.rest.core.Path;
/**
* Mapping information for components to be exported as REST resources.
*
*
* @author Oliver Gierke
*/
public interface ResourceMapping {
/**
* Returns whether the component shall be exported at all.
*
*
* @return will never be {@literal null}.
*/
boolean isExported();
/**
* Returns the relation for the resource exported.
*
*
* @return will never be {@literal null}.
*/
String getRel();
/**
* Returns the path the resource is exposed under.
*
*
* @return will never be {@literal null}.
*/
Path getPath();
/**
* Returns whether the resource is paging one.
*
*
* @return
*/
boolean isPagingResource();
/**
* Returns the resource's description.
*
*
* @return
*/
ResourceDescription getDescription();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2018 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 @@ public interface ResourceMappings extends Streamable<ResourceMetadata> {
/**
* Returns a {@link ResourceMetadata} for the given type if available.
*
*
* @param type must not be {@literal null}.
* @return the {@link ResourceMetadata} if available or {@literal null} otherwise.
*/
@@ -32,7 +32,7 @@ public interface ResourceMappings extends Streamable<ResourceMetadata> {
/**
* Returns the {@link ResourceMapping}s for the search resources of the given type.
*
*
* @param type must not be {@literal null}.
* @return will never be {@literal null}.
*/
@@ -40,7 +40,7 @@ public interface ResourceMappings extends Streamable<ResourceMetadata> {
/**
* Returns whether we have a {@link ResourceMapping} for the given type and it is exported.
*
*
* @param type
* @return
*/
@@ -48,7 +48,7 @@ public interface ResourceMappings extends Streamable<ResourceMetadata> {
/**
* Returns whether we export a top-level resource for the given path.
*
*
* @param path must not be {@literal null} or empty.
* @return
*/
@@ -56,7 +56,7 @@ public interface ResourceMappings extends Streamable<ResourceMetadata> {
/**
* Returns whether we have a {@link ResourceMapping} for the given type.
*
*
* @param type must not be {@literal null}.
* @return
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2018 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.
@@ -20,21 +20,21 @@ import org.springframework.http.HttpMethod;
/**
* Interface for metadata of resources exposed through the system.
*
*
* @author Oliver Gierke
*/
public interface ResourceMetadata extends CollectionResourceMapping {
/**
* Returns the domain type that is exposed through the resource.
*
*
* @return
*/
Class<?> getDomainType();
/**
* Returns whether the given {@link PersistentProperty} is a managed resource and in fact exported.
*
*
* @param property must not be {@literal null}.
* @return
*/
@@ -42,7 +42,7 @@ public interface ResourceMetadata extends CollectionResourceMapping {
/**
* Returns the {@link PropertyAwareResourceMapping} for the given mapped path.
*
*
* @param mappedPath must not be {@literal null} or empty.
* @return the {@link PropertyAwareResourceMapping} for the given path or {@literal null} if none found.
*/
@@ -50,7 +50,7 @@ public interface ResourceMetadata extends CollectionResourceMapping {
/**
* Returns the {@link ResourceMapping} for the given {@link PersistentProperty} or {@literal null} if not managed.
*
*
* @param property must not be {@literal null}.
* @return
*/
@@ -59,14 +59,14 @@ public interface ResourceMetadata extends CollectionResourceMapping {
/**
* Returns the {@link SearchResourceMappings}, i.e. the mappings for the search resource exposed for the current
* resource.
*
*
* @return
*/
SearchResourceMappings getSearchResourceMappings();
/**
* Returns the supported {@link HttpMethod}s for the given {@link ResourceType}.
*
*
* @param resourcType must not be {@literal null}.
* @return
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2018 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.
@@ -17,7 +17,7 @@ package org.springframework.data.rest.core.mapping;
/**
* An enum listing all supported resource types.
*
*
* @author Oliver Gierke
*/
public enum ResourceType {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2018 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.
@@ -28,7 +28,7 @@ import org.springframework.util.Assert;
/**
* {@link ResourceMapping} for all search resources.
*
*
* @author Oliver Gierke
*/
public class SearchResourceMappings implements Iterable<MethodResourceMapping>, ResourceMapping {
@@ -43,7 +43,7 @@ public class SearchResourceMappings implements Iterable<MethodResourceMapping>,
/**
* Creates a new {@link SearchResourceMappings} from the given
*
*
* @param mappings
*/
public SearchResourceMappings(List<MethodResourceMapping> mappings) {
@@ -67,7 +67,7 @@ public class SearchResourceMappings implements Iterable<MethodResourceMapping>,
/**
* Returns the method mapped to the given path.
*
*
* @param path must not be {@literal null} or empty.
* @return
*/
@@ -81,7 +81,7 @@ public class SearchResourceMappings implements Iterable<MethodResourceMapping>,
/**
* Returns the mappings for all exported query methods.
*
*
* @return
* @since 2.3
*/
@@ -100,7 +100,7 @@ public class SearchResourceMappings implements Iterable<MethodResourceMapping>,
/**
* Returns the {@link MappingResourceMetadata} for the given relation name.
*
*
* @param rel must not be {@literal null} or empty.
* @return
* @since 2.3
@@ -121,7 +121,7 @@ public class SearchResourceMappings implements Iterable<MethodResourceMapping>,
/**
* Returns the {@link MethodResourceMapping} for the given path.
*
*
* @param path must not be {@literal null} or empty.
* @return
* @since 2.4
@@ -140,7 +140,7 @@ public class SearchResourceMappings implements Iterable<MethodResourceMapping>,
return null;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getPath()
*/
@@ -149,7 +149,7 @@ public class SearchResourceMappings implements Iterable<MethodResourceMapping>,
return PATH;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getRel()
*/
@@ -158,7 +158,7 @@ public class SearchResourceMappings implements Iterable<MethodResourceMapping>,
return REL;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#isExported()
*/
@@ -167,7 +167,7 @@ public class SearchResourceMappings implements Iterable<MethodResourceMapping>,
return !mappings.isEmpty();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#isPagingResource()
*/
@@ -176,7 +176,7 @@ public class SearchResourceMappings implements Iterable<MethodResourceMapping>,
return false;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getDescription()
*/
@@ -185,7 +185,7 @@ public class SearchResourceMappings implements Iterable<MethodResourceMapping>,
return null;
}
/*
/*
* (non-Javadoc)
* @see java.lang.Iterable#iterator()
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2018 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.
@@ -32,7 +32,7 @@ public class SimpleResourceDescription extends ResolvableResourceDescriptionSupp
/**
* Creates a new {@link SimpleResourceDescription} with the given message and {@link MediaType}.
*
*
* @param message must not be {@literal null} or empty.
* @param mediaType must not be {@literal null} or empty.
*/
@@ -73,7 +73,7 @@ public class SimpleResourceDescription extends ResolvableResourceDescriptionSupp
return StringUtils.hasText(message) && message.startsWith(DEFAULT_KEY_PREFIX);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.context.MessageSourceResolvable#getCodes()
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2018 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.
@@ -23,14 +23,14 @@ import org.springframework.http.HttpMethod;
/**
* An API to discover the {@link HttpMethod}s supported on a given {@link ResourceType}.
*
*
* @author Oliver Gierke
*/
public interface SupportedHttpMethods {
/**
* Returns the supported {@link HttpMethod}s for the given {@link ResourceType}.
*
*
* @param type must not be {@literal null}.
* @return
*/
@@ -38,7 +38,7 @@ public interface SupportedHttpMethods {
/**
* Returns the supported {@link HttpMethod}s for the given {@link PersistentProperty}.
*
*
* @param property must not be {@literal null}.
* @return
*/
@@ -53,7 +53,7 @@ public interface SupportedHttpMethods {
INSTANCE;
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.SupportedHttpMethods#getSupportedHttpMethods(org.springframework.data.rest.core.mapping.ResourceType)
*/
@@ -62,7 +62,7 @@ public interface SupportedHttpMethods {
return Collections.emptySet();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.SupportedHttpMethods#getMethodsFor(org.springframework.data.mapping.PersistentProperty)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2018 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.util.StringUtils;
/**
* {@link CollectionResourceMapping} based on a type. Will derive default relation types and pathes from the type but
* inspect it for {@link RestResource} annotations for customization.
*
*
* @author Oliver Gierke
*/
class TypeBasedCollectionResourceMapping implements CollectionResourceMapping {
@@ -41,7 +41,7 @@ class TypeBasedCollectionResourceMapping implements CollectionResourceMapping {
/**
* Creates a new {@link TypeBasedCollectionResourceMapping} using the given type.
*
*
* @param type must not be {@literal null}.
*/
public TypeBasedCollectionResourceMapping(Class<?> type) {
@@ -50,7 +50,7 @@ class TypeBasedCollectionResourceMapping implements CollectionResourceMapping {
/**
* Creates a new {@link TypeBasedCollectionResourceMapping} using the given type and {@link RelProvider}.
*
*
* @param type must not be {@literal null}.
* @param relProvider must not be {@literal null}.
*/
@@ -65,7 +65,7 @@ class TypeBasedCollectionResourceMapping implements CollectionResourceMapping {
this.description = AnnotationUtils.findAnnotation(type, Description.class);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getPath()
*/
@@ -77,7 +77,7 @@ class TypeBasedCollectionResourceMapping implements CollectionResourceMapping {
return new Path(path);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#isExported()
*/
@@ -86,7 +86,7 @@ class TypeBasedCollectionResourceMapping implements CollectionResourceMapping {
return annotation != null ? annotation.exported() : Modifier.isPublic(type.getModifiers());
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getRel()
*/
@@ -100,7 +100,7 @@ class TypeBasedCollectionResourceMapping implements CollectionResourceMapping {
return annotation.rel();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#getSingleResourceRel()
*/
@@ -109,7 +109,7 @@ class TypeBasedCollectionResourceMapping implements CollectionResourceMapping {
return relProvider.getItemResourceRelFor(type);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#isPagingResource()
*/
@@ -118,7 +118,7 @@ class TypeBasedCollectionResourceMapping implements CollectionResourceMapping {
return false;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResourceMapping#getDescription()
*/
@@ -138,7 +138,7 @@ class TypeBasedCollectionResourceMapping implements CollectionResourceMapping {
return fallback;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#getItemResourceDescription()
*/
@@ -158,7 +158,7 @@ class TypeBasedCollectionResourceMapping implements CollectionResourceMapping {
return fallback;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.CollectionResourceMapping#getExcerptProjection()
*/
@@ -169,7 +169,7 @@ class TypeBasedCollectionResourceMapping implements CollectionResourceMapping {
/**
* Returns the default path to be used if the path is not configured manually.
*
*
* @param type must not be {@literal null}.
* @return
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2018 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.
@@ -25,7 +25,7 @@ import org.springframework.util.StringUtils;
* {@link SimpleResourceDescription} that additionally captures a type to be able to potentially create a reasonable
* default message. The implementation will do so for enum types by rendering the available values as default message
* and also provide them as arguments for message resolution.
*
*
* @author Oliver Gierke
*/
public class TypedResourceDescription extends SimpleResourceDescription {
@@ -34,7 +34,7 @@ public class TypedResourceDescription extends SimpleResourceDescription {
/**
* Creates a new {@link TypedResourceDescription} for the given message, {@link MediaType} and type.
*
*
* @param message must not be {@literal null} or empty.
* @param mediaType must not be {@literal null} or empty.
* @param type can be {@literal null}, defaults to {@link Object}.
@@ -62,7 +62,7 @@ public class TypedResourceDescription extends SimpleResourceDescription {
return new TypedResourceDescription(message, DEFAULT_MEDIA_TYPE, type);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResolvableResourceDescriptionSupport#getArguments()
*/
@@ -71,7 +71,7 @@ public class TypedResourceDescription extends SimpleResourceDescription {
return type.isEnum() ? new Object[] { getEnumValues(type) } : new Object[0];
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.mapping.ResolvableResourceDescriptionSupport#getDefaultMessage()
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2018 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.
@@ -18,14 +18,14 @@ package org.springframework.data.rest.core.projection;
/**
* Interface to allow the lookup of a projection interface by source type and name. This allows the definition of
* projections with the same name for different source types.
*
*
* @author Oliver Gierke
*/
public interface ProjectionDefinitions {
/**
* Returns the projection type for the given source type and name.
*
*
* @param sourceType must not be {@literal null}.
* @param name must not be {@literal null} or empty.
* @return
@@ -34,7 +34,7 @@ public interface ProjectionDefinitions {
/**
* Returns whether we have a projection registered for the given source type.
*
*
* @param sourceType must not be {@literal null}.
* @return
*/
@@ -42,7 +42,7 @@ public interface ProjectionDefinitions {
/**
* Returns the request parameter to be used to expose the projection to the web.
*
*
* @return the parameterName will never be {@literal null} or empty.
*/
String getParameterName();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2018 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.
@@ -26,7 +26,7 @@ import org.springframework.util.Assert;
/**
* Default implementation of SelfLinkProvider that uses an {@link EntityLinks} instance to create self links. Considers
* the configured {@link EntityLookup}s to use the returned resource identifier to eventually create the link.
*
*
* @author Oliver Gierke
* @since 2.5
* @soundtrack Trio Rotation - Travis
@@ -40,7 +40,7 @@ public class DefaultSelfLinkProvider implements SelfLinkProvider {
/**
* Creates a new {@link DefaultSelfLinkProvider} from the {@link PersistentEntities}, {@link EntityLinks} and
* {@link EntityLookup}s.
*
*
* @param entities must not be {@literal null}.
* @param entityLinks must not be {@literal null}.
* @param lookups must not be {@literal null}.
@@ -70,7 +70,7 @@ public class DefaultSelfLinkProvider implements SelfLinkProvider {
/**
* Returns the identifier to be used to create the self link URI.
*
*
* @param instance must not be {@literal null}.
* @return
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2018 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.
@@ -32,7 +32,7 @@ import org.springframework.util.ObjectUtils;
/**
* Component to be able to merge the first level of two objects.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
* @author Willie Wheeler
@@ -44,7 +44,7 @@ public class DomainObjectMerger {
/**
* Creates a new {@link DomainObjectMerger} for the given {@link Repositories} and {@link ConversionService}.
*
*
* @param repositories must not be {@literal null}.
* @param conversionService must not be {@literal null}.
*/
@@ -60,7 +60,7 @@ public class DomainObjectMerger {
/**
* Merges the given target object into the source one.
*
*
* @param from can be {@literal null}.
* @param target can be {@literal null}.
* @param nullPolicy how to handle {@literal null} values in the source object.
@@ -126,7 +126,7 @@ public class DomainObjectMerger {
/**
* Returns whether the given source is {@literal null} or considered empty, which means it's an {@link Iterable} or
* array and doesn't have any elements.
*
*
* @param source can be {@literal null}.
* @return
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2018 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.
@@ -23,7 +23,7 @@ import org.springframework.plugin.core.Plugin;
* SPI to customize which property of an entity is used as unique identifier and how the entity instance is looked up
* from the backend. Prefer to extend {@link EntityLookupSupport} to let the generics declaration be used for the
* {@link #supports(Object)} method automatically.
*
*
* @author Oliver Gierke
* @see EntityLookupSupport
* @see DefaultSelfLinkProvider
@@ -37,7 +37,7 @@ public interface EntityLookup<T> extends Plugin<Class<?>> {
* Returns the property of the given entity that shall be used to uniquely identify it. If no {@link EntityLookup} is
* defined for a particular type, a standard identifier lookup mechanism (i.e. the datastore identifier) will be used
* to eventually create an identifying URI.
*
*
* @param entity will never be {@literal null}.
* @return must not be {@literal null}.
*/
@@ -50,7 +50,7 @@ public interface EntityLookup<T> extends Plugin<Class<?>> {
* <p>
* Implementations are free to return {@literal null} to indicate absence of a value or wrap the result into any
* generally supported {@code Optional} type.
*
*
* @param id will never be {@literal null}.
* @return can be {@literal null}.
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2018 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.
@@ -19,7 +19,7 @@ import org.springframework.core.GenericTypeResolver;
/**
* {@link EntityLookup} implementation base class to derive the supported domain type from the generics signature.
*
*
* @author Oliver Gierke
* @since 2.5
* @soundtrack Elephants Crossing - The New (Live at Stadtfest Dresden -
@@ -36,7 +36,7 @@ public abstract class EntityLookupSupport<T> implements EntityLookup<T> {
this.domainType = GenericTypeResolver.resolveTypeArgument(getClass(), EntityLookup.class);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.plugin.core.Plugin#supports(java.lang.Object)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2018 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.util.Assert;
/**
* A {@link RelProvider} based on the {@link ResourceMappings} for the registered repositories.
*
*
* @author Oliver Gierke
*/
@Order(Ordered.LOWEST_PRECEDENCE + 10)
@@ -34,7 +34,7 @@ public class RepositoryRelProvider implements RelProvider {
/**
* Creates a new {@link RepositoryRelProvider} for the given {@link ResourceMappings}.
*
*
* @param mappings must not be {@literal null}.
*/
public RepositoryRelProvider(ObjectFactory<ResourceMappings> mappings) {
@@ -43,7 +43,7 @@ public class RepositoryRelProvider implements RelProvider {
this.mappings = mappings;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.hateoas.RelProvider#getCollectionResourceRelFor(java.lang.Class)
*/
@@ -52,7 +52,7 @@ public class RepositoryRelProvider implements RelProvider {
return mappings.getObject().getMetadataFor(type).getRel();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.hateoas.RelProvider#getItemResourceRelFor(java.lang.Class)
*/
@@ -61,7 +61,7 @@ public class RepositoryRelProvider implements RelProvider {
return mappings.getObject().getMetadataFor(type).getItemResourceRel();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.plugin.core.Plugin#supports(java.lang.Object)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2018 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.data.rest.core.config.ResourceMapping;
/**
* Helper methods to get the default rel and path values or to use values supplied by annotations.
*
*
* @author Jon Brisbin
* @author Florent Biville
* @author Oliver Gierke

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013 the original author or authors.
* Copyright 2013-2018 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.
@@ -17,7 +17,7 @@ package org.springframework.data.rest.core.support;
/**
* Helper methods aiming at handling String representations of resources.
*
*
* @author Florent Biville
*/
public class ResourceStringUtils {
@@ -25,7 +25,7 @@ public class ResourceStringUtils {
/**
* Checks whether the given input contains actual text (slash excluded). This is a specializing variant of
* {@link org.springframework.util.StringUtils )}#hasText.
*
*
* @param input
*/
public static boolean hasTextExceptSlash(CharSequence input) {
@@ -43,7 +43,7 @@ public class ResourceStringUtils {
/**
* Returns a string without the leading slash, if any.
*
*
* @param path
*/
public static String removeLeadingSlash(String path) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2018 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.
@@ -19,7 +19,7 @@ import org.springframework.hateoas.Link;
/**
* Component to create self links for entity instances.
*
*
* @author Oliver Gierke
* @since 2.5
* @soundtrack Trio Rotation - Rotation
@@ -28,7 +28,7 @@ public interface SelfLinkProvider {
/**
* Returns the self link for the given entity instance.
*
*
* @param instance must never be {@literal null}.
* @return will never be {@literal null}.
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013 the original author or authors.
* Copyright 2013-2018 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.
@@ -23,7 +23,7 @@ import org.springframework.util.StringUtils;
*/
public class SimpleRelProvider implements RelProvider {
/*
/*
* (non-Javadoc)
* @see org.springframework.plugin.core.Plugin#supports(java.lang.Object)
*/
@@ -32,7 +32,7 @@ public class SimpleRelProvider implements RelProvider {
return true;
}
/*
/*
* (non-Javadoc)
* @see org.springframework.hateoas.RelProvider#getItemResourceRelFor(java.lang.Class)
*/
@@ -43,7 +43,7 @@ public class SimpleRelProvider implements RelProvider {
return String.format("%s.%s", collectionRel, collectionRel);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.hateoas.RelProvider#getCollectionResourceRelFor(java.lang.Class)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2018 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.
@@ -37,7 +37,7 @@ import org.springframework.util.MultiValueMap;
/**
* {@link RepositoryInvokerFactory} that wraps the {@link RepositoryInvokerFactory} returned by the delegate with one
* that automatically unwraps JDK 8 {@link Optional} and Guava {@link com.google.common.base.Optional}s.
*
*
* @author Oliver Gierke
*/
public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFactory {
@@ -59,7 +59,7 @@ public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFact
this.lookups = Java8PluginRegistry.of(lookups);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.repository.support.RepositoryInvokerFactory#getInvokerFor(java.lang.Class)
*/
@@ -74,7 +74,7 @@ public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFact
/**
* {@link RepositoryInvoker} that post-processes invocations of {@link RepositoryInvoker#invokeFindOne(Serializable)}
* and {@link #invokeQueryMethod(Method, MultiValueMap, Pageable, Sort)} using the given {@link Converter}s.
*
*
* @author Oliver Gierke
*/
@RequiredArgsConstructor
@@ -97,7 +97,7 @@ public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFact
return Optionals.firstNonEmpty(viaLookup, fallback);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.repository.support.RepositoryInvoker#invokeQueryMethod(java.lang.reflect.Method, org.springframework.util.MultiValueMap, org.springframework.data.domain.Pageable, org.springframework.data.domain.Sort)
*/
@@ -107,7 +107,7 @@ public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFact
return delegate.invokeQueryMethod(method, parameters, pageable, sort);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.repository.support.RepositoryInvocationInformation#hasDeleteMethod()
*/
@@ -116,7 +116,7 @@ public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFact
return delegate.hasDeleteMethod();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.repository.support.RepositoryInvocationInformation#hasFindAllMethod()
*/
@@ -125,7 +125,7 @@ public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFact
return delegate.hasFindAllMethod();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.repository.support.RepositoryInvocationInformation#hasFindOneMethod()
*/
@@ -134,7 +134,7 @@ public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFact
return delegate.hasFindOneMethod();
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.repository.support.RepositoryInvocationInformation#hasSaveMethod()
*/
@@ -152,7 +152,7 @@ public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFact
delegate.invokeDeleteById(id);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.repository.support.RepositoryInvoker#invokeFindAll(org.springframework.data.domain.Pageable)
*/
@@ -161,7 +161,7 @@ public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFact
return delegate.invokeFindAll(pageable);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.repository.support.RepositoryInvoker#invokeFindAll(org.springframework.data.domain.Sort)
*/
@@ -170,7 +170,7 @@ public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFact
return delegate.invokeFindAll(sort);
}
/*
/*
* (non-Javadoc)
* @see org.springframework.data.repository.support.RepositoryInvoker#invokeSave(java.lang.Object)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017 the original author or authors.
* Copyright 2017-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013 the original author or authors.
* Copyright 2013-2018 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.
@@ -26,14 +26,14 @@ import org.springframework.util.MultiValueMap;
/**
* Helper methods to work with {@link Map}s.
*
*
* @author Oliver Gierke
*/
public interface MapUtils {
/**
* Turns a {@link MultiValueMap} into its {@link Map} equivalent.
*
*
* @param map must not be {@literal null}.
* @return
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2018 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.
@@ -26,7 +26,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* Base class for integration tests loading {@link RepositoryTestsConfig} and populating the {@link PersonRepository}
* with a {@link Person}.
*
*
* @author Oliver Gierke
*/
@RunWith(SpringJUnit4ClassRunner.class)

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2017 the original author or authors.
* Copyright 2013-2018 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.
@@ -21,7 +21,7 @@ import org.junit.Test;
/**
* Unit tests for {@link Path}.
*
*
* @author Oliver Gierke
*/
public class PathUnitTests {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 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.
@@ -25,7 +25,7 @@ import org.springframework.data.rest.core.domain.ConfiguredPersonRepository;
/**
* Tests to check that {@link ResourceMapping}s are handled correctly.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2017 the original author or authors.
* Copyright 2015-2018 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,7 +34,7 @@ import org.springframework.web.cors.CorsConfiguration;
/**
* Unit tests for {@link RepositoryRestConfiguration}.
*
*
* @author Oliver Gierke
* @author Mark Paluch
* @soundtrack Adam F - Circles (Colors)

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2017 the original author or authors.
* Copyright 2015-2018 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.util.Streamable;
/**
* Unit tests for {@link UriToEntityConverter}.
*
*
* @author Oliver Gierke
*/
@RunWith(MockitoJUnitRunner.class)

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2017 original author or authors.
* Copyright 2016-2018 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.validation.Errors;
/**
* Unit tests for {@link ValidationErrors}.
*
*
* @author Oliver Gierke
*/
public class ValidationErrorsUnitTests {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2017 the original author or authors.
* Copyright 2014-2018 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.rest.core.config.ProjectionDefinitionConfigurati
/**
* Unit tests for {@link ProjectionDefinitionConfiguration}.
*
*
* @author Oliver Gierke
*/
public class ProjectionDefinitionConfigurationUnitTests {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.
@@ -32,7 +32,7 @@ import org.springframework.hateoas.core.EvoInflectorRelProvider;
/**
* Ensure the {@link ResourceMapping} components convey the correct information.
*
*
* @author Jon Brisbin
*/
@SuppressWarnings("deprecation")

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2017 the original author or authors.
* Copyright 2014-2018 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.
@@ -45,7 +45,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* Tests around the {@link org.springframework.context.ApplicationEvent} handling abstractions.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.
@@ -37,7 +37,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* Tests to check the {@link org.springframework.validation.Validator} integration.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.rest.core.annotation.RepositoryEventHandler;
/**
* Sample annotation-based event handler.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.
@@ -21,7 +21,7 @@ import org.springframework.data.rest.core.annotation.RestResource;
/**
* A repository to manage {@link org.springframework.data.rest.core.domain.Person}s.
*
*
* @author Jon Brisbin
*/
@RestResource(rel = "people", exported = false)

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2018 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.
@@ -25,7 +25,7 @@ import org.springframework.data.repository.CrudRepository;
*/
public interface OrderRepository extends CrudRepository<Order, UUID> {
/*
/*
* (non-Javadoc)
* @see org.springframework.data.repository.CrudRepository#save(java.lang.Object)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2018 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.rest.core.annotation.RestResource;
/**
* An entity that represents a person.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 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.
@@ -27,7 +27,7 @@ import org.springframework.data.rest.core.annotation.RestResource;
/**
* A repository to manage {@link Person}s.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.
@@ -20,7 +20,7 @@ import org.springframework.data.repository.NoRepositoryBean;
/**
* A repository to manage {@link Person}s.
*
*
* @author Jon Brisbin
*/
@NoRepositoryBean

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 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.
@@ -21,7 +21,7 @@ import org.springframework.data.repository.CrudRepository;
/**
* Repository for managing {@link Profile}s.
*
*
* @author Jon Brisbin
* @author Oliver Gierke
*/

Some files were not shown because too many files have changed in this diff Show More