public class ResourceHelper extends Object
| Constructor and Description |
|---|
ResourceHelper() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
deleteResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String path) |
static org.apache.sling.api.resource.Resource |
getOrCreateResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String path) |
static StringBuilder |
getPropertiesForLogging(org.apache.sling.api.resource.Resource resource)
Compile a string builder containing the properties of a resource - used for logging
|
static void |
moveResource(org.apache.sling.api.resource.Resource res,
String path)
Move resource to given path.
|
public static org.apache.sling.api.resource.Resource getOrCreateResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String path)
throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceExceptionpublic static boolean deleteResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String path)
throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceExceptionpublic static StringBuilder getPropertiesForLogging(org.apache.sling.api.resource.Resource resource)
public static void moveResource(org.apache.sling.api.resource.Resource res,
String path)
throws org.apache.sling.api.resource.PersistenceException
res - Source resourcepath - Target pathorg.apache.sling.api.resource.PersistenceExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.