Class CustomOrDefaultApplicationInstaller
- java.lang.Object
-
- org.bonitasoft.engine.api.impl.application.installer.CustomOrDefaultApplicationInstaller
-
@Component public class CustomOrDefaultApplicationInstaller extends java.lang.ObjectInstall custom application if one exists under a specific folder. If none, install default provided applications.
This installer listens to the eventPlatformStartedEventto ensure the platform is started before launching any application installation.
-
-
Field Summary
Fields Modifier and Type Field Description protected ApplicationInstallerapplicationInstallerprotected java.lang.StringapplicationInstallFolderprotected org.springframework.core.io.support.ResourcePatternResolvercpResourceResolverstatic java.lang.StringCUSTOM_APPLICATION_DEFAULT_FOLDER
-
Constructor Summary
Constructors Constructor Description CustomOrDefaultApplicationInstaller()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidautoDeployDetectedCustomApplication(PlatformStartedEvent event)protected ApplicationArchivecreateApplicationArchive(org.springframework.core.io.Resource customApplication)protected java.util.Optional<org.springframework.core.io.Resource>detectConfigurationFile()protected voidfindAndUpdateConfiguration()protected static org.springframework.core.io.ResourcegetResourceFromClasspath(org.springframework.core.io.Resource[] resources, java.lang.String type)
-
-
-
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
-
applicationInstaller
protected final ApplicationInstaller applicationInstaller
-
cpResourceResolver
protected final org.springframework.core.io.support.ResourcePatternResolver cpResourceResolver
-
-
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.IOExceptionorg.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.ApplicationInstallationExceptionjava.io.IOException
-
-