org.apache.sling.event.impl.support
Class ResourceHelper

java.lang.Object
  extended by org.apache.sling.event.impl.support.ResourceHelper

public abstract class ResourceHelper
extends Object


Field Summary
static String BUNDLE_EVENT_STARTED
           
static String BUNDLE_EVENT_UPDATED
           
static String PROPERTY_MARKER_READ_ERROR_LIST
           
static String RESOURCE_TYPE_EVENT
           
static String RESOURCE_TYPE_FOLDER
           
static String RESOURCE_TYPE_JOB
           
 
Constructor Summary
ResourceHelper()
           
 
Method Summary
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 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_TYPE_FOLDER

public static final String RESOURCE_TYPE_FOLDER
See Also:
Constant Field Values

RESOURCE_TYPE_JOB

public static final String RESOURCE_TYPE_JOB
See Also:
Constant Field Values

RESOURCE_TYPE_EVENT

public static final String RESOURCE_TYPE_EVENT
See Also:
Constant Field Values

BUNDLE_EVENT_UPDATED

public static final String BUNDLE_EVENT_UPDATED
See Also:
Constant Field Values

BUNDLE_EVENT_STARTED

public static final String BUNDLE_EVENT_STARTED
See Also:
Constant Field Values

PROPERTY_MARKER_READ_ERROR_LIST

public static final String PROPERTY_MARKER_READ_ERROR_LIST
Constructor Detail

ResourceHelper

public ResourceHelper()
Method Detail

ignoreProperty

public static boolean ignoreProperty(String name)
Check if this property should be ignored


filterName

public static String filterName(String resourceName)
Filter the node name for not allowed characters and replace them.

Parameters:
nodeName - The suggested node name.
Returns:
The filtered node name.

cloneValueMap

public static Map<String,Object> cloneValueMap(org.apache.sling.api.resource.ValueMap vm)
                                        throws InstantiationException
Throws:
InstantiationException

getValueMap

public static org.apache.sling.api.resource.ValueMap getValueMap(org.apache.sling.api.resource.Resource resource)
                                                          throws InstantiationException
Throws:
InstantiationException

getOrCreateBasePath

public static void getOrCreateBasePath(org.apache.sling.api.resource.ResourceResolver resolver,
                                       String path)
                                throws org.apache.sling.api.resource.PersistenceException
Throws:
org.apache.sling.api.resource.PersistenceException

getOrCreateResource

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
Throws:
org.apache.sling.api.resource.PersistenceException


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.