001
014
015 package com.liferay.portlet.dynamicdatamapping.util;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.kernel.json.JSONArray;
020 import com.liferay.portal.kernel.xml.Document;
021 import com.liferay.portal.kernel.xml.Element;
022 import com.liferay.portlet.dynamicdatamapping.model.DDMStructure;
023 import com.liferay.portlet.dynamicdatamapping.model.DDMTemplate;
024 import com.liferay.portlet.dynamicdatamapping.storage.Fields;
025
026 import java.util.Locale;
027
028 import javax.servlet.jsp.PageContext;
029
030
034 public interface DDMXSD {
035
036 public String getFieldHTML(
037 PageContext pageContext, Element element, Fields fields,
038 String namespace, String mode, boolean readOnly, Locale locale)
039 throws Exception;
040
041 public String getFieldHTMLByName(
042 PageContext pageContext, long classNameId, long classPK,
043 String fieldName, int repeatableIndex, Fields fields,
044 String namespace, String mode, boolean readOnly, Locale locale)
045 throws Exception;
046
047 public String getHTML(
048 PageContext pageContext, DDMStructure ddmStructure, Fields fields,
049 String namespace, boolean readOnly, Locale locale)
050 throws Exception;
051
052 public String getHTML(
053 PageContext pageContext, DDMTemplate ddmTemplate, Fields fields,
054 String namespace, boolean readOnly, Locale locale)
055 throws Exception;
056
057 public String getHTML(
058 PageContext pageContext, String xml, Fields fields, Locale locale)
059 throws Exception;
060
061 public String getHTML(
062 PageContext pageContext, String xml, Fields fields,
063 String namespace, boolean readOnly, Locale locale)
064 throws Exception;
065
066 public String getHTML(
067 PageContext pageContext, String xml, Fields fields,
068 String namespace, Locale locale)
069 throws Exception;
070
071 public String getHTML(PageContext pageContext, String xml, Locale locale)
072 throws Exception;
073
074 public JSONArray getJSONArray(DDMStructure structure, String xsd)
075 throws PortalException, SystemException;
076
077 public JSONArray getJSONArray(Document document) throws PortalException;
078
079 public JSONArray getJSONArray(Element element) throws PortalException;
080
081 public JSONArray getJSONArray(String xml)
082 throws PortalException, SystemException;
083
084 public String getXSD(long classNameId, long classPK)
085 throws PortalException, SystemException;
086
087 }