mhan810/liferay-portal — pull request #52 by matethurzo (2012-07-27 16:49:47+00:00)
Title: Staging latest changes

Hey Mike,

here goes the latest code changes from the staging prototype. There are a couple of changes what I would highlight. The data handler mapping is not as easy what we have discussed. If you remember we have agreed that we would put the data handler mappings into the liferay-portlet.xml file. As I was developing that part I've initially imagned a structure like this:

com.liferay.portlet.bookmarks.model.BookmarksEntry
data handler class name here

com.liferay.portlet.bookmarks.model.BookmarksFolder
data handler class name here

But then I've realized that this is not quite good since what if we have to - and we certainly have to - reference other entitites from a portlet? Like images can be referenced from multiple locations, etc.

So I've figured out to have a datahandlers.xml and a small infrasturcture around it to store the data handlers at one place. This way it would be much more easier to maintain the data handlers than referencing back and forth. You can see these changes in this pull.

Also there are lots of common stuff for every entity what we have to run - permissions, assets, etc. Currently it's in the BaseDataHandlerImpl class - the base class for every data handler, but then I was thinking that these are actually cross-cutting conceerns between these entities so the best would be if we could refactor these to advice objects so they would be called if necessary.So basically all the asset category, tag, ratings, etc. code would be in one Advice class which would be called when the digest method is being called for a data handler and it could do the asset related stuff there. That would be much more nicer. The same would be with the permissions.

Daniel was working hard todady finishing up the portlet preferences export import, and he made a great progress but it's still not working properly. He will continue doing it on Monday, and I'm going to help him, and also we will clean the code, since it contains lotf of unused method or obsolete behavior.

It can now export and import a single page with a bookmarks portlet on it, and a bookmark entry with it. The thing we still do is cleanup and bugfixing.

Anyway you can go ahead and check the status of it, if you have any questions we can discuss on Monday.

Thanks, Mate
cc: @KocsisDaniel