org.nuxeo.common.Environment.getRuntimeHome()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中org.nuxeo.common.Environment.getRuntimeHome()方法的一些代码示例,展示了Environment.getRuntimeHome()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Environment.getRuntimeHome()方法的具体详情如下:
包路径:org.nuxeo.common.Environment
类名称:Environment
方法名:getRuntimeHome

Environment.getRuntimeHome介绍

暂无

代码示例

代码示例来源:origin: org.nuxeo.common/nuxeo-common

  1. /**
  2. * Resolve the path against {@link Environment#runtimeHome} if not absolute.
  3. *
  4. * @since 8.1
  5. */
  6. public void setData(String data) {
  7. setData(getRuntimeHome().toPath().resolve(data).toFile());
  8. }

代码示例来源:origin: org.nuxeo.common/nuxeo-common

  1. /**
  2. * Resolve the path against {@link Environment#runtimeHome} if not absolute.
  3. *
  4. * @since 8.1
  5. */
  6. public void setConfig(String config) {
  7. File configFile = getRuntimeHome().toPath().resolve(config).toFile();
  8. setConfig(configFile);
  9. }

代码示例来源:origin: org.nuxeo.common/nuxeo-common

  1. /**
  2. * Resolve the path against {@link Environment#runtimeHome} if not absolute.
  3. *
  4. * @since 8.1
  5. */
  6. public void setWeb(String web) {
  7. setWeb(getRuntimeHome().toPath().resolve(web).toFile());
  8. }

代码示例来源:origin: org.nuxeo.runtime/nuxeo-runtime-osgi

  1. /**
  2. * @since 5.5
  3. * @return Environment summary
  4. */
  5. protected static StringBuilder getStartMessage() {
  6. String newline = System.getProperty("line.separator");
  7. Environment env = Environment.getDefault();
  8. String hr = "======================================================================";
  9. StringBuilder msg = new StringBuilder(newline);
  10. msg.append(hr).append(newline);
  11. msg.append("= Starting Nuxeo Framework").append(newline);
  12. msg.append(hr).append(newline);
  13. msg.append(" * Server home = ").append(env.getServerHome()).append(newline);
  14. msg.append(" * Runtime home = ").append(env.getRuntimeHome()).append(newline);
  15. msg.append(" * Data Directory = ").append(env.getData()).append(newline);
  16. msg.append(" * Log Directory = ").append(env.getLog()).append(newline);
  17. msg.append(" * Configuration Directory = ").append(env.getConfig()).append(newline);
  18. msg.append(" * Temp Directory = ").append(env.getTemp()).append(newline);
  19. msg.append(hr);
  20. return msg;
  21. }
  22. }

代码示例来源:origin: org.nuxeo.runtime/nuxeo-runtime-reload

  1. @Override
  2. public void runDeploymentPreprocessor() throws IOException {
  3. log.info("Start running deployment preprocessor");
  4. String rootPath = Environment.getDefault().getRuntimeHome().getAbsolutePath();
  5. File root = new File(rootPath);
  6. DeploymentPreprocessor processor = new DeploymentPreprocessor(root);
  7. // initialize
  8. processor.init();
  9. // and predeploy
  10. processor.predeploy();
  11. log.info("Deployment preprocessing done");
  12. }

代码示例来源:origin: org.nuxeo.runtime/nuxeo-connect-standalone

  1. public AbstractTask(PackageUpdateService pus) {
  2. service = pus;
  3. env = new HashMap<>();
  4. Environment nxenv = Environment.getDefault();
  5. File serverHome = nxenv.getServerHome();
  6. File nxHome = nxenv.getRuntimeHome();
  7. File config = nxenv.getConfig();
  8. serverPathPrefix = serverHome.getAbsolutePath();
  9. if (!serverPathPrefix.endsWith(File.separator)) {
  10. serverPathPrefix = serverPathPrefix.concat(File.separator);
  11. }
  12. env.put(ENV_SERVER_HOME, serverHome.getAbsolutePath());
  13. env.put(ENV_HOME, nxHome.getAbsolutePath());
  14. env.put(ENV_CONFIG, config.getAbsolutePath());
  15. env.put(ENV_HOSTAPP_NAME, nxenv.getHostApplicationName());
  16. env.put(ENV_HOSTAPP_VERSION, nxenv.getHostApplicationVersion());
  17. env.put(ENV_SYSLIB, new File(serverHome, "lib").getAbsolutePath());
  18. if (nxenv.isJBoss()) {
  19. File ear = config.getParentFile();
  20. env.put(ENV_EAR, ear.getAbsolutePath());
  21. env.put(ENV_LIB, new File(ear, "lib").getAbsolutePath());
  22. env.put(ENV_BUNDLES, new File(ear, "bundles").getAbsolutePath());
  23. } else {
  24. env.put(ENV_LIB, new File(nxHome, "lib").getAbsolutePath());
  25. env.put(ENV_BUNDLES, new File(nxHome, "bundles").getAbsolutePath());
  26. }
  27. env.put(ENV_TEMPLATES, new File(serverHome, "templates").getAbsolutePath());
  28. env.put(ENV_TIMESTAMP, new SimpleDateFormat("yyMMddHHmmss").format(new Date()));
  29. updateMgr = new UpdateManager(serverHome, service.getRegistry());
  30. }

代码示例来源:origin: org.nuxeo.runtime/nuxeo-runtime-osgi

  1. env = new Environment(home);
  2. if (!home.equals(env.getRuntimeHome())) {
  3. env.setRuntimeHome(home);

相关文章