public void createTenant(final long tenantId) { getConfigurationService().storeTenantEngineConf(getConfigurationService().getTenantTemplateEngineConf(), tenantId); getConfigurationService().storeTenantSecurityScripts(getConfigurationService().getTenantTemplateSecurityScripts(), tenantId); getConfigurationService().storeTenantPortalConf(getConfigurationService().getTenantTemplatePortalConf(), tenantId); }
public void createTenant(final long tenantId) { getConfigurationService().storeTenantEngineConf(getConfigurationService().getTenantTemplateEngineConf(), tenantId); getConfigurationService().storeTenantSecurityScripts(getConfigurationService().getTenantTemplateSecurityScripts(), tenantId); getConfigurationService().storeTenantPortalConf(getConfigurationService().getTenantTemplatePortalConf(), tenantId); }
public Properties getTenantProperties(long tenantId) throws IOException { Properties allProperties = mergeProperties(getPropertiesFromClassPath("bonita-tenant-community.properties", "bonita-tenant-private-community.properties", "bonita-tenant-sp.properties", "bonita-tenant-sp-cluster.properties"), getConfigurationService().getTenantEngineConf(tenantId)); allProperties.setProperty("tenantId", String.valueOf(tenantId)); return allProperties; }
public Map<String, byte[]> getClientTenantConfigurations(long tenantId) { List<BonitaConfiguration> platformPortalConf = getConfigurationService().getTenantPortalConf(tenantId); HashMap<String, byte[]> map = new HashMap<>(); for (BonitaConfiguration bonitaConfiguration : platformPortalConf) { map.put(bonitaConfiguration.getResourceName(), bonitaConfiguration.getResourceContent()); } return map; }
public void updateTenantPortalConfigurationFile(long tenantId, String file, byte[] content) throws UpdateException { List<BonitaConfiguration> tenantPortalConf = getConfigurationService().getTenantPortalConf(tenantId); for (BonitaConfiguration bonitaConfiguration : tenantPortalConf) { if (bonitaConfiguration.getResourceName().equals(file)) { bonitaConfiguration.setResourceContent(content); getConfigurationService().storeTenantPortalConf(Collections.singletonList(bonitaConfiguration), tenantId); return; } } throw new UpdateException("unable to update the configuration file " + file + " because it does not exists"); }
public Map<String, byte[]> getClientPlatformConfigurations() { List<BonitaConfiguration> platformPortalConf = getConfigurationService().getPlatformPortalConf(); HashMap<String, byte[]> map = new HashMap<>(); for (BonitaConfiguration bonitaConfiguration : platformPortalConf) { map.put(bonitaConfiguration.getResourceName(), bonitaConfiguration.getResourceContent()); } return map; }
public void updateTenantPortalConfigurationFile(long tenantId, String file, byte[] content) throws UpdateException { List<BonitaConfiguration> tenantPortalConf = getConfigurationService().getTenantPortalConf(tenantId); for (BonitaConfiguration bonitaConfiguration : tenantPortalConf) { if (bonitaConfiguration.getResourceName().equals(file)) { bonitaConfiguration.setResourceContent(content); getConfigurationService().storeTenantPortalConf(Collections.singletonList(bonitaConfiguration), tenantId); return; } } throw new UpdateException("unable to update the configuration file " + file + " because it does not exists"); }
public Map<String, byte[]> getClientPlatformConfigurations() { List<BonitaConfiguration> platformPortalConf = getConfigurationService().getPlatformPortalConf(); HashMap<String, byte[]> map = new HashMap<>(); for (BonitaConfiguration bonitaConfiguration : platformPortalConf) { map.put(bonitaConfiguration.getResourceName(), bonitaConfiguration.getResourceContent()); } return map; }
public Properties getTenantProperties(long tenantId) throws IOException { Properties allProperties = mergeProperties(getPropertiesFromClassPath("bonita-tenant-community.properties", "bonita-tenant-private-community.properties", "bonita-tenant-sp.properties", "bonita-tenant-sp-cluster.properties"), getConfigurationService().getTenantEngineConf(tenantId)); allProperties.setProperty("tenantId", String.valueOf(tenantId)); return allProperties; }
public Map<String, byte[]> getClientTenantConfigurations(long tenantId) { List<BonitaConfiguration> platformPortalConf = getConfigurationService().getTenantPortalConf(tenantId); HashMap<String, byte[]> map = new HashMap<>(); for (BonitaConfiguration bonitaConfiguration : platformPortalConf) { map.put(bonitaConfiguration.getResourceName(), bonitaConfiguration.getResourceContent()); } return map; }
public List<BonitaConfiguration> getTenantConfiguration(long tenantId) throws IOException { return getAllXmlConfiguration(getConfigurationService().getTenantEngineConf(tenantId)); }
public byte[] getTenantPortalConfiguration(long tenantId, String file) { return getConfigurationService().getTenantPortalConfiguration(tenantId, file).getResourceContent(); }
public List<BonitaConfiguration> getPlatformInitConfiguration() throws IOException { return getAllXmlConfiguration(getConfigurationService().getPlatformInitEngineConf()); }
public List<BonitaConfiguration> getTenantConfiguration(long tenantId) throws IOException { return getAllXmlConfiguration(getConfigurationService().getTenantEngineConf(tenantId)); }
public List<BonitaConfiguration> getPlatformInitConfiguration() throws IOException { return getAllXmlConfiguration(getConfigurationService().getPlatformInitEngineConf()); }
public byte[] getTenantPortalConfiguration(long tenantId, String file) { return getConfigurationService().getTenantPortalConfiguration(tenantId, file).getResourceContent(); }
public Properties getPlatformProperties() throws IOException { return mergeProperties(getPropertiesFromClassPath("bonita-platform-community.properties", "bonita-platform-private-community.properties", "bonita-platform-private-sp.properties", "bonita-platform-sp.properties", "bonita-platform-sp-cluster.properties"), getConfigurationService().getPlatformEngineConf()); }
public Properties getPlatformProperties() throws IOException { return mergeProperties(getPropertiesFromClassPath("bonita-platform-community.properties", "bonita-platform-private-community.properties", "bonita-platform-private-sp.properties", "bonita-platform-sp.properties", "bonita-platform-sp-cluster.properties"), getConfigurationService().getPlatformEngineConf()); }
public File getSecurityScriptsFolder(long tenantId) throws BonitaHomeNotSetException, IOException { final Folder localFolder = getFolder(getPlatformTempFolder(), "security-scripts").createIfNotExists(); final Folder tenantSecurityScriptsFolder = getFolder(localFolder, String.valueOf(tenantId)).createIfNotExists(); List<BonitaConfiguration> tenantSecurityScripts = getConfigurationService().getTenantSecurityScripts(tenantId); writeBonitaConfiguration(tenantSecurityScriptsFolder.getFile(), tenantSecurityScripts); return tenantSecurityScriptsFolder.getFile(); }
public File getSecurityScriptsFolder(long tenantId) throws BonitaHomeNotSetException, IOException { final Folder localFolder = getFolder(getPlatformTempFolder(), "security-scripts").createIfNotExists(); final Folder tenantSecurityScriptsFolder = getFolder(localFolder, String.valueOf(tenantId)).createIfNotExists(); List<BonitaConfiguration> tenantSecurityScripts = getConfigurationService().getTenantSecurityScripts(tenantId); writeBonitaConfiguration(tenantSecurityScriptsFolder.getFile(), tenantSecurityScripts); return tenantSecurityScriptsFolder.getFile(); }