matethurzo/liferay-portal — pull request #351 by epgarcia (2013-04-16 16:44:05+00:00)
Title: LPS-34428 and LPS-33914 Refactor export/import logic for Page Ratings and Page Comments

Hey Máté,

While working on LPS-34428 "As a site administrator I would like to benefit from the more reliable staging architecture when using the Page Ratings portlet" I noticed that the PageRatingsPortletDataHandler is not really necessary:

* The portlet doesn't have any special configuration
* The deleteData is duplicated in the LayoutLocalServiceImpl.deleteLayout
* The export and import could actually be handled by the LayoutExporter/LayoutImporter, as for other data associated to the layout.

It's exactly the same for the PageCommentsPortletDataHandler. So I've moved the logic to the LayoutExporter/LayoutImporter and got rid of the PortletDataHandlers for these portlets. I've performed several tests and it works. I would have added some tests in the PR, but they we don't have any LayoutExporterTest / LayoutImporterTest and I don't know if you already have plans for them.

Even if we finally decide to implement a StagedModelDataHandler for these entities, I think these changes are necessary as a first step to have a clean basis.

Let me know your thoughts.

Thanks!

@juliocamarero