Class AuthRundeckStorageTree

  • All Implemented Interfaces:
    AuthStorageTree, AuthTree<ResourceMeta>, ExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,​ResourceMeta>

    public class AuthRundeckStorageTree
    extends java.lang.Object
    implements AuthStorageTree
    AuthRundeckStorageTree provides authorized access to a tree using an AuthContext for each request.
    Since:
    2014-03-20
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CREATE  
      static java.lang.String DELETE  
      static java.lang.String READ  
      static java.lang.String STORAGE_PATH_AUTH_RES_TYPE  
      static java.lang.String UPDATE  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.rundeck.storage.api.Resource<ResourceMeta> createResource​(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path, ResourceMeta content)
      Create a resource
      boolean deleteResource​(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
      Delete a resource at a path
      org.rundeck.storage.api.Resource<ResourceMeta> getPath​(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
      Return the resource or directory at the path
      org.rundeck.storage.api.Resource<ResourceMeta> getResource​(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
      Return the resource at the path
      boolean hasDirectory​(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
      Return true if a directory at the path exists
      boolean hasPath​(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
      Return true if the path exists
      boolean hasResource​(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
      Return true if a resource at the path exists
      java.util.Set<org.rundeck.storage.api.Resource<ResourceMeta>> listDirectory​(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
      Return the set of resources at the directory path
      java.util.Set<org.rundeck.storage.api.Resource<ResourceMeta>> listDirectoryResources​(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
      Return the set of non-directory resources at the directory path
      java.util.Set<org.rundeck.storage.api.Resource<ResourceMeta>> listDirectorySubdirs​(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
      Return the set of sub directory resources within the directory path
      org.rundeck.storage.api.Resource<ResourceMeta> updateResource​(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path, ResourceMeta content)
      Update an existing resource
      • Methods inherited from class java.lang.Object

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

      • hasPath

        public boolean hasPath​(com.dtolabs.rundeck.core.authorization.AuthContext auth,
                               org.rundeck.storage.api.Path path)
        Description copied from interface: ExtTree
        Return true if the path exists
        Specified by:
        hasPath in interface ExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,​ResourceMeta>
        Parameters:
        auth - extra component
        path - path
        Returns:
        true if it exists
      • hasResource

        public boolean hasResource​(com.dtolabs.rundeck.core.authorization.AuthContext auth,
                                   org.rundeck.storage.api.Path path)
        Description copied from interface: ExtTree
        Return true if a resource at the path exists
        Specified by:
        hasResource in interface ExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,​ResourceMeta>
        Parameters:
        auth - extra component
        path - path
        Returns:
        true if a resource exists
      • hasDirectory

        public boolean hasDirectory​(com.dtolabs.rundeck.core.authorization.AuthContext auth,
                                    org.rundeck.storage.api.Path path)
        Description copied from interface: ExtTree
        Return true if a directory at the path exists
        Specified by:
        hasDirectory in interface ExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,​ResourceMeta>
        Parameters:
        auth - extra component
        path - path
        Returns:
        true if the path is a directory
      • getPath

        public org.rundeck.storage.api.Resource<ResourceMeta> getPath​(com.dtolabs.rundeck.core.authorization.AuthContext auth,
                                                                      org.rundeck.storage.api.Path path)
        Description copied from interface: ExtTree
        Return the resource or directory at the path
        Specified by:
        getPath in interface ExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,​ResourceMeta>
        Parameters:
        auth - extra component
        path - path
        Returns:
        Resource or directory
      • getResource

        public org.rundeck.storage.api.Resource<ResourceMeta> getResource​(com.dtolabs.rundeck.core.authorization.AuthContext auth,
                                                                          org.rundeck.storage.api.Path path)
        Description copied from interface: ExtTree
        Return the resource at the path
        Specified by:
        getResource in interface ExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,​ResourceMeta>
        Parameters:
        auth - extra component
        path - path
        Returns:
        Resource
      • listDirectoryResources

        public java.util.Set<org.rundeck.storage.api.Resource<ResourceMeta>> listDirectoryResources​(com.dtolabs.rundeck.core.authorization.AuthContext auth,
                                                                                                    org.rundeck.storage.api.Path path)
        Description copied from interface: ExtTree
        Return the set of non-directory resources at the directory path
        Specified by:
        listDirectoryResources in interface ExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,​ResourceMeta>
        Parameters:
        auth - extra component
        path - path
        Returns:
        set of resources
      • listDirectory

        public java.util.Set<org.rundeck.storage.api.Resource<ResourceMeta>> listDirectory​(com.dtolabs.rundeck.core.authorization.AuthContext auth,
                                                                                           org.rundeck.storage.api.Path path)
        Description copied from interface: ExtTree
        Return the set of resources at the directory path
        Specified by:
        listDirectory in interface ExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,​ResourceMeta>
        Parameters:
        auth - extra component
        path - path
        Returns:
        set of resources
      • listDirectorySubdirs

        public java.util.Set<org.rundeck.storage.api.Resource<ResourceMeta>> listDirectorySubdirs​(com.dtolabs.rundeck.core.authorization.AuthContext auth,
                                                                                                  org.rundeck.storage.api.Path path)
        Description copied from interface: ExtTree
        Return the set of sub directory resources within the directory path
        Specified by:
        listDirectorySubdirs in interface ExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,​ResourceMeta>
        Parameters:
        auth - extra component
        path - directory path
        Returns:
        set of subdirectories
      • deleteResource

        public boolean deleteResource​(com.dtolabs.rundeck.core.authorization.AuthContext auth,
                                      org.rundeck.storage.api.Path path)
        Description copied from interface: ExtTree
        Delete a resource at a path
        Specified by:
        deleteResource in interface ExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,​ResourceMeta>
        Parameters:
        auth - extra component
        path - path
        Returns:
        true if the resource was deleted
      • createResource

        public org.rundeck.storage.api.Resource<ResourceMeta> createResource​(com.dtolabs.rundeck.core.authorization.AuthContext auth,
                                                                             org.rundeck.storage.api.Path path,
                                                                             ResourceMeta content)
        Description copied from interface: ExtTree
        Create a resource
        Specified by:
        createResource in interface ExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,​ResourceMeta>
        Parameters:
        auth - extra component
        path - path
        content - content
        Returns:
        the resource
      • updateResource

        public org.rundeck.storage.api.Resource<ResourceMeta> updateResource​(com.dtolabs.rundeck.core.authorization.AuthContext auth,
                                                                             org.rundeck.storage.api.Path path,
                                                                             ResourceMeta content)
        Description copied from interface: ExtTree
        Update an existing resource
        Specified by:
        updateResource in interface ExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,​ResourceMeta>
        Parameters:
        auth - extra component
        path - path
        content - content
        Returns:
        the resource