Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-84763

Support for extracting the rendered html of journal articles as a separated binary resource

    Details

    • Type: Story
    • Status: Closed
    • Priority: Minor
    • Resolution: Inactive
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Headless Delivery API
    • Labels:

      Description

      When having several templates, and those being large ones, the JSON generated can be huge.

      In order to minimize that, and taking into account that customers will require 1 rendered content at a time, it is better to create a new resource where the renderedContent is stored.

       

      API Capabilities
      The consumer of this API will be able to:

      • Check the list of rendered content associated with a structuredContent
        • Retrieve the rendered content for a given template

      Security requirements

      The list should contain only the elements the user has permission to view. If a structured content is requested and the current user doesn't have permission to view it, a 404 error should be returned.

      General requirements
      The API should support at least Plain JSON, JSON-LD and HAL as output formats.

      The consumer developer should be able to control which linked resources are embedded so that they can be retrieved along with a structured content in a single request.

      The consumer developer can specify which fields are desired, to reduce the data transfer when the API is used from a consumer sensitive to it.

       

      Acceptance criteria

       

      Given a structure like structure.json

      and a template associated with it (not attached as it is not accessible through the api, but any will work, it is not the goal of this issue)

      and a structured content created using this structure

      When the structuredContent is retrieved

      Then the response is like JSONExample.json

       

      -renderedContent: html with the template applied to the structuredContent

      -templateName: name of the template used.

      -encodingFormat (needed??)

       

      Example

      "renderedContentsByTemplate": {
      "totalItems": 1,
      "manages": {
      "property": "rdf:type",
      "object": "schema:templates"
      },
      "member": [
      {
      "templateName": "templateSubjects",
      "renderedContent": ""http://localhost:8080/structuredContent/20126/0/renderedContent/98948de4-5efb-d751-d5d0-5e2d74059ac3?t=1535016982578"",

      "encodingFormat": "text/html"
      "@type": [
      "templates"
      ]
      }
      ],
      "@type": [
      "Collection"
      ]
      }

       

       
      **

       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package