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 portletNamespace, String namespace, String mode,
039 boolean readOnly, Locale locale)
040 throws Exception;
041
042 public String getFieldHTML(
043 PageContext pageContext, Element element, String portletNamespace,
044 String namespace, String mode, boolean readOnly, Locale locale)
045 throws Exception;
046
047 public String getFieldHTMLByName(
048 PageContext pageContext, long classNameId, long classPK,
049 String fieldName, Fields fields, String portletNamespace,
050 String namespace, String mode, boolean readOnly, Locale locale)
051 throws Exception;
052
053 public String getFieldHTMLByName(
054 PageContext pageContext, long classNameId, long classPK,
055 String fieldName, String portletNamespace, String namespace,
056 String mode, boolean readOnly, Locale locale)
057 throws Exception;
058
059 public String getHTML(
060 PageContext pageContext, DDMStructure ddmStructure, Fields fields,
061 String portletNamespace, String namespace, boolean readOnly,
062 Locale locale)
063 throws Exception;
064
065 public String getHTML(
066 PageContext pageContext, DDMTemplate ddmTemplate, Fields fields,
067 String portletNamespace, String namespace, boolean readOnly,
068 Locale locale)
069 throws Exception;
070
071 public String getHTML(
072 PageContext pageContext, String xml, Fields fields,
073 String portletNamespace, Locale locale)
074 throws Exception;
075
076 public String getHTML(
077 PageContext pageContext, String xml, Fields fields,
078 String portletNamespace, String namespace, boolean readOnly,
079 Locale locale)
080 throws Exception;
081
082 public String getHTML(
083 PageContext pageContext, String xml, Fields fields,
084 String portletNamespace, String namespace, Locale locale)
085 throws Exception;
086
087 public String getHTML(
088 PageContext pageContext, String xml, String portletNamespace,
089 Locale locale)
090 throws Exception;
091
092 public JSONArray getJSONArray(DDMStructure structure, String xsd)
093 throws PortalException, SystemException;
094
095 public JSONArray getJSONArray(Document document) throws PortalException;
096
097 public JSONArray getJSONArray(Element element) throws PortalException;
098
099 public JSONArray getJSONArray(String xml)
100 throws PortalException, SystemException;
101
102 public String getXSD(long classNameId, long classPK)
103 throws PortalException, SystemException;
104
105 }