mhan810/liferay-portal — pull request #119 by KocsisDaniel (2013-05-14 23:18:52+00:00)
Title: LPS-35192 Async export POC

Hey Mike,

I created a POC that contains almost everything for the async export. I decided to do this because it is easier to see the whole concept, and later I can separate it into commits.

So first I created the BackgroundTask entity as you suggested, and it is generated by the service builder because we have to persist it. It contains all the generic fields necessary to define a background task and a special field called data that contains all the specific data in JSON format. I defined a status (maybe not the best name since all the WorkflowedModel's using this special field and these are not the same) as well to track the entity status when it runs in the background.
This entity holds the data but to define the behavior I created 2 new classes called LayoutsExportTask and PortletExportTask and a factory to create these. With all these code I tried to keep the message listener as lightweight as possible so it covers only the fetching and the invocation. I defined one listener for the export and later I am planning to do one for the import, but I might need to merge them or use the same destination that Mate will introduce with messaging but with a new listener.

Please feel free to change anything, this is just a concept and based on that I can finalize the code soon.

thanks,
Daniel