Example usage for com.liferay.portal.kernel.search DDMStructureIndexer reindexDDMStructures

List of usage examples for com.liferay.portal.kernel.search DDMStructureIndexer reindexDDMStructures

Introduction

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

Prototype

public void reindexDDMStructures(List<Long> ddmStructureIds) throws SearchException;

Source Link

Usage

From source file:com.liferay.dynamic.data.mapping.background.task.DDMStructureIndexerBackgroundTaskExecutor.java

License:Open Source License

@Override
public BackgroundTaskResult execute(BackgroundTask backgroundTask) throws Exception {

    Map<String, Serializable> taskContextMap = backgroundTask.getTaskContextMap();

    Number structureIdNumber = (Number) taskContextMap.get("structureId");

    long structureId = structureIdNumber.longValue();

    DDMStructureIndexer structureIndexer = getDDMStructureIndexer(structureId);

    List<Long> ddmStructureIds = getChildrenStructureIds(structureId);

    structureIndexer.reindexDDMStructures(ddmStructureIds);

    return BackgroundTaskResult.SUCCESS;
}