Package com.dtolabs.rundeck.core.common
Interface IRundeckProject
-
- All Superinterfaces:
IRundeckProjectConfig
- All Known Implementing Classes:
FrameworkProject
public interface IRundeckProject extends IRundeckProjectConfig
Interface for a project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleandeleteFileResource(java.lang.String path)booleanexistsDirResource(java.lang.String path)booleanexistsFileResource(java.lang.String path)default java.util.DategetConfigCreatedTime()java.util.DategetConfigLastModifiedTime()IProjectInfogetInfo()java.lang.StringgetName()INodeSetgetNodeSet()Returns the set of nodes for the projectIProjectNodesgetProjectNodes()java.util.Map<java.lang.String,java.lang.String>getProjectProperties()java.util.Map<java.lang.String,java.lang.String>getProperties()java.lang.StringgetProperty(java.lang.String name)booleanhasProperty(java.lang.String key)default booleanisEnabled()Indicates if the projects is enabledjava.util.List<java.lang.String>listDirPaths(java.lang.String path)java.util.List<java.util.Map<java.lang.String,java.lang.Object>>listResourceModelConfigurations()list the configurations of resource model providers.longloadFileResource(java.lang.String path, java.io.OutputStream output)Read a file at a path for the projectvoidmergeProjectProperties(java.util.Properties properties, java.util.Set<java.lang.String> removePrefixes)Update the project properties file by setting updating the given properties, and removing any properties that have a prefix in the removePrefixes setvoidsetProjectProperties(java.util.Properties properties)Set the project properties file contents exactlylongstoreFileResource(java.lang.String path, java.io.InputStream input)Store a file at a path for the project
-
-
-
Method Detail
-
getName
java.lang.String getName()
- Specified by:
getNamein interfaceIRundeckProjectConfig- Returns:
- project name
-
getInfo
IProjectInfo getInfo()
-
listResourceModelConfigurations
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> listResourceModelConfigurations()
list the configurations of resource model providers.- Returns:
- a list of maps containing:
- type - provider type name
- props - configuration properties
-
getNodeSet
INodeSet getNodeSet() throws NodeFileParserException
Returns the set of nodes for the project- Returns:
- an instance of
INodeSet - Throws:
NodeFileParserException- on parse error
-
getProperty
java.lang.String getProperty(java.lang.String name)
- Specified by:
getPropertyin interfaceIRundeckProjectConfig- Parameters:
name- property name- Returns:
- the property value by name
-
hasProperty
boolean hasProperty(java.lang.String key)
- Specified by:
hasPropertyin interfaceIRundeckProjectConfig- Parameters:
key- property name- Returns:
- true if present, false otherwise
-
getProperties
java.util.Map<java.lang.String,java.lang.String> getProperties()
- Specified by:
getPropertiesin interfaceIRundeckProjectConfig- Returns:
- the merged properties available for the project
-
getProjectProperties
java.util.Map<java.lang.String,java.lang.String> getProjectProperties()
- Specified by:
getProjectPropertiesin interfaceIRundeckProjectConfig- Returns:
- the direct properties set for the project
-
mergeProjectProperties
void mergeProjectProperties(java.util.Properties properties, java.util.Set<java.lang.String> removePrefixes)Update the project properties file by setting updating the given properties, and removing any properties that have a prefix in the removePrefixes set- Parameters:
properties- new properties to put in the fileremovePrefixes- prefixes of properties to remove from the file
-
setProjectProperties
void setProjectProperties(java.util.Properties properties)
Set the project properties file contents exactly- Parameters:
properties- new properties to use in the file
-
getConfigLastModifiedTime
java.util.Date getConfigLastModifiedTime()
- Specified by:
getConfigLastModifiedTimein interfaceIRundeckProjectConfig- Returns:
- last modified time for configuration in epoch time
-
getConfigCreatedTime
default java.util.Date getConfigCreatedTime()
- Specified by:
getConfigCreatedTimein interfaceIRundeckProjectConfig- Returns:
- creation time for configuration in epoch time
-
getProjectNodes
IProjectNodes getProjectNodes()
- Returns:
- the project nodes interface
-
existsFileResource
boolean existsFileResource(java.lang.String path)
- Parameters:
path- path relative to the project- Returns:
- true if it exists
-
existsDirResource
boolean existsDirResource(java.lang.String path)
- Parameters:
path- path relative to the project- Returns:
- true if it is a directory
-
listDirPaths
java.util.List<java.lang.String> listDirPaths(java.lang.String path)
- Parameters:
path- path relative to the project- Returns:
- list of paths within the directory
-
deleteFileResource
boolean deleteFileResource(java.lang.String path)
- Parameters:
path- path relative to the project- Returns:
- true if it is deleted, false if it was not deleted
-
storeFileResource
long storeFileResource(java.lang.String path, java.io.InputStream input) throws java.io.IOExceptionStore a file at a path for the project- Parameters:
path- path relative to the projectinput- input- Throws:
java.io.IOException- if an IO error occurs
-
loadFileResource
long loadFileResource(java.lang.String path, java.io.OutputStream output) throws java.io.IOExceptionRead a file at a path for the project- Parameters:
path- path relative to the projectoutput- output- Returns:
- length of data loaded
- Throws:
java.io.IOException- if an IO error occurs
-
isEnabled
default boolean isEnabled()
Indicates if the projects is enabled
-
-