core icon indicating copy to clipboard operation
core copied to clipboard

modify PageAPI to save style properties per contentlet

Open dario-daza opened this issue 11 months ago • 0 comments

Proposed Changes

Below are the classes modified that allow the PageAPI to save Content with styleProperties within a container in a page.

  • PageContainerForm.java
    • [ ] Added stylePropertiesMap field to ContainerEntry
    • [ ] Updated constructors to support stylePropertiesMap
    • [ ] Added getter/setter methods
    • [ ] Enhanced JSON deserializer to parse styleProperties with multi-type support (string, number, boolean)
  • PageResourceHelper.java
    • [ ] Modified saveContent() method to extract stylePropertiesMap from containerEntry.
  • PageResource.java
    • [ ] Fixed reduce() method to preserve stylePropertiesMap during container entry consolidation, if the key is repeated the styles are overwrite with the last entry evaluated.
    • [ ] Created ContainerData helper class to hold both contentIds and stylePropertiesMap.
  • PageResourceTest.java
    • [ ] Added comprehensive integration test test_addContent_with_styleProperties()
    • [ ] Added deserialized test when passing a string.
  • PageResourceTest.json
    • [ ] Include test when style properties are send.
  • resources/PageResourceTest.json
    • [ ] Delete repeated postman tests already present in PageResourceTest.json

This PR fixes: #33695

dario-daza avatar Dec 09 '25 13:12 dario-daza