Package com.dtolabs.rundeck.core.storage
Class AuthRundeckStorageTree
- java.lang.Object
-
- com.dtolabs.rundeck.core.storage.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 anAuthContext
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
-
Constructor Summary
Constructors Constructor Description AuthRundeckStorageTree(StorageTree storageTree)
AuthRundeckStorageTree(StorageTree storageTree, AuthStorageContextProvider authStorageContextProvider)
-
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 resourceboolean
deleteResource(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
Delete a resource at a pathorg.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 pathorg.rundeck.storage.api.Resource<ResourceMeta>
getResource(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
Return the resource at the pathboolean
hasDirectory(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
Return true if a directory at the path existsboolean
hasPath(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
Return true if the path existsboolean
hasResource(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)
Return true if a resource at the path existsjava.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 pathjava.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 pathjava.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 pathorg.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
-
-
-
Field Detail
-
READ
public static final java.lang.String READ
- See Also:
- Constant Field Values
-
DELETE
public static final java.lang.String DELETE
- See Also:
- Constant Field Values
-
CREATE
public static final java.lang.String CREATE
- See Also:
- Constant Field Values
-
UPDATE
public static final java.lang.String UPDATE
- See Also:
- Constant Field Values
-
STORAGE_PATH_AUTH_RES_TYPE
public static final java.lang.String STORAGE_PATH_AUTH_RES_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AuthRundeckStorageTree
public AuthRundeckStorageTree(StorageTree storageTree)
-
AuthRundeckStorageTree
public AuthRundeckStorageTree(StorageTree storageTree, AuthStorageContextProvider authStorageContextProvider)
-
-
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 interfaceExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,ResourceMeta>
- Parameters:
auth
- extra componentpath
- 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 interfaceExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,ResourceMeta>
- Parameters:
auth
- extra componentpath
- 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 interfaceExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,ResourceMeta>
- Parameters:
auth
- extra componentpath
- 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 interfaceExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,ResourceMeta>
- Parameters:
auth
- extra componentpath
- 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 interfaceExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,ResourceMeta>
- Parameters:
auth
- extra componentpath
- 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 interfaceExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,ResourceMeta>
- Parameters:
auth
- extra componentpath
- 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 interfaceExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,ResourceMeta>
- Parameters:
auth
- extra componentpath
- 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 interfaceExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,ResourceMeta>
- Parameters:
auth
- extra componentpath
- 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 interfaceExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,ResourceMeta>
- Parameters:
auth
- extra componentpath
- 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 interfaceExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,ResourceMeta>
- Parameters:
auth
- extra componentpath
- pathcontent
- 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 interfaceExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,ResourceMeta>
- Parameters:
auth
- extra componentpath
- pathcontent
- content- Returns:
- the resource
-
-