private static final String getClientFolder() { final StringBuilder clientPath = new StringBuilder(getBonitaHomeFolder()); clientPath.append(File.separator).append("client"); return clientPath.toString(); }
public static final String getTemporaryFolder() { final StringBuilder tempPath = new StringBuilder(getClientFolder()); tempPath.append(File.separator).append("tmp").append(File.separator).append("engine"); return tempPath.toString(); }
if (resource.getKey().endsWith(".xpdl")) { if (deserializeProcess) { File tempDir = Misc.createDirectories(BonitaConstants.getTemporaryFolder()); File xpdlFile = Misc.createTempFile("xpdl", null, tempDir); Misc.getFile(xpdlFile, resource.getValue()); File tempDir = Misc.createDirectories(BonitaConstants.getTemporaryFolder()); File xmlDefFile = Misc.createTempFile("xmlDef", null, tempDir); Misc.getFile(xmlDefFile, resource.getValue());
if (resource.getKey().endsWith(".xpdl")) { if (deserializeProcess) { File tempDir = Misc.createDirectories(BonitaConstants.getTemporaryFolder()); File xpdlFile = Misc.createTempFile("xpdl", null, tempDir); Misc.getFile(xpdlFile, resource.getValue()); File tempDir = Misc.createDirectories(BonitaConstants.getTemporaryFolder()); File xmlDefFile = Misc.createTempFile("xmlDef", null, tempDir); Misc.getFile(xmlDefFile, resource.getValue());
private static final String getClientFolder() { final StringBuilder clientPath = new StringBuilder(getBonitaHomeFolder()); clientPath.append(File.separator).append("client"); return clientPath.toString(); }
final BufferedReader reader = new BufferedReader(new InputStreamReader(in, BonitaConstants.FILE_ENCONDING)); String line = null; file = Misc.createTempFile("tempProcessDef", ".xml", new File(BonitaConstants.getTemporaryFolder())); final FileOutputStream fos = new FileOutputStream(file); final OutputStream bos = new BufferedOutputStream(fos);
public static final String getTemporaryFolder() { final StringBuilder tempPath = new StringBuilder(getClientFolder()); tempPath.append(File.separator).append("tmp").append(File.separator).append("engine"); return tempPath.toString(); }
private static final String getTenantServerFolder(String domain) { StringBuilder serverPath = new StringBuilder(BonitaConstants.getBonitaHomeFolder()); serverPath.append(File.separator).append("server").append(File.separator).append(domain); return serverPath.toString(); }
final BufferedReader reader = new BufferedReader(new InputStreamReader(in, BonitaConstants.FILE_ENCONDING)); String line = null; file = Misc.createTempFile("tempProcessDef", ".xml", new File(BonitaConstants.getTemporaryFolder())); final FileOutputStream fos = new FileOutputStream(file); final OutputStream bos = new BufferedOutputStream(fos);
public static void populateIndexes(final String domain, final String configurationName, final int nbOfThreadLoad, final int nbOfThreadFetching) throws Exception { System.setProperty(REINDEX_DOMAIN_PROPERTY, domain); SessionFactoryImplementor sessionFactory = null; try { BonitaConstants.getBonitaHomeFolder(); final Configuration cfg = DbTool.getConfiguration(domain, configurationName); if ("true".equals(cfg.getProperty("bonita.search.use"))) { sessionFactory = DbTool.getSessionFactory(domain, configurationName.replaceAll("-configuration", "-session-factory")); if (sessionFactory != null) { populateIndexes(sessionFactory, nbOfThreadLoad, nbOfThreadFetching); } } else { LOG.info(configurationName + "does not support indexing"); } } finally { System.clearProperty(REINDEX_DOMAIN_PROPERTY); closeSession(sessionFactory); } }
@Override public ProcessDefinition getProcessDefinition() { final byte[] processBytes = getResource(PROCESS_RESOURCE_NAME); if (processBytes == null) { return null; } File xmlDefFile = null; try { final File tempDir = Misc.createDirectories(BonitaConstants.getTemporaryFolder()); xmlDefFile = Misc.createTempFile("xmlDef", null, tempDir); Misc.getFile(xmlDefFile, processBytes); final Properties contextProperties = BusinessArchiveFactory.createPropertiesFromResources(getResources()); return ProcessBuilder.createProcessFromXmlDefFile(xmlDefFile.toURL(), contextProperties); } catch (final IOException e) { throw new BonitaRuntimeException(e); } finally { if (xmlDefFile != null) { xmlDefFile.delete(); } } }
BonitaConstants.getBonitaHomeFolder(); final String domain = args[0]; final String db = args[1].toLowerCase();
@Override public ProcessDefinition getProcessDefinition() { final byte[] processBytes = getResource(PROCESS_RESOURCE_NAME); if (processBytes == null) { return null; } File xmlDefFile = null; try { final File tempDir = Misc.createDirectories(BonitaConstants.getTemporaryFolder()); xmlDefFile = Misc.createTempFile("xmlDef", null, tempDir); Misc.getFile(xmlDefFile, processBytes); final Properties contextProperties = BusinessArchiveFactory.createPropertiesFromResources(getResources()); return ProcessBuilder.createProcessFromXmlDefFile(xmlDefFile.toURL(), contextProperties); } catch (final IOException e) { throw new BonitaRuntimeException(e); } finally { if (xmlDefFile != null) { xmlDefFile.delete(); } } }
BonitaConstants.getBonitaHomeFolder(); final Configuration config = getConfiguration(domain, configurationName);
@Override public Object invoke(final Object proxy, final Method method, final Object[] args) throws BonitaException { BonitaConstants.getBonitaHomeFolder(); try {