001
014
015 package com.liferay.portlet.dynamicdatalists.util;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.json.JSONArray;
020 import com.liferay.portal.kernel.json.JSONObject;
021 import com.liferay.portal.kernel.search.Hits;
022 import com.liferay.portal.service.ServiceContext;
023 import com.liferay.portal.theme.ThemeDisplay;
024 import com.liferay.portlet.dynamicdatalists.model.DDLRecord;
025 import com.liferay.portlet.dynamicdatalists.model.DDLRecordSet;
026
027 import java.util.List;
028
029 import javax.portlet.PortletPreferences;
030 import javax.portlet.RenderRequest;
031 import javax.portlet.RenderResponse;
032
033 import javax.servlet.http.HttpServletRequest;
034
035
039 @ProviderType
040 public interface DDL {
041
042 public JSONObject getRecordJSONObject(DDLRecord record) throws Exception;
043
044 public JSONObject getRecordJSONObject(
045 DDLRecord record, boolean latestRecordVersion)
046 throws Exception;
047
048 public List<DDLRecord> getRecords(Hits hits) throws Exception;
049
050 public JSONArray getRecordSetJSONArray(DDLRecordSet recordSet)
051 throws Exception;
052
053 public JSONArray getRecordsJSONArray(DDLRecordSet recordSet)
054 throws Exception;
055
056 public JSONArray getRecordsJSONArray(List<DDLRecord> records)
057 throws Exception;
058
059 public JSONArray getRecordsJSONArray(
060 List<DDLRecord> records, boolean latestRecordVersion)
061 throws Exception;
062
063 public String getTemplateContent(
064 long ddmTemplateId, DDLRecordSet recordSet,
065 ThemeDisplay themeDisplay, RenderRequest renderRequest,
066 RenderResponse renderResponse)
067 throws Exception;
068
069
072 @Deprecated
073 public boolean isEditable(
074 HttpServletRequest request, String portletId, long groupId)
075 throws Exception;
076
077
080 @Deprecated
081 public boolean isEditable(
082 PortletPreferences preferences, String portletId, long groupId)
083 throws Exception;
084
085 public DDLRecord updateRecord(
086 long recordId, long recordSetId, boolean mergeFields,
087 boolean checkPermission, ServiceContext serviceContext)
088 throws Exception;
089
090 public DDLRecord updateRecord(
091 long recordId, long recordSetId, boolean mergeFields,
092 ServiceContext serviceContext)
093 throws Exception;
094
095 }