Package org.bonitasoft.engine.home
Class BonitaHomeServer
- java.lang.Object
-
- org.bonitasoft.engine.home.BonitaHomeServer
-
public class BonitaHomeServer extends java.lang.ObjectRetrieve configuration files from database and from classpath
-
-
Field Summary
Fields Modifier and Type Field Description static BonitaHomeServerINSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateTenant(long tenantId)voiddeleteTenant(long tenantId)java.util.Map<java.lang.String,byte[]>getClientPlatformConfigurations()static BonitaHomeServergetInstance()java.io.FilegetLicensesFolder()java.net.URIgetLocalTemporaryFolder(java.lang.String artifactType, long artifactId)java.util.List<org.bonitasoft.platform.configuration.model.BonitaConfiguration>getPlatformConfiguration()java.util.List<org.bonitasoft.platform.configuration.model.BonitaConfiguration>getPlatformInitConfiguration()java.util.PropertiesgetPlatformProperties()Properties inheritance is defined like that: platform properties in database overrides platform properties in classpathjava.io.FilegetPlatformTempFile(java.lang.String fileName)java.util.PropertiesgetPropertiesFromClassPath(java.lang.String... files)java.io.FilegetSecurityScriptsFolder(long tenantId)java.lang.StringgetServerAPIImplementation()get the name of the implementation ofServerAPIbased on the current configuration ofbonita-platform.propertiesjava.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.PropertiesgetTenantProperties(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 classpathTenantStoragegetTenantStorage()voidmodifyTechnicalUser(long tenantId, java.lang.String userName, java.lang.String password)voidupdateTenantPortalConfigurationFile(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.IOExceptionProperties 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.IOExceptionProperties 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
-
getPlatformInitConfiguration
public java.util.List<org.bonitasoft.platform.configuration.model.BonitaConfiguration> getPlatformInitConfiguration() 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.IllegalStateExceptionget the name of the implementation ofServerAPIbased 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
-
createTenant
public void createTenant(long tenantId)
-
deleteTenant
public void deleteTenant(long tenantId) throws org.bonitasoft.engine.exception.BonitaHomeNotSetException, java.io.IOException- Throws:
org.bonitasoft.engine.exception.BonitaHomeNotSetExceptionjava.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.BonitaHomeNotSetExceptionjava.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
-
-