private static List<String> tidyFilePaths(Iterable<String> files) { List<String> result = Lists.newArrayList(); for (String file : files) { result.add(Os.tidyPath(file)); } return result; }
public static String getMgmtBaseDir(StringConfigMap brooklynProperties) { String base = (String) brooklynProperties.getConfigRaw(MGMT_BASE_DIR, true).orNull(); if (base == null) { base = brooklynProperties.getConfig(BROOKLYN_DATA_DIR); if (base != null) log.warn( "Using deprecated " + BROOKLYN_DATA_DIR.getName() + ": use " + MGMT_BASE_DIR.getName() + " instead; value: " + base); } if (base == null) base = brooklynProperties.getConfig(MGMT_BASE_DIR); return Os.tidyPath(base) + File.separator; }
protected static String resolveAgainstBaseDir(StringConfigMap brooklynProperties, String path) { if (!Os.isAbsolutish(path)) path = Os.mergePaths(getMgmtBaseDir(brooklynProperties), path); return Os.tidyPath(path); }
public static String getMgmtBaseDir(Map<String, ?> brooklynProperties) { String base = (String) brooklynProperties.get(MGMT_BASE_DIR.getName()); if (base == null) base = (String) brooklynProperties.get(BROOKLYN_DATA_DIR.getName()); if (base == null) base = MGMT_BASE_DIR.getDefaultValue(); return Os.tidyPath(base) + File.separator; }