org.hippoecm.hst.servlet.utils
Class ResourceUtils

java.lang.Object
  extended by org.hippoecm.hst.servlet.utils.ResourceUtils

public final class ResourceUtils
extends Object


Field Summary
static String DEFAULT_BASE_BINARIES_CONTENT_PATH
           
static String DEFAULT_BINARY_DATA_PROP_NAME
           
static String DEFAULT_BINARY_LAST_MODIFIED_PROP_NAME
           
static String DEFAULT_BINARY_MIME_TYPE_PROP_NAME
           
static String DEFAULT_BINARY_RESOURCE_NODE_TYPE
           
 
Method Summary
static long getDataLength(javax.jcr.Node resourceNode, String binaryDataPropName)
           
static String getFileName(javax.jcr.Node resourceNode, String[] contentDispositionFileNamePropertyNames)
           
static long getLastModifiedDate(javax.jcr.Node resourceNode, String binaryLastModifiedPropName)
           
static String getResourcePath(javax.servlet.http.HttpServletRequest request, String contentPath)
           
static String getResourceRelPath(javax.servlet.http.HttpServletRequest request)
           
static boolean hasBinaryProperty(javax.jcr.Node resourceNode, String binaryDataPropName)
           
static boolean hasMimeTypeProperty(javax.jcr.Node resourceNode, String binaryMimeTypePropName)
           
static boolean hasValideType(javax.jcr.Node resourceNode, String binaryResourceNodeType)
           
static boolean isValidResourcePath(String path)
           
static javax.jcr.Node lookUpResource(javax.jcr.Session session, String resourcePath, Map<String,List<ResourceContainer>> prefix2ResourceContainer, List<ResourceContainer> allResourceContainers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BASE_BINARIES_CONTENT_PATH

public static final String DEFAULT_BASE_BINARIES_CONTENT_PATH
See Also:
Constant Field Values

DEFAULT_BINARY_RESOURCE_NODE_TYPE

public static final String DEFAULT_BINARY_RESOURCE_NODE_TYPE
See Also:
Constant Field Values

DEFAULT_BINARY_DATA_PROP_NAME

public static final String DEFAULT_BINARY_DATA_PROP_NAME
See Also:
Constant Field Values

DEFAULT_BINARY_MIME_TYPE_PROP_NAME

public static final String DEFAULT_BINARY_MIME_TYPE_PROP_NAME
See Also:
Constant Field Values

DEFAULT_BINARY_LAST_MODIFIED_PROP_NAME

public static final String DEFAULT_BINARY_LAST_MODIFIED_PROP_NAME
See Also:
Constant Field Values
Method Detail

getLastModifiedDate

public static long getLastModifiedDate(javax.jcr.Node resourceNode,
                                       String binaryLastModifiedPropName)

getDataLength

public static long getDataLength(javax.jcr.Node resourceNode,
                                 String binaryDataPropName)

getFileName

public static String getFileName(javax.jcr.Node resourceNode,
                                 String[] contentDispositionFileNamePropertyNames)

getResourcePath

public static String getResourcePath(javax.servlet.http.HttpServletRequest request,
                                     String contentPath)

getResourceRelPath

public static String getResourceRelPath(javax.servlet.http.HttpServletRequest request)

lookUpResource

public static javax.jcr.Node lookUpResource(javax.jcr.Session session,
                                            String resourcePath,
                                            Map<String,List<ResourceContainer>> prefix2ResourceContainer,
                                            List<ResourceContainer> allResourceContainers)

isValidResourcePath

public static boolean isValidResourcePath(String path)

hasValideType

public static boolean hasValideType(javax.jcr.Node resourceNode,
                                    String binaryResourceNodeType)

hasBinaryProperty

public static boolean hasBinaryProperty(javax.jcr.Node resourceNode,
                                        String binaryDataPropName)

hasMimeTypeProperty

public static boolean hasMimeTypeProperty(javax.jcr.Node resourceNode,
                                          String binaryMimeTypePropName)


Copyright © 2008-2012 Hippo. All Rights Reserved.