public class FrameworkProjectConfig extends java.lang.Object implements IRundeckProjectConfig, IRundeckProjectConfigModifier
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ETC_DIR_NAME |
static org.slf4j.Logger |
logger |
static java.lang.String |
PROP_FILENAME |
| Constructor and Description |
|---|
FrameworkProjectConfig(java.lang.String name,
java.io.File propertyFile,
IFilesystemFramework filesystemFramework) |
| Modifier and Type | Method and Description |
|---|---|
static FrameworkProjectConfig |
create(java.lang.String name,
java.io.File propertyFile,
IFilesystemFramework filesystemFramework)
Create from existing file
|
static FrameworkProjectConfig |
create(java.lang.String name,
java.io.File propertyFile,
java.util.Properties properties,
IFilesystemFramework filesystemFramework)
Create and generate file with the given properties if not null
|
void |
generateProjectPropertiesFile(boolean overwrite,
java.util.Properties properties,
boolean addDefault) |
java.util.Date |
getConfigCreatedTime() |
java.util.Date |
getConfigLastModifiedTime() |
java.lang.String |
getName() |
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) |
java.io.File |
getPropertyFile() |
boolean |
hasProperty(java.lang.String key) |
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
|
void |
setProjectProperties(java.util.Properties properties)
Set the project properties file contents exactly
|
public static final java.lang.String PROP_FILENAME
public static final java.lang.String ETC_DIR_NAME
public static final org.slf4j.Logger logger
public FrameworkProjectConfig(java.lang.String name,
java.io.File propertyFile,
IFilesystemFramework filesystemFramework)
public static FrameworkProjectConfig create(java.lang.String name, java.io.File propertyFile, IFilesystemFramework filesystemFramework)
name - propertyFile - filesystemFramework - public static FrameworkProjectConfig create(java.lang.String name, java.io.File propertyFile, java.util.Properties properties, IFilesystemFramework filesystemFramework)
name - propertyFile - properties - filesystemFramework - public void mergeProjectProperties(java.util.Properties properties,
java.util.Set<java.lang.String> removePrefixes)
mergeProjectProperties in interface IRundeckProjectConfigModifierproperties - new properties to put in the fileremovePrefixes - prefixes of properties to remove from the filepublic void setProjectProperties(java.util.Properties properties)
setProjectProperties in interface IRundeckProjectConfigModifierproperties - new properties to use in the filepublic void generateProjectPropertiesFile(boolean overwrite,
java.util.Properties properties,
boolean addDefault)
generateProjectPropertiesFile in interface IRundeckProjectConfigModifierpublic java.io.File getPropertyFile()
public java.util.Date getConfigLastModifiedTime()
getConfigLastModifiedTime in interface IRundeckProjectConfigpublic java.util.Date getConfigCreatedTime()
getConfigCreatedTime in interface IRundeckProjectConfigpublic java.util.Map<java.lang.String,java.lang.String> getProperties()
getProperties in interface IRundeckProjectConfigpublic java.util.Map<java.lang.String,java.lang.String> getProjectProperties()
getProjectProperties in interface IRundeckProjectConfigpublic java.lang.String getProperty(java.lang.String name)
getProperty in interface IRundeckProjectConfigname - property namepublic boolean hasProperty(java.lang.String key)
hasProperty in interface IRundeckProjectConfigkey - property namepublic java.lang.String getName()
getName in interface IRundeckProjectConfig