Commit Graph

159 Commits

Author SHA1 Message Date
Subhashni Balakrishnan
076dcc0219 DATACOUCH-389 - Update to Couchbase-Java-Client 2.6.0
Added the new committed environment configurables to the xml based
configuration parser info. Also added couchbase FLE encryption library as bean
instantiation introspects class methods and fails with ClassNotFound
exception.

Original Pull Request: #165.
2018-07-16 10:25:56 -07:00
Oliver Gierke
ed6820e3a4 DATACOUCH-390 - Adapt API changes for immutable entity support.
Related tickets: DATACMNS-1322.
2018-07-12 16:26:03 +02:00
Oliver Gierke
3713181083 DATACOUCH-379 - Adapt to SpEL extension API changes in Spring Data Commons.
Related tickets: DATACMNS-1260.
2018-05-15 10:00:45 +02:00
Oliver Gierke
b18761b409 DATACOUCH-373 - Adapt to API changes in Spring Data Commons.
Related tickets: DATACMNS-1275.
2018-04-09 14:56:27 +02:00
Mark Paluch
a46f8160a9 DATACOUCH-368 - Export composable repositories via CDI.
We now export composable repositories through our CDI extension. Repositories can now be customized either by a single custom implementation (as it was before) and by providing fragment interfaces along their fragment implementation.

This change aligns CDI support with the existing RepositoryFactory support we provide within a Spring application context.
2018-03-12 16:55:30 +01:00
Subhashni Balakrishnan
0960f11a9c DATACOUCH-322 - Add RBAC username and password support
Motivation
----------
Couchbase server 5.0 allows role based access control and this allows
for users to be created and granted access to use bucket. Expose this
feature in SDC.

Changes
-------
1. Couchbase configurations allow for user name to be set. The user password
property is still retrieved from bucket password property.
2. CouchbaseFactoryBean has additional constructor for the username
property.
3. Couchbase bucket schema for xml configurations also includes username
property.
4. Integration tests have been restructured majorly to accomadate for
username
    - Testcontainers are used to allow for container based testing.
    - Container based testing is optional, it can be configured using
      resources/server.properties

Results
-------
The RBAC change has been tested with pre 5.0 and 5.0+ versions using
containers. The tests pass.

Original pull request: #158.
2018-03-07 15:09:15 -08:00
Subhashni Balakrishnan
039e106032 DATACOUCH-362 - Use dynamic proxying
Dynamic proxying for couchbase environment instead of an explicit no shutdown
proxy.

Original pull request: #157.

DATACOUCH-363 - Upgrade to 2.5.5

Java client upgrade. Remove the dcpEnabled property from
CouchbaseEnvironment factory bean and parser.

Original pull request: #157.
2018-03-07 13:26:55 -08:00
Mark Paluch
e8c647fb9d DATACOUCH-350 - Polishing.
Add test to verify configuration extension. Fix reactive module name to match non-reactive module name. Add author tags. Reorder methods, add javadoc comments.

Original pull request: #153.
2017-11-25 11:08:51 +01:00
Alex Derkach
322642515a DATACOUCH-350 - Consider repository type in configuration extensions.
We now check in configuration extensions whether the extension is capable to implement the repository by considering whether a repository is a reactive one. This prevents the non-reactive extension from implementing reactive repositories and vice versa.

Original pull request: #153.
2017-11-25 11:07:13 +01:00
Ben Benoit
4908749bcd DATACOUCH-328 - Fix document expiry when using expressions
When using an expiry expression with TimeUnit.DAYS larger than 30 days
the document expiry is not correctly set.

Original pull request: #150.
2017-10-17 11:34:12 -07:00
Oliver Gierke
5f24502175 DATACOUCH-330 - Improved detectability of Couchbase repositories in strict configuration mode.
We now make sure that repositories for domain types annotated with @Document or extending CouchbaseRepository are considered strict repository candidates.
2017-08-28 11:24:48 +02:00
MLabusquiere
761c08517b DATACOUCH-329 - Save repo return with the generated id
Original pull request: #151.
2017-08-24 13:49:00 -07:00
Mark Paluch
9218b09f26 DATACOUCH-320 - Adapt to API changes in mapping subsystem. 2017-07-04 14:37:18 +02:00
Christoph Strobl
0786cda78d DATACOUCH-314 - Adopt to ReactiveCrudRepository.deleteById(Publisher).
Related ticket: DATACMNS-1063.

Original Pull Request: #147
2017-06-13 19:56:55 +02:00
Mark Paluch
55832cfa21 DATACOUCH-314 - Adopt to ReactiveCrudRepository.findById(Publisher) and existsById(Publisher).
Related ticket: DATACMNS-1063.

Original Pull Request: #147
2017-06-13 19:56:15 +02:00
Subhashni Balakrishnan
047921956b DATACOUCH-309 Convert IDs as well if custom conversions are available in Simple Repository
Original pull request: #146.
2017-06-12 17:26:45 -07:00
Subhashni Balakrishnan
c7e4801305 DATACOUCH-310 - Convert N1ql query parameter enums to string values
Original pull request: #148.
2017-06-12 17:24:11 -07:00
Subhashni Balakrishnan
70343b0ac1 DATACOUCH-296 Add support for delete n1ql queries
Changes to support delete query by query derivation and SpEL based
queries.
- Adds a N1qlMutateQueryCreator which constucts the delete query
using dsl.
- Adds new SpEL values delete and returning required for delete
queries.

Original pull request: #144.
2017-06-12 17:22:53 -07:00
Mark Paluch
9758ad9802 DATACOUCH-311 - Upgrade to Reactor 3.1 M2.
Adopt to API change from Publisher.subscribe() to Publisher.toProcessor().
2017-06-01 10:01:39 +02:00
Oliver Gierke
22205678ef DATACOUCH-305 - Adapt to API changes in repository interfaces. 2017-05-03 17:48:06 +02:00
Mark Paluch
78bfd771b1 DATACOUCH-304 - Remove support for JodaTime's deprecated DateMidnight.
Related ticket: DATACMNS-1014.
2017-05-03 10:08:07 +02:00
Subhashni Balakrishnan
fc88b82328 DATACOUCH-147 - Allow to convert Date to ISO-8601 compliant strings
instead of long

Using the system property
org.springframework.data.couchbase.useISOStringConverterForDate the
conversion can be enabled so this doesn't break backward compatibility

Original pull request: #143.
2017-05-01 14:11:55 -07:00
Mark Paluch
e273152013 DATACOUCH-293 - Adopt SimpleReactiveCouchbaseRepository.findOne(…) to Reactor 3.1.
Adapt to API changes, missed this one in the previous change.

Related ticket: spring-projects/spring-data-build#333
2017-04-26 17:14:17 +02:00
Mark Paluch
19f7597dc0 DATACOUCH-302 - Adapt to moved CustomConversions to Spring Data Commons.
Introduce CassandraCustomConversions extending o.s.d.convert.CustomConversions.

Remove o.s.d.couchbase.core.convert.CouchbaseCustomConversions implementation and utility classes, extend CouchbaseCustomConversions. Replace references to o.s.d.c.c.c.CustomConversions with o.s.d.convert.CustomConversions. Adapt tests and MappingCouchbaseConverter to CouchbaseCustomConversions.

Related ticket: DATACMNS-1035.
2017-04-24 10:20:32 +02:00
Subhashni Balakrishnan
069ceea65c DATACOUCH-275 Key auto generation using Attributes, UUID
Original pull request: #142.
2017-04-12 14:38:21 -07:00
Mark Paluch
766e4eeebd DATACOUCH-293 - Polishing.
Replace references to Assert single-arg methods with references to methods accepting the test object and message.
2017-04-12 15:04:01 +02:00
Mark Paluch
3ecc2cf6cb DATACOUCH-293 - Adapt to API changes in Reactor 3.1.
Related ticket: spring-projects/spring-data-build#333
2017-04-12 15:02:54 +02:00
Subhashni Balakrishnan
03bb6372c7 DATACOUCH-276 Dont escape the order by property as a whole
Escape each nested level and concatenate with a period

Original pull request: #141.
2017-04-11 16:17:13 -07:00
Subhashni Balakrishnan
620586af3b DATACOUCH-90 Polishing
Add modified couchbase specific jsr310 converters which converts to
number formats instead of date objects which cannot be handled by the
client.

Original pull request: #139.
2017-04-11 16:17:13 -07:00
Subhashni Balakrishnan
de4e02cedb DATACOUCH-90 - Add commons Jsr310 converters to support Java 8 date/time
Original pull request: #139.
2017-04-10 11:50:15 -07:00
Subhashni Balakrishnan
4cca923c59 DATACOUCH-290 - Upgrade to java-client 2.4.4
Original pull request: #136.
2017-04-10 11:33:02 -07:00
Alexander Derkach
6429dca5e6 DATACOUCH-287 - Add CAS operations to RxJavaCouchbaseOperations.
Original pull request: #135.
2017-04-06 06:57:53 -07:00
Mark Paluch
dc0f552841 DATACOUCH-289 - Adapt to API changes in RepositoryConfigurationExtensionSupport. 2017-03-27 09:41:19 +02:00
Mark Paluch
439ab14131 DATACOUCH-273 - Adapt to API changes in Spring Data Commons. 2017-03-24 09:57:13 +01:00
Mark Paluch
141dbefd3d DATACOUCH-273 - Integrate Data Commons Java 8 upgrade branch.
Replace PersistentEntity.doWithProperties(…) and .doWithAssociations(…) with stream processing using PersistentEntity.getPersistentProperties() and PersistentEntity.getAssociations().
2017-03-24 09:57:13 +01:00
Subhashni Balakrishnan
1c33ccc4c8 DATACOUCH-279 - Re-add AbstractCouchbaseDataConfiguration
Motivation
----------
AbstractCouchbaseDataConfiguration was removed and
AbstractCouchbaseConfiguration was made the only configuration support
which implemented CouchbaseConfigurer. This broke integration with
Spring boot as they used CouchbaseConfigurer to auto configure client
initialization properties.

Changes
-------
Bring back support for AbstractCouchbaseDataConfiguration which allows the use
of CouchbaseConfigurer. Also added a similar configuration support for reactive
data repositories. Common beans between reactive and blocking are implemented
in CouchbaseConfigurationSupport class. The existing tests in
AbstractCouchbaseDataConfigurationTest does test this scenario. However the
previous commit had also changed the test because of the unawareness of spring
boot integration.

Results
-------
It is now possible to configure SDC with CouchbaseConfigurer instead of
only having to extend from AbstractCouchbaseConfiguration.
2017-02-07 10:15:00 +01:00
Subhashni Balakrishnan
5d36ecc12b DATACOUCH-265 - Support pageable and sort for String based SpEL queries
Original pull request: #128.
2017-02-05 13:08:38 -08:00
Subhashni Balakrishnan
162d8124ab DATACOUCH-260 - Update to 2.4.1 and fix tests
Adapted changes to 3.0 branch

Original pull request: #131.
2017-02-05 13:08:38 -08:00
Subhashni Balakrishnan
d9510dc158 DATACOUCH-146 - Use only last emission to create a Mono for delete collection
Original pull request: #130.
2017-02-05 10:35:11 -08:00
Subhashni Balakrishnan
d62f4bbe8c DATACOUCH-146 - Reactive repositories support
- Adds experimental support for reactor types in reactive CRUD and Sorting
  repositories using RxJava1Template
- Refactor configuration and query classes to be reusable by reactive repositories

Original pull request: #130.
2017-02-05 10:34:57 -08:00
Mark Paluch
56b3842ac1 DATACOUCH-274 - Remove references to Assert single-arg methods.
Replace references to Assert single-arg methods with references to methods accepting the test object and message.

Related ticket: SPR-15196.
2017-02-01 13:14:35 +01:00
Subhashni Balakrishnan
b52dee3a3c DATACOUCH-251 - Wrap base where criteria with parenthesis for OR expressions.
Base criteria for the query should be wrapped before adding the entity filter criteria so the priority of filtering is clear.
2016-12-20 10:57:47 +01:00
Oliver Gierke
ce8dd97d66 DATACOUCH-262 - Adapt API in CouchbaseRepositoryFactoryBean.
Related ticket: DATACMNS-891.
2016-12-15 16:21:27 +01:00
Oliver Gierke
610a6e51d2 DATACOUCH-246 - Polishing.
Removed the dynamic return type obtained from the ResultProcessor held in a query implementation field as this breaks thread safety. We now hand the type to read into the execution methods.

Adapted test cases accordingly and removed a bit of mocking.

Original pull request: #122.
2016-12-02 18:04:15 +01:00
Subhashni Balakrishnan
ce356f827f DATACOUCH-246 - Projections support for query derivation.
Used the result processor projecting information to just fetch the selected fields and again to post process results to projection object/interfaces.

Added test for projection using DTO.

Original pull request: #122.
2016-12-02 18:04:12 +01:00
Young-Gu Chae
73f86a70ec DATACOUCH-243 - CouchbaseTemplate.doRemove() handle exceptions like doPersist() 2016-08-29 10:11:28 +02:00
Andrey Rubtsov
341c41250d DATACOUCH-239 - Allow configurable expiry in @Document.
Fixes #120
2016-08-18 13:21:14 +02:00
markramach
f18f61e371 DATACOUCH-237 - Prevent groupby on generated count queries
Fixes #119
2016-07-07 11:05:51 +02:00
Simon Bland
a40919ef8e DATACOUCH-235 - Fixed multiple Couchbase environments.
Defining <couchbase:env/> in XML configuration was causing a double
instantiation of DefaultCoreEnvironment, with subsequent warning in
logs:

[main] WARN c.c.client.core.env.CoreEnvironment - More than 1 Couchbase
Environments found (2), this can have severe impact on performance and
stability. Reuse environments!
2016-06-17 15:57:51 +02:00
Simon Baslé
d6b63c305a DATACOUCH-227 - Keep isOrderRetained view param, bump to SDK 2.2.8 2016-06-13 16:28:50 +02:00