Пример #1
0
 /**
  * @see Environment
  * @param key directory system key
  * @return Directory denoted by key
  * @since 5.4.2
  */
 public File getDirectory(String key) {
   if (org.nuxeo.common.Environment.NUXEO_DATA_DIR.equals(key)) {
     return getDataDir();
   } else if (org.nuxeo.common.Environment.NUXEO_LOG_DIR.equals(key)) {
     return getLogDir();
   } else if (org.nuxeo.common.Environment.NUXEO_PID_DIR.equals(key)) {
     return getPidDir();
   } else if (org.nuxeo.common.Environment.NUXEO_TMP_DIR.equals(key)) {
     return getTmpDir();
   } else {
     log.error("Unknown directory key: " + key);
     return null;
   }
 }
Пример #2
0
 /**
  * @see Environment
  * @param key directory system key
  * @param directory absolute or relative directory path
  * @since 5.4.2
  */
 public void setDirectory(String key, String directory) {
   String absoluteDirectory = setAbsolutePath(key, directory);
   if (org.nuxeo.common.Environment.NUXEO_DATA_DIR.equals(key)) {
     setDataDir(absoluteDirectory);
   } else if (org.nuxeo.common.Environment.NUXEO_LOG_DIR.equals(key)) {
     setLogDir(absoluteDirectory);
   } else if (org.nuxeo.common.Environment.NUXEO_PID_DIR.equals(key)) {
     setPidDir(absoluteDirectory);
   } else if (org.nuxeo.common.Environment.NUXEO_TMP_DIR.equals(key)) {
     setTmpDir(absoluteDirectory);
   } else {
     log.error("Unknown directory key: " + key);
   }
 }