Search in sources :

Example 1 with PropertiesFunction

use of io.fabric8.karaf.core.properties.function.PropertiesFunction in project fabric8 by fabric8io.

the class PlaceholderResolverImpl method resolve.

@Override
public String resolve(String value) {
    String[] resolvers = Support.before(value, ":").split("\\+");
    String remainder = Support.after(value, ":");
    for (String resolver : resolvers) {
        PropertiesFunction function = findFunction(resolver);
        if (function == null) {
            value = null;
            break;
        }
        value = function.apply(remainder);
        if (value != null) {
            remainder = value;
        } else {
            break;
        }
    }
    return value;
}
Also used : PropertiesFunction(io.fabric8.karaf.core.properties.function.PropertiesFunction)

Aggregations

PropertiesFunction (io.fabric8.karaf.core.properties.function.PropertiesFunction)1