001
014
015 package com.liferay.portlet.dynamicdatamapping.util;
016
017 import com.liferay.portal.kernel.search.Document;
018 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
019 import com.liferay.portlet.dynamicdatamapping.model.DDMStructure;
020 import com.liferay.portlet.dynamicdatamapping.storage.Fields;
021
022
025 public class DDMIndexerUtil {
026
027 public static void addAttributes(
028 Document document, DDMStructure ddmStructure, Fields fields) {
029
030 getDDMIndexer().addAttributes(document, ddmStructure, fields);
031 }
032
033 public static String encodeName(long ddmStructureId, String fieldName) {
034 return getDDMIndexer().encodeName(ddmStructureId, fieldName);
035 }
036
037 public static DDMIndexer getDDMIndexer() {
038 PortalRuntimePermission.checkGetBeanProperty(DDMIndexerUtil.class);
039
040 return _ddmIndexer;
041 }
042
043 public void setDDMIndexer(DDMIndexer ddmIndexer) {
044 PortalRuntimePermission.checkSetBeanProperty(getClass());
045
046 _ddmIndexer = ddmIndexer;
047 }
048
049 private static DDMIndexer _ddmIndexer;
050
051 }