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 import javax.servlet.jsp.PageContext;
035
036
040 @ProviderType
041 public interface DDL {
042
043 public JSONObject getRecordJSONObject(DDLRecord record) throws Exception;
044
045 public JSONObject getRecordJSONObject(
046 DDLRecord record, boolean latestRecordVersion)
047 throws Exception;
048
049 public List<DDLRecord> getRecords(Hits hits) throws Exception;
050
051 public JSONArray getRecordSetJSONArray(DDLRecordSet recordSet)
052 throws Exception;
053
054 public JSONArray getRecordsJSONArray(DDLRecordSet recordSet)
055 throws Exception;
056
057 public JSONArray getRecordsJSONArray(List<DDLRecord> records)
058 throws Exception;
059
060 public JSONArray getRecordsJSONArray(
061 List<DDLRecord> records, boolean latestRecordVersion)
062 throws Exception;
063
064 public String getTemplateContent(
065 long ddmTemplateId, DDLRecordSet recordSet,
066 ThemeDisplay themeDisplay, RenderRequest renderRequest,
067 RenderResponse renderResponse)
068 throws Exception;
069
070
075 public String getTemplateContent(
076 PageContext pageContext, long ddmTemplateId, DDLRecordSet recordSet,
077 ThemeDisplay themeDisplay, RenderRequest renderRequest,
078 RenderResponse renderResponse)
079 throws Exception;
080
081
084 @Deprecated
085 public boolean isEditable(
086 HttpServletRequest request, String portletId, long groupId)
087 throws Exception;
088
089
092 @Deprecated
093 public boolean isEditable(
094 PortletPreferences preferences, String portletId, long groupId)
095 throws Exception;
096
097 public DDLRecord updateRecord(
098 long recordId, long recordSetId, boolean mergeFields,
099 boolean checkPermission, ServiceContext serviceContext)
100 throws Exception;
101
102 public DDLRecord updateRecord(
103 long recordId, long recordSetId, boolean mergeFields,
104 ServiceContext serviceContext)
105 throws Exception;
106
107 }