com.liferay.portlet.journal.lar
Class JournalPortletDataHandlerImpl
java.lang.Object
com.liferay.portlet.journal.lar.JournalPortletDataHandlerImpl
- All Implemented Interfaces:
- com.liferay.portal.kernel.lar.PortletDataHandler
public class JournalPortletDataHandlerImpl
- extends java.lang.Object
- implements com.liferay.portal.kernel.lar.PortletDataHandler
View Source
Provides the Journal portlet export and import functionality, which is to
clone all articles, structures, and templates associated with the layout's
group. Upon import, new instances of the corresponding articles, structures,
and templates are created or updated according to the DATA_MIRROW strategy
The author of the newly created objects are determined by the
JournalCreationStrategy class defined in portal.properties. That
strategy also allows the text of the journal article to be modified prior
to import.
This PortletDataHandler
differs from
JournalContentPortletDataHandlerImpl
in that it exports all
articles owned by the group whether or not they are actually displayed in a
portlet in the layout set.
- Author:
- Raymond Aug�, Joel Kozikowski, Brian Wing Shun Chan, Bruno Farache
- See Also:
PortletDataHandler
,
JournalContentPortletDataHandlerImpl
,
JournalCreationStrategy
Method Summary |
javax.portlet.PortletPreferences |
deleteData(com.liferay.portal.kernel.lar.PortletDataContext context,
java.lang.String portletId,
javax.portlet.PortletPreferences prefs)
|
protected static void |
exportArticle(com.liferay.portal.kernel.lar.PortletDataContext context,
com.liferay.portlet.journal.model.JournalArticle article)
|
java.lang.String |
exportData(com.liferay.portal.kernel.lar.PortletDataContext context,
java.lang.String portletId,
javax.portlet.PortletPreferences prefs)
|
protected static void |
exportStructure(com.liferay.portlet.journal.model.JournalStructure structure)
|
protected static void |
exportTemplate(com.liferay.portal.kernel.lar.PortletDataContext context,
com.liferay.portlet.journal.model.JournalTemplate template)
|
protected static java.lang.String |
getArticleImageDir(com.liferay.portlet.journal.model.JournalArticle article)
|
com.liferay.portal.kernel.lar.PortletDataHandlerControl[] |
getExportControls()
|
com.liferay.portal.kernel.lar.PortletDataHandlerControl[] |
getImportControls()
|
protected static java.lang.String |
getSmallImageDir(com.liferay.portlet.journal.model.JournalArticle article)
|
protected static java.lang.String |
getSmallImageDir(com.liferay.portlet.journal.model.JournalTemplate template)
|
protected static void |
importArticle(com.liferay.portal.kernel.lar.PortletDataContext context,
java.util.Map<java.lang.String,java.lang.String> structureIds,
java.util.Map<java.lang.String,java.lang.String> templateIds,
java.util.Map<java.lang.String,java.lang.String> articleIds,
com.liferay.portlet.journal.model.JournalArticle article)
|
javax.portlet.PortletPreferences |
importData(com.liferay.portal.kernel.lar.PortletDataContext context,
java.lang.String portletId,
javax.portlet.PortletPreferences prefs,
java.lang.String data)
|
protected static void |
importStructure(com.liferay.portal.kernel.lar.PortletDataContext context,
java.util.Map<java.lang.String,java.lang.String> structureIds,
com.liferay.portlet.journal.model.JournalStructure structure)
|
protected static void |
importTemplate(com.liferay.portal.kernel.lar.PortletDataContext context,
java.util.Map<java.lang.String,java.lang.String> structureIds,
java.util.Map<java.lang.String,java.lang.String> templateIds,
com.liferay.portlet.journal.model.JournalTemplate template)
|
boolean |
isPublishToLiveByDefault()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JournalPortletDataHandlerImpl
public JournalPortletDataHandlerImpl()
deleteData
public javax.portlet.PortletPreferences deleteData(com.liferay.portal.kernel.lar.PortletDataContext context,
java.lang.String portletId,
javax.portlet.PortletPreferences prefs)
throws com.liferay.portal.kernel.lar.PortletDataException
- Specified by:
deleteData
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
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
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
isPublishToLiveByDefault
public boolean isPublishToLiveByDefault()
- Specified by:
isPublishToLiveByDefault
in interface com.liferay.portal.kernel.lar.PortletDataHandler
exportArticle
protected static void exportArticle(com.liferay.portal.kernel.lar.PortletDataContext context,
com.liferay.portlet.journal.model.JournalArticle article)
throws java.io.IOException,
com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
java.io.IOException
com.liferay.portal.PortalException
com.liferay.portal.SystemException
exportStructure
protected static void exportStructure(com.liferay.portlet.journal.model.JournalStructure structure)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
exportTemplate
protected static void exportTemplate(com.liferay.portal.kernel.lar.PortletDataContext context,
com.liferay.portlet.journal.model.JournalTemplate template)
throws java.io.IOException,
com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
java.io.IOException
com.liferay.portal.PortalException
com.liferay.portal.SystemException
getArticleImageDir
protected static java.lang.String getArticleImageDir(com.liferay.portlet.journal.model.JournalArticle article)
getSmallImageDir
protected static java.lang.String getSmallImageDir(com.liferay.portlet.journal.model.JournalArticle article)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
getSmallImageDir
protected static java.lang.String getSmallImageDir(com.liferay.portlet.journal.model.JournalTemplate template)
throws com.liferay.portal.PortalException,
com.liferay.portal.SystemException
- Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
importArticle
protected static void importArticle(com.liferay.portal.kernel.lar.PortletDataContext context,
java.util.Map<java.lang.String,java.lang.String> structureIds,
java.util.Map<java.lang.String,java.lang.String> templateIds,
java.util.Map<java.lang.String,java.lang.String> articleIds,
com.liferay.portlet.journal.model.JournalArticle article)
throws java.lang.Exception
- Throws:
java.lang.Exception
importStructure
protected static void importStructure(com.liferay.portal.kernel.lar.PortletDataContext context,
java.util.Map<java.lang.String,java.lang.String> structureIds,
com.liferay.portlet.journal.model.JournalStructure structure)
throws java.lang.Exception
- Throws:
java.lang.Exception
importTemplate
protected static void importTemplate(com.liferay.portal.kernel.lar.PortletDataContext context,
java.util.Map<java.lang.String,java.lang.String> structureIds,
java.util.Map<java.lang.String,java.lang.String> templateIds,
com.liferay.portlet.journal.model.JournalTemplate template)
throws java.lang.Exception
- Throws:
java.lang.Exception