| com.liferay.portlet.journal.lar.JournalCreationStrategy
All known Subclasses: com.liferay.portlet.journal.lar.JournalCreationStrategyImpl,
JournalCreationStrategy | public interface JournalCreationStrategy (Code) | | View Source
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.
author: Joel Kozikowski |
Field Summary | |
final public static String | ARTICLE_CONTENT_UNCHANGED Constant returned by getTransformedContent() to indicate that the
article text should remained unchanged. | final public 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 | |
public boolean | addCommunityPermissions(long companyId, long groupId, Object journalObj) Returns true if the default community permissions should be added when
the specified journalObj is created. | public boolean | addGuestPermissions(long companyId, long groupId, Object journalObj) Returns true if the default guest permissions should be added when the
specified journalObj is created. | public long | getApprovalUserId(long companyId, long groupId, Object journalObj) Returns the approver's user id to assign to newly created content. | public long | getAuthorUserId(long companyId, long groupId, Object journalObj) Returns the author's user id to assign to newly created content. | public String | getTransformedContent(long companyId, long groupId, JournalArticle newArticle) Gives the content creation strategy an opportunity to transform the
content before the new article is saved to the database. |
ARTICLE_CONTENT_UNCHANGED | final public static String ARTICLE_CONTENT_UNCHANGED(Code) | | Constant returned by getTransformedContent() to indicate that the
article text should remained unchanged.
|
USE_DEFAULT_USER_ID_STRATEGY | final public static long USE_DEFAULT_USER_ID_STRATEGY(Code) | | 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.
|
addCommunityPermissions | public boolean addCommunityPermissions(long companyId, long groupId, Object journalObj) throws Exception(Code) | | Returns true if the default community permissions should be added when
the specified journalObj is created.
Parameters: companyId - the company id of the layout Parameters: groupId - the group id of the layout Parameters: journalObj - the new object must be an instance ofJournalArticle, JournalStructure, or JournalTemplate true if default community permissions should be added to thespecified journalObj |
addGuestPermissions | public boolean addGuestPermissions(long companyId, long groupId, Object journalObj) throws Exception(Code) | | Returns true if the default guest permissions should be added when the
specified journalObj is created.
Parameters: companyId - the company id of the layout Parameters: groupId - the group id of the layout Parameters: journalObj - the new object must be an instance ofJournalArticle, JournalStructure, or JournalTemplate true if default guest permissions should be added to thespecified journalObj |
getApprovalUserId | public long getApprovalUserId(long companyId, long groupId, Object journalObj) throws Exception(Code) | | Returns the approver's user id to assign to newly created content. If
zero is returned, the default user id import strategy will determine the
author id.
Parameters: companyId - the company id of the layout Parameters: groupId - the group id of the layout Parameters: journalObj - the new object must be an instance ofJournalArticle, JournalStructure, or JournalTemplate the approver's user id or USE_DEFAULT_USER_ID_STRATEGY touse the default user id strategy |
getAuthorUserId | public long getAuthorUserId(long companyId, long groupId, Object journalObj) throws Exception(Code) | | Returns the author's user id to assign to newly created content. If zero
is returned, the default user id import strategy will determine the
author id.
Parameters: companyId - the company id of the layout Parameters: groupId - the group id of the layout Parameters: journalObj - the new object must be an instance ofJournalArticle, JournalStructure, or JournalTemplate the author's user id or USE_DEFAULT_USER_ID_STRATEGY to usethe default user id strategy |
getTransformedContent | public String getTransformedContent(long companyId, long groupId, JournalArticle newArticle) throws Exception(Code) | | Gives the content creation strategy an opportunity to transform the
content before the new article is saved to the database. Possible use
cases include using Velocity to merge in community specific values into
the text. Returns the new content to assign to the article. If null is
returned, the article content will be added unchanged.
Parameters: companyId - the company id of the layout Parameters: groupId - the group id of the layout Parameters: newArticle - the new article being created the transformed content to save in the database orARTICLE_CONTENT_UNCHANGED if the content should be addedunchanged |
|
|