add missing license headers

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1687711 13f79535-47bb-0310-9956-ffa450edef68
4 files changed
tree: 00c1509fafa6bf4997872a3f3bfb599aeb956ec4
  1. src/
  2. pom.xml
  3. README.md
README.md

Apache Sling NoSQL Couchbase Resource Provider

Sling ResourceProvider implementation that uses Couchbase NoSQL database as persistence.

Based on the “Apache Sling NoSQL Generic Resource Provider” and “Apache Sling NoSQL Couchbase Client”.

Configuration on deployment

  • To use the resource provider you have to to create a factory configuration for “Apache Sling NoSQL Couchbase Client” with clientId = ´sling-resourceprovider-couchbase´ and propert couchbase host and bucket configuration.
  • Additionally a factory configuration for “Apache Sling NoSQL Couchbase Resource Provider Factory” defines the root of the resource tree that should be stored in Couchbase

Couchbase Views for path-based access

For list and delete operations two couchbase views have to be defined and published in the bucket that is used by the resource provider.

Steps to create those views:

  • Log into Couchbase Console
  • Go to “Views” and select the correct bucket
  • Add a new design document via “Create Development View” and name it “_design/dev_resourceIndex” (the prefix “_design/dev_” is added automatically)
  • Use the name “ancestorPath” for the first view that is created together with the design document
  • Paste the view code from ancestorPath.js into the editor and save it
  • Create another view named “parentPath”, paste the view code from parentPath.js and save it
  • Publish the design document so the views are production views

Run integration tests

To run the integration tests you have to set up a real couchbase server and run the tests with this command line (inserting the correct parameters for couchbase host and bucket):

mvn -Pcouchbase-integration-test -DcouchbaseHosts=localhost:8091 -DbucketName=test integration-test