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

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

Introduction

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

Prototype

public static List<String> fromString(String s) 

Source Link

Usage

From source file:com.liferay.content.targeting.portlet.CTFreeMarkerDisplayPortlet.java

License:Open Source License

protected void populatePortletDisplayTemplateContext(Template template, PortletPreferences portletPreferences,
        long defaultDisplayStyleGroupId, String defaultDisplayStyle) {

    TemplateHandler templateHandler = TemplateHandlerRegistryUtil
            .getTemplateHandler(AssetEntry.class.getName());

    template.put("templateHandler", templateHandler);

    String displayStyle = GetterUtil
            .getString(portletPreferences.getValue("displayStyle", defaultDisplayStyle));
    long displayStyleGroupId = GetterUtil.getLong(portletPreferences.getValue("displayStyleGroupId", null),
            defaultDisplayStyleGroupId);

    template.put("displayStyle", displayStyle);
    template.put("displayStyleGroupId", displayStyleGroupId);
    template.put("displayStyles", ListUtil.fromString(defaultDisplayStyle));
}

From source file:com.liferay.tools.sourceformatter.BaseSourceProcessor.java

License:Open Source License

private String[] _getExcludes() {
    List<String> excludesList = ListUtil
            .fromString(GetterUtil.getString(System.getProperty("source.formatter.excludes")));

    excludesList.addAll(getPropertyList("source.formatter.excludes"));

    String[] includes = new String[] { "**\\source_formatter.ignore" };

    List<String> ignoreFileNames = getFileNames(new String[0], includes);

    for (String ignoreFileName : ignoreFileNames) {
        excludesList.add(ignoreFileName.substring(0, ignoreFileName.length() - 23) + "**");
    }//from  w  ww  .  j  a va2  s.co m

    return excludesList.toArray(new String[excludesList.size()]);
}