Class WebdavPropertyManager


  • public class WebdavPropertyManager
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​WebdavProperty>> memoryProperties
      This is an in Memory Property manager used to handle PROPPATCH even if JCMS will handle it
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addProperty​(WebdavProperty property, java.lang.String resourcePath)
      Add a property for the given resource path
      static void copyProperties​(java.lang.String sourcePath, java.lang.String targetPath)
      Copy all properties from a given resource to another.
      static java.util.Set<WebdavProperty> getProperties​(java.lang.String resourcePath)
      Return all the properties for a given resource
      static WebdavProperty getProperty​(WebdavProperty propertyModel, java.lang.String resourcePath)
      Retrieve the in memory property instance matching the specified property model for the given resource path
      static void moveProperties​(java.lang.String sourcePath, java.lang.String targetPath)
      Move all properties from a given resource to another.
      static void removeProperties​(java.lang.String resourcePath)
      Remove all properties for a given resource
      static void removeProperty​(WebdavProperty property, java.lang.String resourcePath)
      Remove a property for the given resource path
      static void setProperties​(java.lang.String resourcePath, java.util.Set<WebdavProperty> properties)
      Overrided properties for a given resource path
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • memoryProperties

        public static final java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​WebdavProperty>> memoryProperties
        This is an in Memory Property manager used to handle PROPPATCH even if JCMS will handle it
    • Constructor Detail

      • WebdavPropertyManager

        public WebdavPropertyManager()
    • Method Detail

      • addProperty

        public static void addProperty​(WebdavProperty property,
                                       java.lang.String resourcePath)
        Add a property for the given resource path
        Parameters:
        property - the property to add
        resourcePath - the path of the resource
      • getProperty

        public static WebdavProperty getProperty​(WebdavProperty propertyModel,
                                                 java.lang.String resourcePath)
        Retrieve the in memory property instance matching the specified property model for the given resource path
        Parameters:
        propertyModel - the property to find (its value is not used)
        resourcePath - the path of the resource
        Returns:
        the matching property stored in memory (with the correct value)
      • removeProperty

        public static void removeProperty​(WebdavProperty property,
                                          java.lang.String resourcePath)
        Remove a property for the given resource path
        Parameters:
        property - the property to remove
        resourcePath - the path of the resource
      • setProperties

        public static void setProperties​(java.lang.String resourcePath,
                                         java.util.Set<WebdavProperty> properties)
        Overrided properties for a given resource path
        Parameters:
        resourcePath - the path of the resource
        properties - the Map of properties
      • getProperties

        public static java.util.Set<WebdavProperty> getProperties​(java.lang.String resourcePath)
        Return all the properties for a given resource
        Parameters:
        resourcePath - the path of the resource
        Returns:
        Map the map of properties
      • removeProperties

        public static void removeProperties​(java.lang.String resourcePath)
        Remove all properties for a given resource
        Parameters:
        resourcePath - the path of the resource
      • moveProperties

        public static void moveProperties​(java.lang.String sourcePath,
                                          java.lang.String targetPath)
        Move all properties from a given resource to another.
        Parameters:
        sourcePath - the path of the source resource from which properties will be removed
        targetPath - the path of the target resource to which properties will be added
      • copyProperties

        public static void copyProperties​(java.lang.String sourcePath,
                                          java.lang.String targetPath)
        Copy all properties from a given resource to another.
        Parameters:
        sourcePath - the path of the source resource from which properties are copied
        targetPath - the path of the target resource to which properties will be added