15 Commits

Author SHA1 Message Date
Oliver Gierke
bdc9d9be2b DATACMNS-679 - Updated Sonargraph architecture description. 2015-04-13 13:07:34 +02:00
Oliver Gierke
1f71a28408 DATACMNS-525 - Polishing.
Extracted KeySpaceUtils from KeyValueTemplate and pulled in the copy of MetaAnnotationUtils to hide it from the outside. Separated related test cases into dedicated test class.

Renamed BasicMappingContext to KeyValueMappingContext and BasicPersistentProperty to KeyValuePersistentProperty. Fixed spelling in SpelQueryCreatorUnitTests.

Moved MappingContext into separate package to satisfy architectural guidelines. Created dedicated KeyValueRepositoryNamespaceHandler to avoid a circular reference between commons and the key-value subsystem.

Made the query creator type an annotation on @EnableKeyValueRepositories so that it's not exposed to the user to be configured. Added the necessary ImportBeanDefinitionRegistrars to the Hazelcast and EhCache implementation. Removed @since tags from those modules at they're not going to make it into Spring Data Commons. Renamed EnableEhCacheRepsotoriesUnitTests to EnableEhCacheRepositoriesIntegrationTests as well as the same for the Hazelcast specific test.

The KeyValueRepositoryConfigurationExtension now explicitly registers a KeyValueMappingContext unless one is already registered. AnnotationRepositoryConfigurationSource now explicitly exposes an AnnotationMetadata instance for the annotation that triggered the configuration.

Turned SpelCriteriaAccessor and SpelPropertyComparator into classes to be able to pass them a SpelExpressionParser to be able to get rid of SpelExpressionFactory eventually. Made both classes as well as SpelQueryEngine package protected for now.

Moved repository implementations into support package. Updated architcture description JavaDoc polish, spacing, blank lines. Added TODOs.

Original pull request: #95.
2014-11-26 16:47:01 +01:00
Oliver Gierke
756c951112 DATACMNS-557 - Polishing.
Renamed CdiRepositoryConfigurationSource to CdiRepositoryConfiguration. Turned anonymous inner default implementation into dedicated enum to avoid repeated instantiation.

Changed the CdiRepositoryBean to rather take a Bean instance of the custom implementation instead of the resolved object to make sure both instances (the custom implementation and the repository proxy) are instantiated at the same time.

Fixed imports. Some early returns to avoid unnecessary nesting.

Adapted architecture description to allow CDI module accessing the configuration module.

Related pull request: #92.
2014-08-07 12:33:29 +02:00
Oliver Gierke
de1e9ac684 DATACMNS-475 - Added configuration class to auto-register GeoModule.
Added a JavaConfig class to declare a Spring bean for the newly introduced GeoModule. 

@EnableSpringDataWebSupport automatically registers this config class in case Jackson is on the classpath. This comes in handy in combination with Spring Boot which auto-registers all global Module beans with all global ObjectMappers.
2014-03-21 14:28:19 +01:00
Oliver Gierke
e9bcca11be DATACMNS-365 - Enhanced auditing subsystem to work with accessor annotations.
Added a MappingAuditableBeanWrapperFactory to be able to use themapping metamodel to lookup annotations on persistent properties. This propagates into AuditingHandler and IsNewAwareAuditingHandler getting new constructors taking a MappingContext to set themselves up correctly. This will probably need store specific updates in the setup of the auditing infrastructure for namespace implementations and annotation based JavaConfig.

Introduced ….getPersistentProperty(Class<? extends Annotation> annotationType) on PersistentEntity to be able to access properties with a given annotation.

Updated SonarGraph architecture description and moved auditing related config classes into auditing.config package.
2014-03-18 19:56:45 +01:00
Oliver Gierke
92a22182f1 DATACMNS-418 - PagedResourcesAssembler now adds self links to PagedResources.
PagedResourcesAssembler now adds a LinkTemplate to every PagedResources instance created and pulls the template variable information from the registered resolvers for Pageable and Sort.

Extended PageableResourceAssemblerArgumentResolver to create a special MethodParameterAwarePagedResourcesAssembler so that the assembler will take qualifier information into account when being injected into controller methods.

Upgraded to Spring HATEOAS 0.9.0.BUILD-SNAPSHOT to be able to benefit from new methods added to MethodParameters as well as the LinkTemplate class. Updated Sonargraph architecture definition to allow the web layer to access logging.
2014-01-16 14:31:55 +01:00
Oliver Gierke
c0fc0f905a DATACMNS-401 - Some cleanups regarding generics and deprecations.
Suppress deprecation warnings for GenericTypeResolver for now. Added Simple(Property|Association)Handler to ease working with untyped PersistentProperty instances without having to fall back to raw types. Polished Sonargraph architecture description.
2013-11-14 09:28:11 +00:00
Oliver Gierke
634789c3b7 DATACMNS-344 - Allow Repositories to work with non-CrudRepositories.
Introduced CrudMethods abstraction obtainable via a RepositoryInformation to inspect a repository for the presence of individual CRUD methods. The default implementation favors more special methods (e.g. the findAll(Pageable) over a simple findAll()). Introduced a CrudInvoker to be able to easily invoke findOne(…) and save(…) independently of whether the target methods are declared explicitly or inherited from CrudRepository.

Fixed some test case names to make sure they're executed during the Maven build.
2013-07-15 15:02:32 +02:00
Oliver Gierke
16c3c15204 DATACMNS-330, DATACMNS-331 - Improved web configuration support.
Updated backing implementation of @EnableSpringDataWebSupport to use WebMvcConfigurerAdapter instead of WebMvcConfigurationSupport as the latter is a very custom beast in terms of configuration. Let the Spring HATEOAS specific configuration class extend the default one to register additional components. The default one accesses the FormattingConversionService through a qualified autowiring. It issues a warning in case none has been configured and asks the user to enable Spring MVC.

Updated Sonargraph architecture description to allow logging from web config layer.
2013-05-21 17:10:13 +02:00
Oliver Gierke
a93c2bff94 DATACMNS-330, DATACMNS-331 - Advanced web integration.
Added PagedResourcesAssembler to easily convert Page instances into a PagedResource instance and automatically build the required previous/next links based on the PageableHandlerMethodArgumentResolver present in the MVC configuration. The assembler can either be injected into a Spring MVC controller or a controller method. The latter will then assume the controller methods URI to be used as pagination link base.

Added @EnableSpringDataWebSupport to automatically register HandlerMethodArgumentResolvers for Pageable and Sort as well as a DomainClassConverter that will allow the usage of domain types being managed by Spring Data repositories in controller method signatures. In case Spring HATEOAS is present on the classpath, we'll also register a PagedResourcesAssembler for injection as well as the appropriate HandlerMethodArgumentResolver for injection into controller methods.

Adapted Sonargraph configuration accordingly. Upgraded to Spring HATEOAS 0.6.0.BUILD-SNAPSHOT.
2013-05-15 16:03:46 +02:00
Oliver Gierke
f18055a4c9 DATACMNS-274 - Fixed package cycle in mapping subsystem.
Updated Sonargraph architecture description along the way.
2013-01-29 10:50:50 +01:00
Oliver Gierke
35d96afac6 DATACMNS-212 - Sonargraph checks and improvements.
Merged mapping.context and mapping.event packages. Moved MappingContext event into context package. Updated Sonargraph architecture description and completed package and dependency mapping.
2012-08-13 14:26:40 +02:00
Oliver Gierke
a31046f634 Updated Sonargraph architecture description.
Introduced Conversion layer with allowed dependencies to Mapping and Core. Added Authentication subsystem to Core layer. Adapted mapping of Cross-store subsystem according to new package name.
2011-10-12 14:50:17 +02:00
Oliver Gierke
4e27cce691 DATACMNS-84 - Improved infrastructure to access PersistentProperty paths.
Refactored MappingContext.getPersistentPropertyPath(…) to return a PersistentPropertyPath instance which allows iterating over the properties returned for the Property delivered as well as creating dot paths from it.

Renamed Property to PropertyPath and moved it into mapping package.
2011-10-07 11:36:20 +02:00
Oliver Gierke
b97447bce8 Added Sonargraph architecture description. 2011-09-14 17:56:27 +02:00