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.
  • Constructor Details

    • AbstractModifyingResourceProvider

      protected AbstractModifyingResourceProvider(String resourceRoot)
  • Method Details

    • 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