Class DelegateTree<T extends ContentMeta>

    • Constructor Detail

      • DelegateTree

        public DelegateTree()
      • DelegateTree

        public DelegateTree​(Tree<T> delegate)
    • Method Detail

      • hasPath

        public boolean hasPath​(Path path)
        Description copied from interface: Tree
        Return true if the path exists
        Specified by:
        hasPath in interface Tree<T extends ContentMeta>
        Parameters:
        path - path
        Returns:
        true if it exists
      • hasResource

        public boolean hasResource​(Path path)
        Description copied from interface: Tree
        Return true if a resource at the path exists
        Specified by:
        hasResource in interface Tree<T extends ContentMeta>
        Parameters:
        path - path
        Returns:
        true if a resource exists
      • hasDirectory

        public boolean hasDirectory​(Path path)
        Description copied from interface: Tree
        Return true if a directory at the path exists
        Specified by:
        hasDirectory in interface Tree<T extends ContentMeta>
        Parameters:
        path - path
        Returns:
        true if the path is a directory
      • getPath

        public Resource<T> getPath​(Path path)
        Description copied from interface: Tree
        Return the resource or directory at the path
        Specified by:
        getPath in interface Tree<T extends ContentMeta>
        Parameters:
        path - path
        Returns:
        Resource or directory
      • getResource

        public Resource<T> getResource​(Path path)
        Description copied from interface: Tree
        Return the resource at the path
        Specified by:
        getResource in interface Tree<T extends ContentMeta>
        Parameters:
        path - path
        Returns:
        Resource
      • listDirectorySubdirs

        public java.util.Set<Resource<T>> listDirectorySubdirs​(Path path)
        Description copied from interface: Tree
        Return the set of sub directory resources within the directory path
        Specified by:
        listDirectorySubdirs in interface Tree<T extends ContentMeta>
        Parameters:
        path - directory path
        Returns:
        set of subdirectories
      • listDirectoryResources

        public java.util.Set<Resource<T>> listDirectoryResources​(Path path)
        Description copied from interface: Tree
        Return the set of non-directory resources at the directory path
        Specified by:
        listDirectoryResources in interface Tree<T extends ContentMeta>
        Parameters:
        path - path
        Returns:
        set of resources
      • listDirectory

        public java.util.Set<Resource<T>> listDirectory​(Path path)
        Description copied from interface: Tree
        Return the set of resources at the directory path
        Specified by:
        listDirectory in interface Tree<T extends ContentMeta>
        Parameters:
        path - path
        Returns:
        set of resources
      • deleteResource

        public boolean deleteResource​(Path path)
        Description copied from interface: Tree
        Delete a resource at a path
        Specified by:
        deleteResource in interface Tree<T extends ContentMeta>
        Parameters:
        path - path
        Returns:
        true if the resource was deleted
      • createResource

        public Resource<T> createResource​(Path path,
                                          T content)
        Description copied from interface: Tree
        Create a resource
        Specified by:
        createResource in interface Tree<T extends ContentMeta>
        Parameters:
        path - path
        content - resource content
        Returns:
        the resource
      • updateResource

        public Resource<T> updateResource​(Path path,
                                          T content)
        Description copied from interface: Tree
        Update an existing resource
        Specified by:
        updateResource in interface Tree<T extends ContentMeta>
        Parameters:
        path - path
        content - resource content
        Returns:
        the resource