Class BonitaHomeServer


  • public class BonitaHomeServer
    extends java.lang.Object
    Retrieve configuration files from database and from classpath
    • Method Detail

      • getPlatformProperties

        public java.util.Properties getPlatformProperties()
                                                   throws java.io.IOException
        Properties inheritance is defined like that:
        1. platform properties in database overrides platform properties in classpath
        Throws:
        java.io.IOException
      • getTenantProperties

        public java.util.Properties getTenantProperties​(long tenantId)
                                                 throws java.io.IOException
        Properties inheritance is defined like that:
        1. tenant properties in database overrides tenant properties in classpath
        2. tenant properties in classpath overrides platform properties in database
        3. platform properties in database overrides platform properties in classpath
        Throws:
        java.io.IOException
      • getPropertiesFromClassPath

        public java.util.Properties getPropertiesFromClassPath​(java.lang.String... files)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • getPlatformConfiguration

        public java.util.List<org.bonitasoft.platform.configuration.model.BonitaConfiguration> getPlatformConfiguration()
                                                                                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • getTenantConfiguration

        public java.util.List<org.bonitasoft.platform.configuration.model.BonitaConfiguration> getTenantConfiguration​(long tenantId)
                                                                                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • getServerAPIImplementation

        public java.lang.String getServerAPIImplementation()
                                                    throws java.lang.IllegalStateException
        get the name of the implementation of ServerAPI based on the current configuration of bonita-platform.properties
        Returns:
        the name of the class implementing ServerAPI
        Throws:
        java.lang.IllegalStateException - if the name of the implementation cannot be retrieved
      • getPlatformTempFile

        public java.io.File getPlatformTempFile​(java.lang.String fileName)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • getLicensesFolder

        public java.io.File getLicensesFolder()
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getLocalTemporaryFolder

        public java.net.URI getLocalTemporaryFolder​(java.lang.String artifactType,
                                                    long artifactId)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • deleteTenant

        public void deleteTenant​(long tenantId)
                          throws org.bonitasoft.engine.exception.BonitaHomeNotSetException,
                                 java.io.IOException
        Throws:
        org.bonitasoft.engine.exception.BonitaHomeNotSetException
        java.io.IOException
      • modifyTechnicalUser

        public void modifyTechnicalUser​(long tenantId,
                                        java.lang.String userName,
                                        java.lang.String password)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • getSecurityScriptsFolder

        public java.io.File getSecurityScriptsFolder​(long tenantId)
                                              throws org.bonitasoft.engine.exception.BonitaHomeNotSetException,
                                                     java.io.IOException
        Throws:
        org.bonitasoft.engine.exception.BonitaHomeNotSetException
        java.io.IOException
      • getClientPlatformConfigurations

        public java.util.Map<java.lang.String,​byte[]> getClientPlatformConfigurations()
      • getTenantPortalConfigurations

        public java.util.Map<java.lang.String,​byte[]> getTenantPortalConfigurations​(long tenantId)
      • getTenantPortalConfiguration

        public byte[] getTenantPortalConfiguration​(long tenantId,
                                                   java.lang.String file)
      • updateTenantPortalConfigurationFile

        public void updateTenantPortalConfigurationFile​(long tenantId,
                                                        java.lang.String file,
                                                        byte[] content)
                                                 throws org.bonitasoft.engine.exception.UpdateException
        Throws:
        org.bonitasoft.engine.exception.UpdateException