Class CustomOrDefaultApplicationInstaller
java.lang.Object
org.bonitasoft.engine.api.impl.application.installer.CustomOrDefaultApplicationInstaller
Install custom application if one exists under a specific folder. If none, install default provided applications.
This installer listens to the event
This installer listens to the event
PlatformStartedEvent to ensure the platform is started before launching
any application installation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ApplicationInstallerImplprotected Stringprotected final org.springframework.core.io.support.ResourcePatternResolverstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected ApplicationArchivecreateApplicationArchive(org.springframework.core.io.Resource customApplication) protected Optional<org.springframework.core.io.Resource>protected voidprotected static org.springframework.core.io.ResourcegetResourceFromClasspath(org.springframework.core.io.Resource[] resources, String type)
-
Field Details
-
CUSTOM_APPLICATION_DEFAULT_FOLDER
- See Also:
-
applicationInstallFolder
@Value("${bonita.runtime.custom-application.install-folder:my-application}") protected String applicationInstallFolder -
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:
IOExceptionorg.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.ApplicationInstallationExceptionIOException
-