Class CustomOrDefaultApplicationInstaller

java.lang.Object
org.bonitasoft.engine.api.impl.application.installer.CustomOrDefaultApplicationInstaller

@Component public class CustomOrDefaultApplicationInstaller extends Object
Install custom application if one exists under a specific folder. If none, install default provided applications.
This installer listens to the event PlatformStartedEvent to ensure the platform is started before launching any application installation.
  • Field Details

    • CUSTOM_APPLICATION_DEFAULT_FOLDER

      public static final String CUSTOM_APPLICATION_DEFAULT_FOLDER
      See Also:
    • applicationInstallFolder

      @Value("${bonita.runtime.custom-application.install-folder:my-application}") protected String applicationInstallFolder
    • applicationInstaller

      protected final ApplicationInstallerImpl applicationInstaller
    • cpResourceResolver

      protected final org.springframework.core.io.support.ResourcePatternResolver cpResourceResolver
  • Constructor Details

    • CustomOrDefaultApplicationInstaller

      public CustomOrDefaultApplicationInstaller()
  • Method Details

    • autoDeployDetectedCustomApplication

      @EventListener public void autoDeployDetectedCustomApplication(PlatformStartedEvent event) throws Exception
      Throws:
      Exception
    • getResourceFromClasspath

      protected static org.springframework.core.io.Resource getResourceFromClasspath(org.springframework.core.io.Resource[] resources, String type) throws IOException, org.bonitasoft.engine.exception.ApplicationInstallationException
      Throws:
      IOException
      org.bonitasoft.engine.exception.ApplicationInstallationException
    • createApplicationArchive

      protected ApplicationArchive createApplicationArchive(org.springframework.core.io.Resource customApplication)
    • detectConfigurationFile

      protected Optional<org.springframework.core.io.Resource> detectConfigurationFile() throws IOException
      Throws:
      IOException
    • findAndUpdateConfiguration

      protected void findAndUpdateConfiguration() throws org.bonitasoft.engine.exception.ApplicationInstallationException, IOException
      Throws:
      org.bonitasoft.engine.exception.ApplicationInstallationException
      IOException