public class JournalCreationStrategyImpl extends java.lang.Object implements JournalCreationStrategy
For a better understanding of this class, see
com.liferay.journal.content.web.lar.JournalContentPortletDataHandler
located in Liferay Portal's external modules directory.
ARTICLE_CONTENT_UNCHANGED, USE_DEFAULT_USER_ID_STRATEGY| Constructor and Description |
|---|
JournalCreationStrategyImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addGroupPermissions(com.liferay.exportimport.kernel.lar.PortletDataContext context,
java.lang.Object journalObj)
Returns
true if the default group permissions should be
added when the specified journalObj is created. |
boolean |
addGuestPermissions(com.liferay.exportimport.kernel.lar.PortletDataContext context,
java.lang.Object journalObj)
Returns
true if the default guest permissions should be
added when the specified journalObj is created. |
long |
getAuthorUserId(com.liferay.exportimport.kernel.lar.PortletDataContext context,
java.lang.Object journalObj)
Returns the author's user ID to assign to newly created content.
|
java.lang.String |
getTransformedContent(com.liferay.exportimport.kernel.lar.PortletDataContext context,
com.liferay.journal.model.JournalArticle newArticle)
Gives the content creation strategy an opportunity to transform the
content before the new article is saved to the database.
|
public boolean addGroupPermissions(com.liferay.exportimport.kernel.lar.PortletDataContext context,
java.lang.Object journalObj)
throws java.lang.Exception
JournalCreationStrategytrue if the default group permissions should be
added when the specified journalObj is created.addGroupPermissions in interface JournalCreationStrategycontext - the portlet data contextjournalObj - the journal objecttrue if default group permissions should be added to
the specified journalObjjava.lang.Exception - if an exception occurredpublic boolean addGuestPermissions(com.liferay.exportimport.kernel.lar.PortletDataContext context,
java.lang.Object journalObj)
throws java.lang.Exception
JournalCreationStrategytrue if the default guest permissions should be
added when the specified journalObj is created.addGuestPermissions in interface JournalCreationStrategycontext - the portlet data contextjournalObj - the journal objecttrue if default guest permissions should be added to
the specified journalObjjava.lang.Exception - if an exception occurredpublic long getAuthorUserId(com.liferay.exportimport.kernel.lar.PortletDataContext context,
java.lang.Object journalObj)
throws java.lang.Exception
JournalCreationStrategygetAuthorUserId in interface JournalCreationStrategycontext - the portlet data contextjournalObj - the journal objectjava.lang.Exception - if an exception occurredpublic java.lang.String getTransformedContent(com.liferay.exportimport.kernel.lar.PortletDataContext context,
com.liferay.journal.model.JournalArticle newArticle)
throws java.lang.Exception
JournalCreationStrategynull is returned, the article content will be added
unchanged.getTransformedContent in interface JournalCreationStrategycontext - the portlet data contextnewArticle - the new journal articlejava.lang.Exception - if an exception occurred