Class DefaultBootstrapManager

  • All Implemented Interfaces:
    BootstrapManager, com.atlassian.config.bootstrap.AtlassianBootstrapManager

    public class DefaultBootstrapManager
    extends com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
    implements BootstrapManager
    BootstrapManager is responsible for initializing the dependencies of Bamboo environment.
    1. Initializing the Bamboo environment, beginning with loading both bamboo.cfg.xml from the bamboo.home property and the bamboo-shared.cfg.xml from the bamboo.shared.home, both specified in bamboo-init.properties.
    2. Delegating, monitoring, and answering all client requests concerning Bamboo initialization routines.
    3. Providing the SetupPersister with whatever resources it needs to let a user bootstrapManager Bamboo.
    • Constructor Detail

      • DefaultBootstrapManager

        public DefaultBootstrapManager()
    • Method Detail

      • afterConfigurationLoaded

        protected void afterConfigurationLoaded()
                                         throws com.atlassian.config.ConfigurationException
        Overrides:
        afterConfigurationLoaded in class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
        Throws:
        com.atlassian.config.ConfigurationException
      • initializeBuildNumberIfRequired

        public boolean initializeBuildNumberIfRequired()
                                                throws com.atlassian.config.ConfigurationException
        Specified by:
        initializeBuildNumberIfRequired in interface BootstrapManager
        Throws:
        com.atlassian.config.ConfigurationException
      • initializeBuildNumberIfRequired

        protected boolean initializeBuildNumberIfRequired​(@NotNull
                                                          @NotNull Supplier<String> currentBuildNumberSupplier)
                                                   throws com.atlassian.config.ConfigurationException
        Throws:
        com.atlassian.config.ConfigurationException
      • getConfigDirectory

        public String getConfigDirectory()
        Description copied from interface: BootstrapManager
        Gets the directory where Bamboo's administration.xml file sits
        Specified by:
        getConfigDirectory in interface BootstrapManager
        Returns:
        String representing the path to the folder. Null if not configured
      • getBuildWorkingDirectory

        public String getBuildWorkingDirectory()
        Description copied from interface: BootstrapManager
        This method returns the root directory underneath which the build directories are located. The structure below this directory is not documented - you most likely do not want to use this method, consider using DefaultBuildDirectoryManager methods instead.
        Specified by:
        getBuildWorkingDirectory in interface BootstrapManager
      • getArtifactsDirectory

        public String getArtifactsDirectory()
        Description copied from interface: BootstrapManager
        This method returns the root directory underneath which the artifacts are stored. The structure below this directory is not documented - you most likely do not want to use this method, consider using com.atlassian.bamboo.fileserver.SystemDirectory methods instead.
        Specified by:
        getArtifactsDirectory in interface BootstrapManager
      • getBuildDirectory

        public String getBuildDirectory()
        Description copied from interface: BootstrapManager
        Gets the directory where Bamboo's build files sit. This includes artifacts and the like
        Specified by:
        getBuildDirectory in interface BootstrapManager
        Returns:
        String representing the path to the folder. Null if not configured
      • publishConfiguration

        public void publishConfiguration()
        Specified by:
        publishConfiguration in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
        Overrides:
        publishConfiguration in class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
      • performPersistenceUpgrade

        protected boolean performPersistenceUpgrade()
        Overrides:
        performPersistenceUpgrade in class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
      • postBootstrapDatabase

        protected void postBootstrapDatabase()
                                      throws com.atlassian.config.bootstrap.BootstrapException
        Overrides:
        postBootstrapDatabase in class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
        Throws:
        com.atlassian.config.bootstrap.BootstrapException
      • getDbUrl

        protected String getDbUrl​(com.atlassian.config.db.DatabaseDetails dbDetails)
        Overrides:
        getDbUrl in class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
      • initializeServerKey

        public boolean initializeServerKey()
        Description copied from interface: BootstrapManager
        Initializes server key used for BambooEntityOids of this Bamboo instance based on server ID. Does nothing if the server key is already configured. This method should be externally synchronized.
        Specified by:
        initializeServerKey in interface BootstrapManager
        Returns:
        true if server key has been initialized, false otherwise
      • setH2Version

        public void setH2Version​(String h2Version)
                          throws com.atlassian.config.ConfigurationException
        Specified by:
        setH2Version in interface BootstrapManager
        Throws:
        com.atlassian.config.ConfigurationException