Package org.apache.sling.distribution.resources.impl.common

## Class AbstractModifyingResourceProvider

- java.lang.Object
- - org.apache.sling.distribution.resources.impl.common.AbstractReadableResourceProvider
  - - org.apache.sling.distribution.resources.impl.common.AbstractModifyingResourceProvider

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

    public abstract class AbstractModifyingResourceProvider
    extends AbstractReadableResourceProvider
    implements org.apache.sling.api.resource.ModifyingResourceProvider

a modifying `ResourceProvider` for distribution.

### Field Summary

### Fields inherited from class org.apache.sling.distribution.resources.impl.common.AbstractReadableResourceProvider

`INTERNAL_ADAPTABLE, INTERNAL_ITEMS_ITERATOR, INTERNAL_NAME, ITEMS, SLING_RESOURCE_TYPE`

### 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
`protected` `AbstractModifyingResourceProvider​(String resourceRoot)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `change​(org.apache.sling.api.resource.ResourceResolver resourceResolver, String requestPath, Map<String,​Object> properties)`
`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 requestPath)`
`protected Map<String,​Object>` `getResourceProperties​(org.apache.sling.api.resource.ResourceResolver resolver, SimplePathInfo pathInfo)`
`boolean` `hasChanges​(org.apache.sling.api.resource.ResourceResolver resolver)`
`void` `revert​(org.apache.sling.api.resource.ResourceResolver resolver)`
`protected abstract void` `saveInternalResources​(org.apache.sling.api.resource.ResourceResolver resourceResolver, Map<String,​Map<String,​Object>> changedResources, Set<String> deletedResources)`

### Methods inherited from class org.apache.sling.distribution.resources.impl.common.AbstractReadableResourceProvider

`getInternalResourceChildren, getInternalResourceProperties, getResource, getResource, listChildren`

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

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

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

`getResource, getResource, listChildren`

### Constructor Detail

#### AbstractModifyingResourceProvider

    protected AbstractModifyingResourceProvider​(String resourceRoot)

### Method Detail

#### 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 requestPath)
                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`

#### change

    public void change​(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                       String requestPath,
                       Map<String,​Object> properties)

#### getResourceProperties

    protected Map<String,​Object> getResourceProperties​(org.apache.sling.api.resource.ResourceResolver resolver,
                                                             SimplePathInfo pathInfo)

#### saveInternalResources

    protected abstract void saveInternalResources​(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                                                  Map<String,​Map<String,​Object>> changedResources,
                                                  Set<String> deletedResources)
                                           throws org.apache.sling.api.resource.PersistenceException

Throws:
  `org.apache.sling.api.resource.PersistenceException`