LPS-32861 Apply
LPS-27530 Return portletPreferences instead of null
LPS-32861 Source formatting
LPS-32676 Source formatting