Class FrameworkProjectConfig

    • Field Detail

      • logger

        public static final org.slf4j.Logger logger
    • Constructor Detail

      • FrameworkProjectConfig

        public FrameworkProjectConfig​(java.lang.String name,
                                      java.io.File propertyFile,
                                      IFilesystemFramework filesystemFramework)
    • Method Detail

      • create

        public static FrameworkProjectConfig create​(java.lang.String name,
                                                    java.io.File propertyFile,
                                                    IFilesystemFramework filesystemFramework)
        Create from existing file
        Parameters:
        name -
        propertyFile -
        filesystemFramework -
        Returns:
      • create

        public 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
        Parameters:
        name -
        propertyFile -
        properties -
        filesystemFramework -
        Returns:
      • mergeProjectProperties

        public 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
        Specified by:
        mergeProjectProperties in interface IRundeckProjectConfigModifier
        Parameters:
        properties - new properties to put in the file
        removePrefixes - prefixes of properties to remove from the file
      • setProjectProperties

        public void setProjectProperties​(java.util.Properties properties)
        Set the project properties file contents exactly
        Specified by:
        setProjectProperties in interface IRundeckProjectConfigModifier
        Parameters:
        properties - new properties to use in the file
      • getPropertyFile

        public java.io.File getPropertyFile()
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.String> getProperties()
        Specified by:
        getProperties in interface IRundeckProjectConfig
        Returns:
        the merged properties available for the project
      • getProjectProperties

        public java.util.Map<java.lang.String,​java.lang.String> getProjectProperties()
        Specified by:
        getProjectProperties in interface IRundeckProjectConfig
        Returns:
        the direct properties set for the project
      • getProperty

        public java.lang.String getProperty​(java.lang.String name)
        Specified by:
        getProperty in interface IRundeckProjectConfig
        Parameters:
        name - property name
        Returns:
        the property value by name
      • hasProperty

        public boolean hasProperty​(java.lang.String key)
        Specified by:
        hasProperty in interface IRundeckProjectConfig
        Parameters:
        key - property name
        Returns:
        true if present, false otherwise