Example usage for com.liferay.portal.util JavaFieldsParser parse

List of usage examples for com.liferay.portal.util JavaFieldsParser parse

Introduction

In this page you can find the example usage for com.liferay.portal.util JavaFieldsParser parse.

Prototype

public static String parse(ClassLoader classLoader, String s) 

Source Link

Usage

From source file:com.liferay.portlet.social.util.SocialConfigurationUtil.java

License:Open Source License

private static void _read(ClassLoader classLoader, String xml, List<Object> objects) throws Exception {

    if (xml == null) {
        return;/*from  w w w. j  a va  2s  .  c o  m*/
    }

    xml = JavaFieldsParser.parse(classLoader, xml);

    Document document = SAXReaderUtil.read(xml);

    Element rootElement = document.getRootElement();

    List<Element> activityElements = rootElement.elements("activity");

    for (Element activityElement : activityElements) {
        _readActivity(classLoader, objects, activityElement);
    }
}