Class ApplicationInstaller


  • @Component
    @ConditionalOnSingleCandidate(ApplicationInstaller.class)
    public class ApplicationInstaller
    extends java.lang.Object
    Main entry point to deploy an ApplicationArchive.
    Author:
    Baptiste Mesta., Danila Mazour, Haroun El Alami
    • Method Detail

      • install

        public void install​(ApplicationArchive applicationArchive)
                     throws org.bonitasoft.engine.exception.ApplicationInstallationException
        Throws:
        org.bonitasoft.engine.exception.ApplicationInstallationException
      • installArtifacts

        protected java.util.List<java.lang.Long> installArtifacts​(ApplicationArchive applicationArchive,
                                                                  org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • update

        public void update​(ApplicationArchive applicationArchive)
                    throws org.bonitasoft.engine.exception.ApplicationInstallationException
        Throws:
        org.bonitasoft.engine.exception.ApplicationInstallationException
      • resumeTenantInSession

        public void resumeTenantInSession()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • pauseTenantInSession

        public void pauseTenantInSession()
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • updateArtifacts

        protected java.util.List<java.lang.Long> updateArtifacts​(ApplicationArchive applicationArchive,
                                                                 org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • updateApplicationVersion

        public void updateApplicationVersion​(java.lang.String version)
                                      throws org.bonitasoft.platform.exception.PlatformException
        Throws:
        org.bonitasoft.platform.exception.PlatformException
      • disableOldProcesses

        public void disableOldProcesses​(java.util.List<java.lang.Long> installedProcessIds,
                                        org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                 throws org.bonitasoft.engine.exception.SearchException,
                                        SBonitaException,
                                        org.bonitasoft.engine.bpm.process.ProcessDefinitionNotFoundException
        Throws:
        org.bonitasoft.engine.exception.SearchException
        SBonitaException
        org.bonitasoft.engine.bpm.process.ProcessDefinitionNotFoundException
      • enableResolvedProcesses

        public void enableResolvedProcesses​(java.util.List<java.lang.Long> processDefinitionIds,
                                            org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                     throws org.bonitasoft.engine.bpm.process.ProcessDeployException
        Throws:
        org.bonitasoft.engine.bpm.process.ProcessDeployException
      • installOrganization

        protected void installOrganization​(ApplicationArchive applicationArchive,
                                           org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • updateOrganization

        protected void updateOrganization​(ApplicationArchive applicationArchive,
                                          org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • installBusinessDataModel

        protected void installBusinessDataModel​(ApplicationArchive applicationArchive)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • updateBusinessDataModel

        protected java.lang.String updateBusinessDataModel​(ApplicationArchive applicationArchive)
                                                    throws org.bonitasoft.engine.business.data.InvalidBusinessDataModelException,
                                                           org.bonitasoft.engine.business.data.BusinessDataRepositoryDeploymentException
        Throws:
        org.bonitasoft.engine.business.data.InvalidBusinessDataModelException
        org.bonitasoft.engine.business.data.BusinessDataRepositoryDeploymentException
      • uninstallBusinessDataModel

        protected void uninstallBusinessDataModel()
                                           throws org.bonitasoft.engine.business.data.BusinessDataRepositoryDeploymentException
        Throws:
        org.bonitasoft.engine.business.data.BusinessDataRepositoryDeploymentException
      • installBusinessDataModel

        protected java.lang.String installBusinessDataModel​(byte[] zip)
                                                     throws org.bonitasoft.engine.business.data.InvalidBusinessDataModelException,
                                                            org.bonitasoft.engine.business.data.BusinessDataRepositoryDeploymentException
        Throws:
        org.bonitasoft.engine.business.data.InvalidBusinessDataModelException
        org.bonitasoft.engine.business.data.BusinessDataRepositoryDeploymentException
      • installLivingApplications

        protected void installLivingApplications​(ApplicationArchive applicationArchive,
                                                 org.bonitasoft.engine.api.result.ExecutionResult executionResult,
                                                 org.bonitasoft.engine.business.application.ApplicationImportPolicy policy)
                                          throws org.bonitasoft.engine.exception.AlreadyExistsException,
                                                 org.bonitasoft.engine.exception.ImportException,
                                                 org.bonitasoft.engine.exception.ApplicationInstallationException
        Throws:
        org.bonitasoft.engine.exception.AlreadyExistsException
        org.bonitasoft.engine.exception.ImportException
        org.bonitasoft.engine.exception.ApplicationInstallationException
      • installOrUpdatePages

        protected void installOrUpdatePages​(ApplicationArchive applicationArchive,
                                            org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                     throws java.io.IOException,
                                            org.bonitasoft.engine.exception.BonitaException
        Throws:
        java.io.IOException
        org.bonitasoft.engine.exception.BonitaException
      • installOrUpdateLayouts

        protected void installOrUpdateLayouts​(ApplicationArchive applicationArchive,
                                              org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                       throws java.io.IOException,
                                              org.bonitasoft.engine.exception.BonitaException
        Throws:
        java.io.IOException
        org.bonitasoft.engine.exception.BonitaException
      • installOrUpdateThemes

        protected void installOrUpdateThemes​(ApplicationArchive applicationArchive,
                                             org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                      throws java.io.IOException,
                                             org.bonitasoft.engine.exception.BonitaException
        Throws:
        java.io.IOException
        org.bonitasoft.engine.exception.BonitaException
      • installOrUpdateRestApiExtensions

        protected void installOrUpdateRestApiExtensions​(ApplicationArchive applicationArchive,
                                                        org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                                 throws java.io.IOException,
                                                        org.bonitasoft.engine.exception.BonitaException
        Throws:
        java.io.IOException
        org.bonitasoft.engine.exception.BonitaException
      • installUnitPage

        protected void installUnitPage​(java.io.File pageFile,
                                       java.lang.String precisePageType,
                                       org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                throws java.io.IOException,
                                       org.bonitasoft.engine.exception.BonitaException
        From the Engine perspective, all custom pages, layouts, themes, custom Rest APIs are of type Page
        Throws:
        java.io.IOException
        org.bonitasoft.engine.exception.BonitaException
      • installProcesses

        protected java.util.List<java.lang.Long> installProcesses​(ApplicationArchive applicationArchive,
                                                                  org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                                           throws org.bonitasoft.engine.bpm.bar.InvalidBusinessArchiveFormatException,
                                                                  java.io.IOException,
                                                                  org.bonitasoft.engine.bpm.process.ProcessDeployException
        Throws:
        org.bonitasoft.engine.bpm.bar.InvalidBusinessArchiveFormatException
        java.io.IOException
        org.bonitasoft.engine.bpm.process.ProcessDeployException
      • updateConfiguration

        public void updateConfiguration​(java.io.File configurationFileArchive,
                                        org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                 throws java.lang.Exception
        Update configuration with the given bconf file
        Parameters:
        configurationFileArchive - A bconf file
        executionResult -
        Throws:
        java.lang.Exception
      • deployProcess

        protected java.lang.Long deployProcess​(org.bonitasoft.engine.bpm.bar.BusinessArchive businessArchive,
                                               org.bonitasoft.engine.api.result.ExecutionResult executionResult)
                                        throws org.bonitasoft.engine.bpm.process.ProcessDeployException
        Throws:
        org.bonitasoft.engine.bpm.process.ProcessDeployException
      • inSession

        public <T> T inSession​(java.util.concurrent.Callable<T> callable)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • inTransaction

        protected <T> T inTransaction​(java.util.concurrent.Callable<T> callable)
                               throws org.bonitasoft.engine.exception.ApplicationInstallationException
        Throws:
        org.bonitasoft.engine.exception.ApplicationInstallationException