|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.liferay.portlet.journal.lar.JournalCreationStrategyImpl
Provides the strategy for creating new content when new Journal content is imported into a layout set from a LAR. The default strategy implemented by this class is to return the first user in the database that is a member of the specified group as the author Id. If the group contains no users, the original author will remain unchanged.
Content will be added as is (i.e. no transformations).
JournalContentPortletDataHandlerImpl
Constructor Summary | |
JournalCreationStrategyImpl()
|
Method Summary | |
boolean |
addCommunityPermissions(long companyId,
long groupId,
java.lang.Object journalObj)
Returns true if the default community permissions should be added when the specified journalObj is created. |
boolean |
addGuestPermissions(long companyId,
long groupId,
java.lang.Object journalObj)
Returns true if the default guest permissions should be added when the specified journalObj is created. |
long |
getApprovalUserId(long companyId,
long groupId,
java.lang.Object journalObj)
Returns the approver's user id to assign to newly created content. |
java.lang.String |
getApprovalUserName(long companyId,
long groupId,
java.lang.Object journalObj)
Returns the approver's user name. |
long |
getAuthorUserId(long companyId,
long groupId,
java.lang.Object journalObj)
Returns the author's user id to assign to newly created content. |
java.lang.String |
getAuthorUserName(long companyId,
long groupId,
java.lang.Object journalObj)
Returns the author's user name. |
protected com.liferay.portal.model.User |
getFirstUser(long groupId)
|
java.lang.String |
getTransformedContent(long companyId,
long groupId,
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JournalCreationStrategyImpl()
Method Detail |
public long getAuthorUserId(long companyId, long groupId, java.lang.Object journalObj) throws java.lang.Exception
JournalCreationStrategy
getAuthorUserId
in interface JournalCreationStrategy
companyId
- the company id of the layoutgroupId
- the group id of the layoutjournalObj
- the new object must be an instance of
JournalArticle, JournalStructure or JournalTemplate
java.lang.Exception
public java.lang.String getAuthorUserName(long companyId, long groupId, java.lang.Object journalObj) throws java.lang.Exception
JournalCreationStrategy
getAuthorUserId()
returns null.
getAuthorUserName
in interface JournalCreationStrategy
companyId
- the company id of the layoutgroupId
- the group id of the layoutjournalObj
- the new object must be an instance of
JournalArticle, JournalStructure or JournalTemplate
getAuthorUserId()
does not return null
java.lang.Exception
public java.lang.String getApprovalUserName(long companyId, long groupId, java.lang.Object journalObj) throws java.lang.Exception
JournalCreationStrategy
getApprovalUserId()
returns null.
getApprovalUserName
in interface JournalCreationStrategy
companyId
- the company id of the layoutgroupId
- the group id of the layoutjournalObj
- the new object must be an instance of
JournalArticle, JournalStructure or JournalTemplate
getApprovalUserId()
does not return null
java.lang.Exception
public long getApprovalUserId(long companyId, long groupId, java.lang.Object journalObj) throws java.lang.Exception
JournalCreationStrategy
getApprovalUserId
in interface JournalCreationStrategy
companyId
- the company id of the layoutgroupId
- the group id of the layoutjournalObj
- the new object must be an instance of
JournalArticle, JournalStructure or JournalTemplate
java.lang.Exception
public java.lang.String getTransformedContent(long companyId, long groupId, com.liferay.portlet.journal.model.JournalArticle newArticle) throws java.lang.Exception
JournalCreationStrategy
getTransformedContent
in interface JournalCreationStrategy
companyId
- the company id of the layoutgroupId
- the group id of the layoutnewArticle
- the new article being created
java.lang.Exception
public boolean addCommunityPermissions(long companyId, long groupId, java.lang.Object journalObj) throws java.lang.Exception
JournalCreationStrategy
addCommunityPermissions
in interface JournalCreationStrategy
companyId
- the company id of the layoutgroupId
- the group id of the layoutjournalObj
- the new object must be an instance of
JournalArticle, JournalStructure or JournalTemplate
java.lang.Exception
public boolean addGuestPermissions(long companyId, long groupId, java.lang.Object journalObj) throws java.lang.Exception
JournalCreationStrategy
addGuestPermissions
in interface JournalCreationStrategy
companyId
- the company id of the layoutgroupId
- the group id of the layoutjournalObj
- the new object must be an instance of
JournalArticle, JournalStructure or JournalTemplate
java.lang.Exception
protected com.liferay.portal.model.User getFirstUser(long groupId) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |