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_TYPEFields inherited from interface org.apache.sling.api.resource.ResourceProvider
OWNS_ROOTS, RESOURCE_TYPE_SYNTHETIC, ROOTS, SERVICE_NAME, USE_RESOURCE_ACCESS_SECURITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchange(org.apache.sling.api.resource.ResourceResolver resourceResolver, String requestPath, Map<String, Object> properties) voidcommit(org.apache.sling.api.resource.ResourceResolver resolver) org.apache.sling.api.resource.Resourcecreate(org.apache.sling.api.resource.ResourceResolver resolver, String path, Map<String, Object> properties) voidgetResourceProperties(org.apache.sling.api.resource.ResourceResolver resolver, SimplePathInfo pathInfo) booleanhasChanges(org.apache.sling.api.resource.ResourceResolver resolver) voidrevert(org.apache.sling.api.resource.ResourceResolver resolver) protected abstract voidsaveInternalResources(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, listChildrenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.sling.api.resource.ResourceProvider
getResource, getResource, listChildren
-
Constructor Details
-
AbstractModifyingResourceProvider
-
-
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:
createin interfaceorg.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:
deletein interfaceorg.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:
revertin interfaceorg.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:
commitin interfaceorg.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:
hasChangesin interfaceorg.apache.sling.api.resource.ModifyingResourceProvider
-
change
-
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, throws org.apache.sling.api.resource.PersistenceExceptionObject>> changedResources, Set<String> deletedResources) - Throws:
org.apache.sling.api.resource.PersistenceException
-