Example usage for com.liferay.portal.kernel.service LayoutPrototypeLocalServiceUtil getLayoutPrototypes

List of usage examples for com.liferay.portal.kernel.service LayoutPrototypeLocalServiceUtil getLayoutPrototypes

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.service LayoutPrototypeLocalServiceUtil getLayoutPrototypes.

Prototype

public static java.util.List<com.liferay.portal.kernel.model.LayoutPrototype> getLayoutPrototypes(int start,
        int end) 

Source Link

Document

Returns a range of all the layout prototypes.

Usage

From source file:com.liferay.tool.datamanipulator.handler.content.LayoutHandler.java

License:Open Source License

private List<KeyValuePair> _getLayoutTemplates() throws SystemException {
    List<LayoutPrototype> layoutPrototypes = LayoutPrototypeLocalServiceUtil
            .getLayoutPrototypes(QueryUtil.ALL_POS, QueryUtil.ALL_POS);

    List<KeyValuePair> layoutPrototypeNameIdPairs = new ArrayList<KeyValuePair>();

    layoutPrototypeNameIdPairs.add(new KeyValuePair("", ""));

    for (LayoutPrototype layoutPrototype : layoutPrototypes) {
        layoutPrototypeNameIdPairs.add(new KeyValuePair(layoutPrototype.getNameCurrentValue(),
                String.valueOf(layoutPrototype.getLayoutPrototypeId())));
    }//from  ww  w  .jav  a 2  s  . c o m

    return layoutPrototypeNameIdPairs;
}