001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.dynamicdatamapping.util;
016    
017    import com.liferay.portal.kernel.json.JSONArray;
018    import com.liferay.portal.kernel.json.JSONException;
019    import com.liferay.portal.kernel.xml.Document;
020    import com.liferay.portal.kernel.xml.DocumentException;
021    import com.liferay.portal.kernel.xml.Element;
022    import com.liferay.portlet.dynamicdatamapping.storage.Fields;
023    
024    import java.util.Locale;
025    
026    import javax.servlet.jsp.PageContext;
027    
028    /**
029     * @author Eduardo Lundgren
030     * @author Brian Wing Shun Chan
031     */
032    public interface DDMXSD {
033    
034            public String getHTML(
035                            PageContext pageContext, Document document, Locale locale)
036                    throws Exception;
037    
038            public String getHTML(
039                            PageContext pageContext, Document document, Fields fields,
040                            Locale locale)
041                    throws Exception;
042    
043            public String getHTML(
044                            PageContext pageContext, Document document, Fields fields,
045                            String namespace, boolean readOnly, Locale locale)
046                    throws Exception;
047    
048            public String getHTML(
049                            PageContext pageContext, Element element, Locale locale)
050                    throws Exception;
051    
052            public String getHTML(PageContext pageContext, String xml, Locale locale)
053                    throws Exception;
054    
055            public String getHTML(
056                            PageContext pageContext, String xml, Fields fields, Locale locale)
057                    throws Exception;
058    
059            public String getHTML(
060                            PageContext pageContext, String xml, Fields fields,
061                            String namespace, Locale locale)
062                    throws Exception;
063    
064            public String getHTML(
065                            PageContext pageContext, String xml, Fields fields,
066                            String namespace, boolean readOnly, Locale locale)
067                    throws Exception;
068    
069            public JSONArray getJSONArray(Document document) throws JSONException;
070    
071            public JSONArray getJSONArray(Element element) throws JSONException;
072    
073            public JSONArray getJSONArray(String xml)
074                    throws DocumentException, JSONException;
075    
076    }