public class ResourceQueueUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
RESOURCE_FOLDER |
| Constructor and Description |
|---|
ResourceQueueUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.sling.api.resource.Resource |
createResource(org.apache.sling.api.resource.Resource root,
DistributionQueueItem queueItem) |
static void |
deleteResource(org.apache.sling.api.resource.Resource resource) |
static org.apache.sling.api.resource.Resource |
getResourceById(org.apache.sling.api.resource.Resource root,
String entryId) |
static int |
getResourceCount(org.apache.sling.api.resource.Resource root) |
static org.apache.sling.api.resource.Resource |
getRootResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String rootPath) |
static String |
getTimePath(Calendar now)
Transforms current time to path 2018/01/03/23/54
|
static void |
incrementProcessingAttemptForQueueItem(org.apache.sling.api.resource.Resource queueItemResource) |
static boolean |
isSafeToDelete(String nowPath,
String path)
Checks if path is safe to delete at this time.
|
static String |
unescapeId(String itemId) |
public static final String RESOURCE_FOLDER
public static org.apache.sling.api.resource.Resource getRootResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String rootPath)
throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceExceptionpublic static org.apache.sling.api.resource.Resource getResourceById(org.apache.sling.api.resource.Resource root,
String entryId)
public static org.apache.sling.api.resource.Resource createResource(org.apache.sling.api.resource.Resource root,
DistributionQueueItem queueItem)
throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceExceptionpublic static void deleteResource(org.apache.sling.api.resource.Resource resource)
throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceExceptionpublic static int getResourceCount(org.apache.sling.api.resource.Resource root)
public static String getTimePath(Calendar now)
now - the current timepublic static boolean isSafeToDelete(String nowPath, String path)
nowPath - represents a full path of current time (e.g. 2018/01/03/23/54)path - the path to be checked (it can be a partial path e.g. 2018/01)public static void incrementProcessingAttemptForQueueItem(org.apache.sling.api.resource.Resource queueItemResource)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.