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 boolean
deleteFileResource(java.lang.String path)
boolean
existsDirResource(java.lang.String path)
boolean
existsFileResource(java.lang.String path)
default java.util.Date
getConfigCreatedTime()
java.util.Date
getConfigLastModifiedTime()
IProjectInfo
getInfo()
java.lang.String
getName()
INodeSet
getNodeSet()
Returns the set of nodes for the projectIProjectNodes
getProjectNodes()
java.util.Map<java.lang.String,java.lang.String>
getProjectProperties()
java.util.Map<java.lang.String,java.lang.String>
getProperties()
java.lang.String
getProperty(java.lang.String name)
boolean
hasProperty(java.lang.String key)
default boolean
isEnabled()
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.long
loadFileResource(java.lang.String path, java.io.OutputStream output)
Read a file at a path for the projectvoid
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 setvoid
setProjectProperties(java.util.Properties properties)
Set the project properties file contents exactlylong
storeFileResource(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:
getName
in 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:
getProperty
in interfaceIRundeckProjectConfig
- Parameters:
name
- property name- Returns:
- the property value by name
-
hasProperty
boolean hasProperty(java.lang.String key)
- Specified by:
hasProperty
in interfaceIRundeckProjectConfig
- Parameters:
key
- property name- Returns:
- true if present, false otherwise
-
getProperties
java.util.Map<java.lang.String,java.lang.String> getProperties()
- Specified by:
getProperties
in interfaceIRundeckProjectConfig
- Returns:
- the merged properties available for the project
-
getProjectProperties
java.util.Map<java.lang.String,java.lang.String> getProjectProperties()
- Specified by:
getProjectProperties
in 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:
getConfigLastModifiedTime
in interfaceIRundeckProjectConfig
- Returns:
- last modified time for configuration in epoch time
-
getConfigCreatedTime
default java.util.Date getConfigCreatedTime()
- Specified by:
getConfigCreatedTime
in 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.IOException
Store 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.IOException
Read 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
-
-