Class CustomOrDefaultApplicationInstaller


  • @Component
    public class CustomOrDefaultApplicationInstaller
    extends java.lang.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 Detail

      • CUSTOM_APPLICATION_DEFAULT_FOLDER

        public static final java.lang.String CUSTOM_APPLICATION_DEFAULT_FOLDER
        See Also:
        Constant Field Values
      • applicationInstallFolder

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

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

      • CustomOrDefaultApplicationInstaller

        public CustomOrDefaultApplicationInstaller()
    • Method Detail

      • autoDeployDetectedCustomApplication

        @EventListener
        public void autoDeployDetectedCustomApplication​(PlatformStartedEvent event)
                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getResourceFromClasspath

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

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

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

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