Example usage for com.liferay.portal.kernel.search Summary setTitle

List of usage examples for com.liferay.portal.kernel.search Summary setTitle

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.search Summary setTitle.

Prototype

public void setTitle(String title) 

Source Link

Usage

From source file:com.liferay.dynamic.data.lists.internal.search.DDLRecordIndexer.java

License:Open Source License

@Override
protected Summary doGetSummary(Document document, Locale locale, String snippet, PortletRequest portletRequest,
        PortletResponse portletResponse) {

    long recordSetId = GetterUtil.getLong(document.get("recordSetId"));

    String title = getTitle(recordSetId, locale);

    Summary summary = createSummary(document, Field.TITLE, Field.DESCRIPTION);

    summary.setMaxContentLength(200);/*  w w w  . ja  va 2s .co  m*/
    summary.setTitle(title);

    return summary;
}

From source file:com.liferay.dynamic.data.mapping.internal.search.DDMFormInstanceRecordIndexer.java

License:Open Source License

@Override
protected Summary doGetSummary(Document document, Locale locale, String snippet, PortletRequest portletRequest,
        PortletResponse portletResponse) {

    long ddmFormInstanceId = GetterUtil.getLong(document.get("formInstanceId"));

    String title = getTitle(ddmFormInstanceId, locale);

    Summary summary = createSummary(document, Field.TITLE, Field.DESCRIPTION);

    summary.setMaxContentLength(200);//from ww  w .  j av a 2 s . c o m
    summary.setTitle(title);

    return summary;
}