|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JournalCreationStrategy
An interface defining how newly created content should be added to the Journal when imported from a LAR file. A class implementing this interface should be specified in portal.properties under the journal.lar.creation.strategy property.
Field Summary | |
---|---|
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() and/or getApprovalUserId() that indicates the default portlet data import user id strategy that should be used to determine the user id. |
Method Summary | |
---|---|
boolean |
addCommunityPermissions(com.liferay.portal.lar.PortletDataContext context,
java.lang.Object journalObj)
Returns true if the default community permissions should be added when the specified journalObj is created. |
boolean |
addGuestPermissions(com.liferay.portal.lar.PortletDataContext context,
java.lang.Object journalObj)
Returns true if the default guest permissions should be added when the specified journalObj is created. |
long |
getApprovalUserId(com.liferay.portal.lar.PortletDataContext context,
java.lang.Object journalObj)
Returns the approver's user id to assign to newly created content. |
long |
getAuthorUserId(com.liferay.portal.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.portal.lar.PortletDataContext context,
com.liferay.portlet.journal.model.JournalArticle newArticle)
Gives the content creation strategy an opportunity to transform the content before the new article is saved to the database. |
Field Detail |
---|
static final long USE_DEFAULT_USER_ID_STRATEGY
static final java.lang.String ARTICLE_CONTENT_UNCHANGED
Method Detail |
---|
long getAuthorUserId(com.liferay.portal.lar.PortletDataContext context, java.lang.Object journalObj) throws java.lang.Exception
context
- the context of the data importjournalObj
- the new object must be an instance of
JournalArticle, JournalStructure, or JournalTemplate
java.lang.Exception
long getApprovalUserId(com.liferay.portal.lar.PortletDataContext context, java.lang.Object journalObj) throws java.lang.Exception
context
- the context of the data importjournalObj
- the new object must be an instance of
JournalArticle, JournalStructure, or JournalTemplate
java.lang.Exception
java.lang.String getTransformedContent(com.liferay.portal.lar.PortletDataContext context, com.liferay.portlet.journal.model.JournalArticle newArticle) throws java.lang.Exception
context
- the context of the data importnewArticle
- the new article being created
java.lang.Exception
boolean addCommunityPermissions(com.liferay.portal.lar.PortletDataContext context, java.lang.Object journalObj) throws java.lang.Exception
context
- the context of the data importjournalObj
- the new object must be an instance of
JournalArticle, JournalStructure, or JournalTemplate
java.lang.Exception
boolean addGuestPermissions(com.liferay.portal.lar.PortletDataContext context, java.lang.Object journalObj) throws java.lang.Exception
context
- the context of the data importjournalObj
- the new object must be an instance of
JournalArticle, JournalStructure, or JournalTemplate
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |