com.dtolabs.rundeck.core.storage
Interface ExtTree<S,T extends ContentMeta>

All Known Subinterfaces:
AuthStorageTree, AuthTree<T>
All Known Implementing Classes:
AuthRundeckStorageTree

public interface ExtTree<S,T extends ContentMeta>

ExtTree extends each tree method with additional parameter

Since:
2014-04-03

Method Summary
 Resource<T> createResource(S extra, Path path, T content)
          Create a resource
 boolean deleteResource(S extra, Path path)
          Delete a resource at a path
 Resource<T> getPath(S extra, Path path)
          Return the resource or directory at the path
 Resource<T> getResource(S extra, Path path)
          Return the resource at the path
 boolean hasDirectory(S extra, Path path)
          Return true if a directory at the path exists
 boolean hasPath(S extra, Path path)
          Return true if the path exists
 boolean hasResource(S extra, Path path)
          Return true if a resource at the path exists
 java.util.Set<Resource<T>> listDirectory(S extra, Path path)
          Return the set of resources at the directory path
 java.util.Set<Resource<T>> listDirectoryResources(S extra, Path path)
          Return the set of non-directory resources at the directory path
 java.util.Set<Resource<T>> listDirectorySubdirs(S extra, Path path)
          Return the set of sub directory resources within the directory path
 Resource<T> updateResource(S extra, Path path, T content)
          Update an existing resource
 

Method Detail

hasPath

boolean hasPath(S extra,
                Path path)
Return true if the path exists

Parameters:
path - path
Returns:
true if it exists

hasResource

boolean hasResource(S extra,
                    Path path)
Return true if a resource at the path exists

Parameters:
path - path
Returns:
true if a resource exists

hasDirectory

boolean hasDirectory(S extra,
                     Path path)
Return true if a directory at the path exists

Parameters:
path - path
Returns:
true if the path is a directory

getPath

Resource<T> getPath(S extra,
                    Path path)
Return the resource or directory at the path

Parameters:
path - path
Returns:
Resource or directory

getResource

Resource<T> getResource(S extra,
                        Path path)
Return the resource at the path

Parameters:
path - path
Returns:
Resource
Throws:
java.lang.IllegalArgumentException - if the path is a directory or does not exist

listDirectoryResources

java.util.Set<Resource<T>> listDirectoryResources(S extra,
                                                  Path path)
Return the set of non-directory resources at the directory path

Parameters:
path - path
Returns:
set of resources

listDirectory

java.util.Set<Resource<T>> listDirectory(S extra,
                                         Path path)
Return the set of resources at the directory path

Parameters:
path - path
Returns:
set of resources

listDirectorySubdirs

java.util.Set<Resource<T>> listDirectorySubdirs(S extra,
                                                Path path)
Return the set of sub directory resources within the directory path

Parameters:
path - directory path
Returns:
set of subdirectories

deleteResource

boolean deleteResource(S extra,
                       Path path)
Delete a resource at a path

Parameters:
path - path
Returns:
true if the resource was deleted
Throws:
java.lang.IllegalArgumentException - if the path is a directory or does not exist

createResource

Resource<T> createResource(S extra,
                           Path path,
                           T content)
Create a resource

Parameters:
path - path
Returns:
the resource
Throws:
java.lang.IllegalArgumentException - if the path is a directory

updateResource

Resource<T> updateResource(S extra,
                           Path path,
                           T content)
Update an existing resource

Parameters:
path - path
Returns:
the resource
Throws:
java.lang.IllegalArgumentException - if the path is a directory or does not exist