public abstract class ResourceHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BUNDLE_EVENT_STARTED |
static String |
BUNDLE_EVENT_UPDATED |
static String |
PROPERTY_JOB_ID |
static String |
PROPERTY_JOB_TOPIC |
static String |
PROPERTY_MARKER_READ_ERROR_LIST |
static String |
PROPERTY_SCHEDULE_INFO |
static String |
PROPERTY_SCHEDULE_INFO_TYPE |
static String |
PROPERTY_SCHEDULE_NAME |
static String |
PROPERTY_SCHEDULE_SUSPENDED |
static String |
RESOURCE_TYPE_EVENT |
static String |
RESOURCE_TYPE_FOLDER |
static String |
RESOURCE_TYPE_JOB |
static String |
RESOURCE_TYPE_SCHEDULED_JOB
We use the same resource type as for timed events.
|
Constructor and Description |
---|
ResourceHelper() |
Modifier and Type | Method and Description |
---|---|
static Map<String,Object> |
cloneValueMap(org.apache.sling.api.resource.ValueMap vm) |
static String |
filterName(String resourceName)
Filter the node name for not allowed characters and replace them.
|
static String |
filterQueueName(String queueName)
Filter the queue name for not allowed characters and replace them
- with the exception of the main queue, which will not be filtered
|
static void |
getOrCreateBasePath(org.apache.sling.api.resource.ResourceResolver resolver,
String path) |
static org.apache.sling.api.resource.Resource |
getOrCreateResource(org.apache.sling.api.resource.ResourceResolver resolver,
String path,
Map<String,Object> props) |
static org.apache.sling.api.resource.ValueMap |
getValueMap(org.apache.sling.api.resource.Resource resource) |
static boolean |
ignoreProperty(String name)
Check if this property should be ignored
|
public static final String RESOURCE_TYPE_FOLDER
public static final String RESOURCE_TYPE_JOB
public static final String RESOURCE_TYPE_EVENT
public static final String RESOURCE_TYPE_SCHEDULED_JOB
public static final String BUNDLE_EVENT_UPDATED
public static final String BUNDLE_EVENT_STARTED
public static final String PROPERTY_SCHEDULE_NAME
public static final String PROPERTY_SCHEDULE_INFO
public static final String PROPERTY_SCHEDULE_INFO_TYPE
public static final String PROPERTY_SCHEDULE_SUSPENDED
public static final String PROPERTY_JOB_ID
public static final String PROPERTY_JOB_TOPIC
public static final String PROPERTY_MARKER_READ_ERROR_LIST
public static boolean ignoreProperty(String name)
public static String filterQueueName(String queueName)
queueName
- the suggested queue namepublic static String filterName(String resourceName)
resourceName
- The suggested resource name.public static Map<String,Object> cloneValueMap(org.apache.sling.api.resource.ValueMap vm) throws InstantiationException
InstantiationException
public static org.apache.sling.api.resource.ValueMap getValueMap(org.apache.sling.api.resource.Resource resource) throws InstantiationException
InstantiationException
public static void getOrCreateBasePath(org.apache.sling.api.resource.ResourceResolver resolver, String path) throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceException
public static org.apache.sling.api.resource.Resource getOrCreateResource(org.apache.sling.api.resource.ResourceResolver resolver, String path, Map<String,Object> props) throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceException
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.