Class WebDAV


  • public class WebDAV
    extends java.lang.Object
    Helper class used by the WebDAV protocol handling classes
    Author:
    gavinc
    • Constructor Detail

      • WebDAV

        public WebDAV()
    • Method Detail

      • formatModifiedDate

        public static java.lang.String formatModifiedDate​(java.util.Date date)
        Formats the given date so that it conforms with the Last-Modified HTTP header
        Parameters:
        date - The date to format
        Returns:
        The formatted date string
      • formatModifiedDate

        public static java.lang.String formatModifiedDate​(long ldate)
        Formats the given date so that it conforms with the Last-Modified HTTP header
        Parameters:
        ldate - long
        Returns:
        The formatted date string
      • formatCreationDate

        public static java.lang.String formatCreationDate​(java.util.Date date)
        Formats the given date so that it conforms with the WebDAV creation date/time format
        Parameters:
        date - The date to format
        Returns:
        The formatted date string
      • formatCreationDate

        public static java.lang.String formatCreationDate​(long ldate)
        Formats the given date so that it conforms with the WebDAV creation date/time format
        Parameters:
        ldate - long
        Returns:
        The formatted date string
      • formatHeaderDate

        public static java.lang.String formatHeaderDate​(java.util.Date date)
        Formats the given date for use in the HTTP header
        Parameters:
        date - Date
        Returns:
        String
      • formatHeaderDate

        public static java.lang.String formatHeaderDate​(long ldate)
        Formats the given date for use in the HTTP header
        Parameters:
        ldate - long
        Returns:
        String
      • getDAVPropertyValue

        public static java.lang.Object getDAVPropertyValue​(java.util.Map<org.alfresco.service.namespace.QName,​java.io.Serializable> props,
                                                           java.lang.String davPropName)
        Return the Alfresco property value for the specified WebDAV property
        Parameters:
        davPropName - String
        Returns:
        Object
      • decodeURL

        public static java.lang.String decodeURL​(java.lang.String strPath)
        /** Returns a context-relative path, beginning with a "/", that represents the canonical version of the specified path after ".." and "." elements are resolved out. If the specified path attempts to go outside the boundaries of the current context (i.e. too many ".." path elements are present), return null instead.
        Parameters:
        strPath - The path to be decoded
      • makeLockToken

        public static final java.lang.String makeLockToken​(org.alfresco.service.cmr.repository.NodeRef lockNode,
                                                           java.lang.String owner)
        Make a unique lock token
        Parameters:
        lockNode - NodeRef
        owner - String
        Returns:
        String
      • parseLockToken

        public static final java.lang.String[] parseLockToken​(java.lang.String lockToken)
        Parse a lock token returning the node if and username
        Parameters:
        lockToken - String
        Returns:
        String[]
      • getDepthName

        public static final java.lang.String getDepthName​(int depth)
        Returns string representation of the depth
        Parameters:
        depth - int
        Returns:
        String