public interface JournalCreationStrategy
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ARTICLE_CONTENT_UNCHANGED
Constant returned by getTransformedContent() to indicate that the article
text should remained unchanged.
|
static long |
USE_DEFAULT_USER_ID_STRATEGY
Constant returned by getAuthorUserId() that indicates the default portlet
data import user ID strategy that should be used to determine the user
ID.
|
| 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.
|
static final java.lang.String ARTICLE_CONTENT_UNCHANGED
static final long USE_DEFAULT_USER_ID_STRATEGY
boolean addGroupPermissions(com.liferay.exportimport.kernel.lar.PortletDataContext context,
java.lang.Object journalObj)
throws java.lang.Exception
true if the default group permissions should be
added when the specified journalObj is created.context - the portlet data contextjournalObj - the journal objecttrue if default group permissions should be added to
the specified journalObjjava.lang.Exception - if an exception occurredboolean addGuestPermissions(com.liferay.exportimport.kernel.lar.PortletDataContext context,
java.lang.Object journalObj)
throws java.lang.Exception
true if the default guest permissions should be
added when the specified journalObj is created.context - the portlet data contextjournalObj - the journal objecttrue if default guest permissions should be added to
the specified journalObjjava.lang.Exception - if an exception occurredlong getAuthorUserId(com.liferay.exportimport.kernel.lar.PortletDataContext context,
java.lang.Object journalObj)
throws java.lang.Exception
context - the portlet data contextjournalObj - the journal objectjava.lang.Exception - if an exception occurredjava.lang.String getTransformedContent(com.liferay.exportimport.kernel.lar.PortletDataContext context,
com.liferay.journal.model.JournalArticle newArticle)
throws java.lang.Exception
null is returned, the article content will be added
unchanged.context - the portlet data contextnewArticle - the new journal articlejava.lang.Exception - if an exception occurred