/** * Finds the properties that apply to location, stripping off the prefixes. * * Order of preference (in ascending order) is: * <ol> * <li>brooklyn.location.* * <li>brooklyn.location.provider.* * <li>brooklyn.location.named.namedlocation.* * </ol> * <p> * Converts deprecated hyphenated properties to the non-deprecated camelCase format. */ public Map<String, Object> getLocationProperties(String provider, String namedLocation, Map<String, ?> properties) { ConfigBag result = ConfigBag.newInstance(); if (!Strings.isNullOrEmpty(provider)) result.put(LocationConfigKeys.CLOUD_PROVIDER, provider); // named properties are preferred over providerOrApi properties result.putAll(transformDeprecated(getGenericLocationSingleWordProperties(properties))); if (!Strings.isNullOrEmpty(provider)) result.putAll(transformDeprecated(getScopedLocationProperties(provider, properties))); if (!Strings.isNullOrEmpty(namedLocation)) result.putAll(transformDeprecated(getNamedLocationProperties(namedLocation, properties))); setLocalTempDir(properties, result); return result.getAllConfigRaw(); }