com.liferay.portlet.dynamicdatamapping.util
Class DDMXSDImpl
java.lang.Object
com.liferay.portlet.dynamicdatamapping.util.DDMXSDImpl
- All Implemented Interfaces:
- DDMXSD
public class DDMXSDImpl
- extends Object
- implements DDMXSD
|
Method Summary |
protected JSONArray |
addStructureFieldAttributes(DDMStructure structure,
JSONArray jsonArray)
|
protected int |
countFieldRepetition(String[] fieldsDisplayValues,
String parentFieldName,
int offset)
|
protected Map<String,Object> |
getFieldContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String portletNamespace,
String namespace,
Element dynamicElementElement,
Locale locale)
|
String |
getFieldHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Element element,
Fields fields,
String portletNamespace,
String namespace,
String mode,
boolean readOnly,
Locale locale)
|
String |
getFieldHTMLByName(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
long classNameId,
long classPK,
String fieldName,
Fields fields,
String portletNamespace,
String namespace,
String mode,
boolean readOnly,
Locale locale)
|
protected String |
getFieldNamespace(String fieldDisplayValue,
DDMFieldsCounter ddmFieldsCounter,
int offset)
|
protected int |
getFieldOffset(String[] fieldsDisplayValues,
String name,
int index)
|
protected Map<String,Map<String,Object>> |
getFieldsContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String portletNamespace,
String namespace)
|
protected DDMFieldsCounter |
getFieldsCounter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Fields fields,
String portletNamespace,
String namespace)
|
protected String |
getFieldsDisplayValue(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Fields fields)
|
protected String[] |
getFieldsDisplayValues(String fieldDisplayValue)
|
protected Map<String,Object> |
getFreeMarkerContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String portletNamespace,
String namespace,
Element dynamicElementElement,
Locale locale)
|
String |
getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
DDMStructure ddmStructure,
Fields fields,
String portletNamespace,
String namespace,
boolean readOnly,
Locale locale)
|
String |
getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
DDMTemplate ddmTemplate,
Fields fields,
String portletNamespace,
String namespace,
boolean readOnly,
Locale locale)
|
String |
getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Element element,
Fields fields,
String portletNamespace,
Locale locale)
|
String |
getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Element element,
Fields fields,
String portletNamespace,
String namespace,
String mode,
boolean readOnly,
Locale locale)
|
String |
getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Element element,
String portletNamespace,
Locale locale)
|
String |
getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String xml,
Fields fields,
String portletNamespace,
Locale locale)
|
String |
getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String xml,
Fields fields,
String portletNamespace,
String namespace,
boolean readOnly,
Locale locale)
|
String |
getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String xml,
Fields fields,
String portletNamespace,
String namespace,
Locale locale)
|
String |
getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String xml,
Fields fields,
String portletNamespace,
String namespace,
String mode,
boolean readOnly,
Locale locale)
|
String |
getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String xml,
String portletNamespace,
Locale locale)
|
JSONArray |
getJSONArray(DDMStructure structure,
String xsd)
|
JSONArray |
getJSONArray(Document document)
|
JSONArray |
getJSONArray(Element element)
|
JSONArray |
getJSONArray(String xml)
|
protected URL |
getResource(String name)
|
String |
getSimpleFieldHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Element element,
Field field,
String portletNamespace,
String namespace,
String mode,
boolean readOnly,
Locale locale)
|
String |
getSimpleFieldHTMLByName(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
long classNameId,
long classPK,
Field field,
String portletNamespace,
String namespace,
String mode,
boolean readOnly,
Locale locale)
|
protected JSONArray |
getStructureFieldReadOnlyAttributes(DDMStructure structure,
String fieldName)
|
String |
getXSD(long classNameId,
long classPK)
|
String |
getXSD(String json)
|
protected String |
processFTL(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Element element,
String mode,
boolean readOnly,
Map<String,Object> freeMarkerContext)
|
protected String |
processFTL(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Template template)
|
protected void |
putMetadataValue(JSONObject jsonObject,
String attributeName,
String attributeValue,
String type)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DDMXSDImpl
public DDMXSDImpl()
getFieldHTML
public String getFieldHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Element element,
Fields fields,
String portletNamespace,
String namespace,
String mode,
boolean readOnly,
Locale locale)
throws Exception
- Specified by:
getFieldHTML in interface DDMXSD
- Throws:
Exception
getFieldHTMLByName
public String getFieldHTMLByName(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
long classNameId,
long classPK,
String fieldName,
Fields fields,
String portletNamespace,
String namespace,
String mode,
boolean readOnly,
Locale locale)
throws Exception
- Specified by:
getFieldHTMLByName in interface DDMXSD
- Throws:
Exception
getHTML
public String getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
DDMStructure ddmStructure,
Fields fields,
String portletNamespace,
String namespace,
boolean readOnly,
Locale locale)
throws Exception
- Specified by:
getHTML in interface DDMXSD
- Throws:
Exception
getHTML
public String getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
DDMTemplate ddmTemplate,
Fields fields,
String portletNamespace,
String namespace,
boolean readOnly,
Locale locale)
throws Exception
- Specified by:
getHTML in interface DDMXSD
- Throws:
Exception
getHTML
public String getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Element element,
Fields fields,
String portletNamespace,
Locale locale)
throws Exception
- Throws:
Exception
getHTML
public String getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Element element,
Fields fields,
String portletNamespace,
String namespace,
String mode,
boolean readOnly,
Locale locale)
throws Exception
- Throws:
Exception
getHTML
public String getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Element element,
String portletNamespace,
Locale locale)
throws Exception
- Throws:
Exception
getHTML
public String getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String xml,
Fields fields,
String portletNamespace,
Locale locale)
throws Exception
- Specified by:
getHTML in interface DDMXSD
- Throws:
Exception
getHTML
public String getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String xml,
Fields fields,
String portletNamespace,
String namespace,
boolean readOnly,
Locale locale)
throws Exception
- Specified by:
getHTML in interface DDMXSD
- Throws:
Exception
getHTML
public String getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String xml,
Fields fields,
String portletNamespace,
String namespace,
Locale locale)
throws Exception
- Specified by:
getHTML in interface DDMXSD
- Throws:
Exception
getHTML
public String getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String xml,
Fields fields,
String portletNamespace,
String namespace,
String mode,
boolean readOnly,
Locale locale)
throws Exception
- Specified by:
getHTML in interface DDMXSD
- Throws:
Exception
getHTML
public String getHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String xml,
String portletNamespace,
Locale locale)
throws Exception
- Specified by:
getHTML in interface DDMXSD
- Throws:
Exception
getJSONArray
public JSONArray getJSONArray(DDMStructure structure,
String xsd)
throws PortalException
- Specified by:
getJSONArray in interface DDMXSD
- Throws:
PortalException
getJSONArray
public JSONArray getJSONArray(Document document)
throws PortalException
- Specified by:
getJSONArray in interface DDMXSD
- Throws:
PortalException
getJSONArray
public JSONArray getJSONArray(Element element)
throws PortalException
- Specified by:
getJSONArray in interface DDMXSD
- Throws:
PortalException
getJSONArray
public JSONArray getJSONArray(String xml)
throws PortalException
- Specified by:
getJSONArray in interface DDMXSD
- Throws:
PortalException
getSimpleFieldHTML
public String getSimpleFieldHTML(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Element element,
Field field,
String portletNamespace,
String namespace,
String mode,
boolean readOnly,
Locale locale)
throws Exception
- Specified by:
getSimpleFieldHTML in interface DDMXSD
- Throws:
Exception
getSimpleFieldHTMLByName
public String getSimpleFieldHTMLByName(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
long classNameId,
long classPK,
Field field,
String portletNamespace,
String namespace,
String mode,
boolean readOnly,
Locale locale)
throws Exception
- Specified by:
getSimpleFieldHTMLByName in interface DDMXSD
- Throws:
Exception
getXSD
public String getXSD(long classNameId,
long classPK)
throws PortalException
- Specified by:
getXSD in interface DDMXSD
- Throws:
PortalException
getXSD
public String getXSD(String json)
throws PortalException
- Specified by:
getXSD in interface DDMXSD
- Throws:
PortalException
addStructureFieldAttributes
protected JSONArray addStructureFieldAttributes(DDMStructure structure,
JSONArray jsonArray)
countFieldRepetition
protected int countFieldRepetition(String[] fieldsDisplayValues,
String parentFieldName,
int offset)
getFieldContext
protected Map<String,Object> getFieldContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String portletNamespace,
String namespace,
Element dynamicElementElement,
Locale locale)
getFieldNamespace
protected String getFieldNamespace(String fieldDisplayValue,
DDMFieldsCounter ddmFieldsCounter,
int offset)
getFieldOffset
protected int getFieldOffset(String[] fieldsDisplayValues,
String name,
int index)
getFieldsContext
protected Map<String,Map<String,Object>> getFieldsContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String portletNamespace,
String namespace)
getFieldsCounter
protected DDMFieldsCounter getFieldsCounter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Fields fields,
String portletNamespace,
String namespace)
getFieldsDisplayValue
protected String getFieldsDisplayValue(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Fields fields)
getFieldsDisplayValues
protected String[] getFieldsDisplayValues(String fieldDisplayValue)
getFreeMarkerContext
protected Map<String,Object> getFreeMarkerContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String portletNamespace,
String namespace,
Element dynamicElementElement,
Locale locale)
getResource
protected URL getResource(String name)
getStructureFieldReadOnlyAttributes
protected JSONArray getStructureFieldReadOnlyAttributes(DDMStructure structure,
String fieldName)
processFTL
protected String processFTL(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Element element,
String mode,
boolean readOnly,
Map<String,Object> freeMarkerContext)
throws Exception
- Throws:
Exception
processFTL
protected String processFTL(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Template template)
throws Exception
- Throws:
Exception- See Also:
ThemeUtil.includeFTL(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, com.liferay.portal.model.Theme, boolean)
putMetadataValue
protected void putMetadataValue(JSONObject jsonObject,
String attributeName,
String attributeValue,
String type)