Package org.bonitasoft.engine.home
Class BonitaHomeServer
- java.lang.Object
-
- org.bonitasoft.engine.home.BonitaHomeServer
-
public class BonitaHomeServer extends java.lang.Object
Retrieve configuration files from database and from classpath
-
-
Field Summary
Fields Modifier and Type Field Description static BonitaHomeServer
INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteTenant(long tenantId)
java.util.Map<java.lang.String,byte[]>
getClientPlatformConfigurations()
static BonitaHomeServer
getInstance()
java.io.File
getLicensesFolder()
java.net.URI
getLocalTemporaryFolder(java.lang.String artifactType, long artifactId)
java.util.List<org.bonitasoft.platform.configuration.model.BonitaConfiguration>
getPlatformConfiguration()
java.util.Properties
getPlatformProperties()
Properties inheritance is defined like that: platform properties in database overrides platform properties in classpathjava.io.File
getPlatformTempFile(java.lang.String fileName)
java.util.Properties
getPropertiesFromClassPath(java.lang.String... files)
java.io.File
getSecurityScriptsFolder(long tenantId)
java.lang.String
getServerAPIImplementation()
get the name of the implementation ofServerAPI
based on the current configuration ofbonita-platform.properties
java.util.List<org.bonitasoft.platform.configuration.model.BonitaConfiguration>
getTenantConfiguration(long tenantId)
byte[]
getTenantPortalConfiguration(long tenantId, java.lang.String file)
java.util.Map<java.lang.String,byte[]>
getTenantPortalConfigurations(long tenantId)
java.util.Properties
getTenantProperties(long tenantId)
Properties inheritance is defined like that: tenant properties in database overrides tenant properties in classpath tenant properties in classpath overrides platform properties in database platform properties in database overrides platform properties in classpathTenantStorage
getTenantStorage()
void
modifyTechnicalUser(long tenantId, java.lang.String userName, java.lang.String password)
void
updateTenantPortalConfigurationFile(long tenantId, java.lang.String file, byte[] content)
-
-
-
Field Detail
-
INSTANCE
public static final BonitaHomeServer INSTANCE
-
-
Method Detail
-
getInstance
public static BonitaHomeServer getInstance()
-
getPlatformProperties
public java.util.Properties getPlatformProperties() throws java.io.IOException
Properties inheritance is defined like that:- 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:- tenant properties in database overrides tenant properties in classpath
- tenant properties in classpath overrides platform properties in database
- 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
-
getTenantStorage
public TenantStorage getTenantStorage()
-
getServerAPIImplementation
public java.lang.String getServerAPIImplementation() throws java.lang.IllegalStateException
get the name of the implementation ofServerAPI
based on the current configuration ofbonita-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
-
-