org.apache.sling.nosql.generic.resource.impl

## Class NoSqlResourceProvider

- java.lang.Object
- - org.apache.sling.nosql.generic.resource.impl.NoSqlResourceProvider

All Implemented Interfaces:
  org.apache.sling.api.resource.ModifyingResourceProvider, org.apache.sling.api.resource.QueriableResourceProvider, org.apache.sling.api.resource.ResourceProvider

    public class NoSqlResourceProvider
    extends Object
    implements org.apache.sling.api.resource.ResourceProvider, org.apache.sling.api.resource.ModifyingResourceProvider, org.apache.sling.api.resource.QueriableResourceProvider

Generic implementation of a NoSQL resource provider. The mapping to the NoSQL database implementation details is done via the provided `NoSqlAdapter`.

### Field Summary

### Fields inherited from interface org.apache.sling.api.resource.QueriableResourceProvider

`LANGUAGES`

### Fields inherited from interface org.apache.sling.api.resource.ResourceProvider

`OWNS_ROOTS, RESOURCE_TYPE_SYNTHETIC, ROOTS, SERVICE_NAME, USE_RESOURCE_ACCESS_SECURITY`

### Constructor Summary

Constructors
Constructor and Description
`NoSqlResourceProvider(NoSqlAdapter adapter, org.osgi.service.event.EventAdmin eventAdmin)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `commit(org.apache.sling.api.resource.ResourceResolver resolver)`
`org.apache.sling.api.resource.Resource` `create(org.apache.sling.api.resource.ResourceResolver resolver, String path, Map<String,Object> properties)`
`void` `delete(org.apache.sling.api.resource.ResourceResolver resolver, String path)`
`Iterator<org.apache.sling.api.resource.Resource>` `findResources(org.apache.sling.api.resource.ResourceResolver resolver, String query, String language)`
`org.apache.sling.api.resource.Resource` `getResource(org.apache.sling.api.resource.ResourceResolver resourceResolver, javax.servlet.http.HttpServletRequest request, String path)`
`org.apache.sling.api.resource.Resource` `getResource(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path)`
`boolean` `hasChanges(org.apache.sling.api.resource.ResourceResolver resolver)`
`Iterator<org.apache.sling.api.resource.Resource>` `listChildren(org.apache.sling.api.resource.Resource parent)`
`Iterator<org.apache.sling.api.resource.ValueMap>` `queryResources(org.apache.sling.api.resource.ResourceResolver resolver, String query, String language)`
`void` `revert(org.apache.sling.api.resource.ResourceResolver resolver)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### NoSqlResourceProvider

    public NoSqlResourceProvider(NoSqlAdapter adapter,
                                 org.osgi.service.event.EventAdmin eventAdmin)

### Method Detail

#### getResource

    public org.apache.sling.api.resource.Resource getResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                                                              String path)

Specified by:
  `getResource` in interface `org.apache.sling.api.resource.ResourceProvider`

#### getResource

    public org.apache.sling.api.resource.Resource getResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                                                              javax.servlet.http.HttpServletRequest request,
                                                              String path)

Specified by:
  `getResource` in interface `org.apache.sling.api.resource.ResourceProvider`

#### listChildren

    public Iterator<org.apache.sling.api.resource.Resource> listChildren(org.apache.sling.api.resource.Resource parent)

Specified by:
  `listChildren` in interface `org.apache.sling.api.resource.ResourceProvider`

#### create

    public org.apache.sling.api.resource.Resource create(org.apache.sling.api.resource.ResourceResolver resolver,
                                                         String path,
                                                         Map<String,Object> properties)
                                                  throws org.apache.sling.api.resource.PersistenceException

Specified by:
  `create` in interface `org.apache.sling.api.resource.ModifyingResourceProvider`
Throws:
  `org.apache.sling.api.resource.PersistenceException`

#### delete

    public void delete(org.apache.sling.api.resource.ResourceResolver resolver,
                       String path)
                throws org.apache.sling.api.resource.PersistenceException

Specified by:
  `delete` in interface `org.apache.sling.api.resource.ModifyingResourceProvider`
Throws:
  `org.apache.sling.api.resource.PersistenceException`

#### revert

    public void revert(org.apache.sling.api.resource.ResourceResolver resolver)

Specified by:
  `revert` in interface `org.apache.sling.api.resource.ModifyingResourceProvider`

#### commit

    public void commit(org.apache.sling.api.resource.ResourceResolver resolver)
                throws org.apache.sling.api.resource.PersistenceException

Specified by:
  `commit` in interface `org.apache.sling.api.resource.ModifyingResourceProvider`
Throws:
  `org.apache.sling.api.resource.PersistenceException`

#### hasChanges

    public boolean hasChanges(org.apache.sling.api.resource.ResourceResolver resolver)

Specified by:
  `hasChanges` in interface `org.apache.sling.api.resource.ModifyingResourceProvider`

#### findResources

    public Iterator<org.apache.sling.api.resource.Resource> findResources(org.apache.sling.api.resource.ResourceResolver resolver,
                                                                          String query,
                                                                          String language)

Specified by:
  `findResources` in interface `org.apache.sling.api.resource.QueriableResourceProvider`

#### queryResources

    public Iterator<org.apache.sling.api.resource.ValueMap> queryResources(org.apache.sling.api.resource.ResourceResolver resolver,
                                                                           String query,
                                                                           String language)

Specified by:
  `queryResources` in interface `org.apache.sling.api.resource.QueriableResourceProvider`