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 anAuthContextfor each request.- Since:
- 2014-03-20
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCREATEstatic java.lang.StringDELETEstatic java.lang.StringREADstatic java.lang.StringSTORAGE_PATH_AUTH_RES_TYPEstatic java.lang.StringUPDATE
-
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 resourcebooleandeleteResource(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 pathbooleanhasDirectory(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)Return true if a directory at the path existsbooleanhasPath(com.dtolabs.rundeck.core.authorization.AuthContext auth, org.rundeck.storage.api.Path path)Return true if the path existsbooleanhasResource(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:ExtTreeReturn true if the path exists- Specified by:
hasPathin 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:ExtTreeReturn true if a resource at the path exists- Specified by:
hasResourcein 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:ExtTreeReturn true if a directory at the path exists- Specified by:
hasDirectoryin 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:ExtTreeReturn the resource or directory at the path- Specified by:
getPathin 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:ExtTreeReturn the resource at the path- Specified by:
getResourcein 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:ExtTreeReturn the set of non-directory resources at the directory path- Specified by:
listDirectoryResourcesin 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:ExtTreeReturn the set of resources at the directory path- Specified by:
listDirectoryin 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:ExtTreeReturn the set of sub directory resources within the directory path- Specified by:
listDirectorySubdirsin 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:ExtTreeDelete a resource at a path- Specified by:
deleteResourcein 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:ExtTreeCreate a resource- Specified by:
createResourcein 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:ExtTreeUpdate an existing resource- Specified by:
updateResourcein interfaceExtTree<com.dtolabs.rundeck.core.authorization.AuthContext,ResourceMeta>- Parameters:
auth- extra componentpath- pathcontent- content- Returns:
- the resource
-
-