core
core copied to clipboard
modify PageAPI to save style properties per contentlet
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
stylePropertiesMapfield toContainerEntry - [ ] Updated constructors to support
stylePropertiesMap - [ ] Added getter/setter methods
- [ ] Enhanced JSON deserializer to parse
stylePropertieswith multi-type support (string, number, boolean)
- [ ] Added
PageResourceHelper.java- [ ] Modified
saveContent()method to extractstylePropertiesMapfrom containerEntry.
- [ ] Modified
PageResource.java- [ ] Fixed
reduce()method to preservestylePropertiesMapduring container entry consolidation, if the key is repeated the styles are overwrite with the last entry evaluated. - [ ] Created
ContainerDatahelper class to hold bothcontentIdsandstylePropertiesMap.
- [ ] Fixed
PageResourceTest.java- [ ] Added comprehensive integration test
test_addContent_with_styleProperties() - [ ] Added deserialized test when passing a string.
- [ ] Added comprehensive integration test
PageResourceTest.json- [ ] Include test when style properties are send.
resources/PageResourceTest.json- [ ] Delete repeated postman tests already present in
PageResourceTest.json
- [ ] Delete repeated postman tests already present in
This PR fixes: #33695