LPS-47984 add a JSON object to get CSS and JS info to write to header and footer from embedded portlet in layout
LPS-47984 move duplicate methods into Util class
LPS-47984 Extract common logic to private method
LPS-47984 jsonObject is never null
LPS-47984 SF
LPS-47984 Source Formatting
LPS-47984 simplify, the 'optimization' (it's not really) only makes the code more complex
LPS-47984 methods are not used by anyone, make them both private and add _