Class CmsJsonDocumentList
java.lang.Object
org.opencms.xml.xml2json.document.A_CmsJsonDocument
org.opencms.xml.xml2json.document.CmsJsonDocumentResource
org.opencms.xml.xml2json.document.CmsJsonDocumentXmlContent
org.opencms.xml.xml2json.document.CmsJsonDocumentList
- All Implemented Interfaces:
I_CmsJsonDocument
Class representing a JSON document for a CMS list.
-
Field Summary
Fields inherited from class org.opencms.xml.xml2json.document.CmsJsonDocumentXmlContent
m_embedLinkedModelgroup, m_throwException, m_xmlContentFields inherited from class org.opencms.xml.xml2json.document.CmsJsonDocumentResource
m_helper, m_resourceFields inherited from class org.opencms.xml.xml2json.document.A_CmsJsonDocument
FIELD_LINKED_CONTENTS, m_context, m_json, m_jsonRequest -
Constructor Summary
ConstructorsConstructorDescriptionCmsJsonDocumentList(CmsJsonRequest jsonRequest, CmsXmlContent xmlContent) Creates a new JSON document. -
Method Summary
Modifier and TypeMethodDescriptiongetJson()Returns the JSON document.protected booleanWhether all locales of this XML content are requested.protected booleanWhether one locale of this XML content is requested.protected booleanWhether a part of a locale of this XML content is requested.protected booleanWhether the default locale content shall be shown in the case the requested locale is not available.protected booleanWhether to show the wrapper with resource information.Methods inherited from class org.opencms.xml.xml2json.document.CmsJsonDocumentXmlContent
insertJsonLinkedContent, insertJsonLinkedContents, insertJsonWrapper, isShowLinkedContentsRequestMethods inherited from class org.opencms.xml.xml2json.document.CmsJsonDocumentResource
insertJsonResource, insertJsonResourceAttributes, insertJsonResourceFile, insertJsonResourceParams, insertJsonResourcePathAndLink, insertJsonResourceProperties
-
Constructor Details
-
CmsJsonDocumentList
Creates a new JSON document.- Parameters:
jsonRequest- the JSON requestxmlContent- the listconfig XML content- Throws:
Exception- if something goes wrong
-
-
Method Details
-
getJson
public Object getJson() throws JSONException, CmsException, CmsJsonHandlerException, CmsJsonHandlerXmlContent.PathNotFoundException, ExceptionDescription copied from interface:I_CmsJsonDocumentReturns the JSON document.- Specified by:
getJsonin interfaceI_CmsJsonDocument- Overrides:
getJsonin classCmsJsonDocumentXmlContent- Returns:
- the JSON document
- Throws:
JSONException- if rendering the JSON document failsCmsException- if reading a resource or evaluating a SOLR search failsCmsJsonHandlerException- if the request is not valid according to the specificationCmsJsonHandlerXmlContent.PathNotFoundException- if the selected path does not existException- if something else goes wrong- See Also:
-
isLocaleAllRequest
Description copied from class:CmsJsonDocumentXmlContentWhether all locales of this XML content are requested.- Overrides:
isLocaleAllRequestin classCmsJsonDocumentXmlContent- Returns:
- whether all or not
- See Also:
-
isLocalePathRequest
Description copied from class:CmsJsonDocumentXmlContentWhether one locale of this XML content is requested.- Overrides:
isLocalePathRequestin classCmsJsonDocumentXmlContent- Returns:
- whether one locale or not
- See Also:
-
isLocaleRequest
Description copied from class:CmsJsonDocumentXmlContentWhether a part of a locale of this XML content is requested.- Overrides:
isLocaleRequestin classCmsJsonDocumentXmlContent- Returns:
- whether a part of a locale or not
- See Also:
-
isShowFallbackLocaleRequest
Description copied from class:CmsJsonDocumentXmlContentWhether the default locale content shall be shown in the case the requested locale is not available.- Overrides:
isShowFallbackLocaleRequestin classCmsJsonDocumentXmlContent- Returns:
- whether to show the default locale or not
- See Also:
-
isShowWrapperRequest
Description copied from class:CmsJsonDocumentXmlContentWhether to show the wrapper with resource information. For backward compatibility the wrapper is shown for the all locale request but not for the locale and locale path request as a default. This default behavior can be changed by means of the "wrapper" request parameter. For locale path requests, wrapper information is not available.- Overrides:
isShowWrapperRequestin classCmsJsonDocumentXmlContent- Returns:
- whether to show the wrapper or not
- See Also:
-