com.liferay.portlet.journal.lar
Class JournalContentPortletDataHandlerImpl

java.lang.Object
  extended bycom.liferay.portlet.journal.lar.JournalContentPortletDataHandlerImpl
All Implemented Interfaces:
com.liferay.portal.kernel.lar.PortletDataHandler

public class JournalContentPortletDataHandlerImpl
extends java.lang.Object
implements com.liferay.portal.kernel.lar.PortletDataHandler

View Source

Provides the Journal Content portlet export and import functionality, which is to clone the article, structure, and template referenced in the Journal Content portlet if the article is associated with the layout's group. Upon import, new instances of the corresponding articles, structures, and templates are created or updated. The author of the newly created objects are determined by the JournalCreationStrategy class defined in portal.properties.

This PortletDataHandler differs from from JournalPortletDataHandlerImpl in that it only exports articles referenced in Journal Content portlets. Articles not displayed in Journal Content portlets will not be exported unless JournalPortletDataHandlerImpl is activated.

Author:
Joel Kozikowski, Raymond Augé
See Also:
JournalCreationStrategy, JournalPortletDataHandlerImpl, PortletDataHandler

Constructor Summary
JournalContentPortletDataHandlerImpl()
           
 
Method Summary
 java.lang.String exportData(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String portletId, javax.portlet.PortletPreferences prefs)
           
 com.liferay.portal.kernel.lar.PortletDataHandlerControl[] getExportControls()
           
 com.liferay.portal.kernel.lar.PortletDataHandlerControl[] getImportControls()
           
protected  java.lang.String getPrimaryKey(long groupId, java.lang.String key)
           
 javax.portlet.PortletPreferences importData(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String portletId, javax.portlet.PortletPreferences prefs, java.lang.String data)
           
protected  void importJournalData(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String portletId, java.lang.String data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JournalContentPortletDataHandlerImpl

public JournalContentPortletDataHandlerImpl()
Method Detail

getExportControls

public com.liferay.portal.kernel.lar.PortletDataHandlerControl[] getExportControls()
                                                                            throws com.liferay.portal.kernel.lar.PortletDataException
Specified by:
getExportControls in interface com.liferay.portal.kernel.lar.PortletDataHandler
Throws:
com.liferay.portal.kernel.lar.PortletDataException

getImportControls

public com.liferay.portal.kernel.lar.PortletDataHandlerControl[] getImportControls()
                                                                            throws com.liferay.portal.kernel.lar.PortletDataException
Specified by:
getImportControls in interface com.liferay.portal.kernel.lar.PortletDataHandler
Throws:
com.liferay.portal.kernel.lar.PortletDataException

exportData

public java.lang.String exportData(com.liferay.portal.kernel.lar.PortletDataContext context,
                                   java.lang.String portletId,
                                   javax.portlet.PortletPreferences prefs)
                            throws com.liferay.portal.kernel.lar.PortletDataException
Specified by:
exportData in interface com.liferay.portal.kernel.lar.PortletDataHandler
Throws:
com.liferay.portal.kernel.lar.PortletDataException

importData

public javax.portlet.PortletPreferences importData(com.liferay.portal.kernel.lar.PortletDataContext context,
                                                   java.lang.String portletId,
                                                   javax.portlet.PortletPreferences prefs,
                                                   java.lang.String data)
                                            throws com.liferay.portal.kernel.lar.PortletDataException
Specified by:
importData in interface com.liferay.portal.kernel.lar.PortletDataHandler
Throws:
com.liferay.portal.kernel.lar.PortletDataException

getPrimaryKey

protected java.lang.String getPrimaryKey(long groupId,
                                         java.lang.String key)

importJournalData

protected void importJournalData(com.liferay.portal.kernel.lar.PortletDataContext context,
                                 java.lang.String portletId,
                                 java.lang.String data)
                          throws java.lang.Exception
Throws:
java.lang.Exception