vilmospapp/liferay-portal — pull request #35 by KocsisDaniel (2013-09-12 08:58:12+00:00)
Title: LPS-30387

Hi Vili,

after some source formatting and debugging I realized a possible error in the original bug fix. Currently we have 2 main classes in the portal deal with PortlerPreferences: PortletPreferencesLocalServiceUtil1 and PortletPreferencesFacoryUtil. The first is a primitive local service and the 2nd one is a more of an advanced helper class, because it contains the logic to determine the ownerId and ownerType based on the actual portlet attributes and input parameters like preferences unique per layout, preferences owned by group, etc... By using this I was able to generalize the LayoutTestUtil to not only save layout preferences for every portlet but save the correct ones like group preferences, etc... However I realized that portlet preferences export-import logic is not the same as the factory util's logic, so export-import can't handle some of them and simply skip these. Before the change when we had only layout preferences for every kind of portlet used in the tests it worked well, but this was obviously not correct.

Please take a look on portlet preferences export-import logic and PPFU.getPortletSetup() to make sure both are correct and all the tests work with valid preferences. I made some initial changes heading to this direction that you can find in the last commit, please feel free to use them.

cc: @matethurzo, @zsigmondrab

thanks,
Daniel