Example usage for com.liferay.portal.kernel.util ListUtil fromMapKeys

List of usage examples for com.liferay.portal.kernel.util ListUtil fromMapKeys

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util ListUtil fromMapKeys.

Prototype

public static <E> List<E> fromMapKeys(Map<? extends E, ?> map) 

Source Link

Usage

From source file:com.liferay.calendarimporter.source.ImportSourceFactory.java

License:Open Source License

public static List<String> getTypes() {
    return ListUtil.fromMapKeys(_importSources);
}

From source file:com.liferay.shipping.extension.europe.ShippingExtensionEurope.java

License:Open Source License

@Override
public String getFieldsHTML(Map<String, Object> context) {
    String content = StringPool.BLANK;

    try {//  w ww  . j  a v  a 2 s .  c  om
        context.put("conversionRate", _shippingCalculator.format(_EUR_USD_RATE));
        context.put("destinations", ListUtil.fromMapKeys(_DESTINATION_COST_MAP));
        context.put("taxesPercent", _shippingCalculator.format(_TAXES));

        content = _templateParser.parseTemplate(getClass(), "templates/fields.ftl", context);
    } catch (Exception e) {
        _log.error("Error while processing template ", e);
    }

    return content;
}

From source file:com.liferay.shipping.extension.usa.ShippingExtensionUSA.java

License:Open Source License

@Override
public String getFieldsHTML(Map<String, Object> context) {
    String content = StringPool.BLANK;

    try {//ww w  . j  a v  a 2s.c  om
        context.put("destinations", ListUtil.fromMapKeys(_DESTINATION_COST_MAP));
        context.put("taxesPercent", _shippingCalculator.format(_TAXES));

        content = _templateParser.parseTemplate(getClass(), "templates/fields.ftl", context);
    } catch (Exception e) {
        _log.error("Error while processing template ", e);
    }

    return content;
}