|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portlet.journal.lar.JournalCreationStrategyImpl
public class 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 zero for the author and approval user IDs, which causes the default user ID import strategy to be used. Content will be added as is with no transformations.
JournalContentPortletDataHandlerImpl
,
JournalPortletDataHandlerImpl
Field Summary |
---|
Fields inherited from interface com.liferay.portlet.journal.lar.JournalCreationStrategy |
---|
ARTICLE_CONTENT_UNCHANGED, USE_DEFAULT_USER_ID_STRATEGY |
Constructor Summary | |
---|---|
JournalCreationStrategyImpl()
|
Method Summary | |
---|---|
boolean |
addGroupPermissions(PortletDataContext context,
Object journalObj)
Returns true if the default group permissions should be
added when the specified journalObj is created. |
boolean |
addGuestPermissions(PortletDataContext context,
Object journalObj)
Returns true if the default guest permissions should be
added when the specified journalObj is created. |
long |
getAuthorUserId(PortletDataContext context,
Object journalObj)
Returns the author's user ID to assign to newly created content. |
String |
getTransformedContent(PortletDataContext context,
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 boolean addGroupPermissions(PortletDataContext context, Object journalObj) throws Exception
JournalCreationStrategy
true
if the default group permissions should be
added when the specified journalObj is created.
addGroupPermissions
in interface JournalCreationStrategy
context
- the portlet data contextjournalObj
- the journal object
true
if default group permissions should be added to
the specified journalObj
Exception
- if an exception occurredpublic boolean addGuestPermissions(PortletDataContext context, Object journalObj) throws Exception
JournalCreationStrategy
true
if the default guest permissions should be
added when the specified journalObj is created.
addGuestPermissions
in interface JournalCreationStrategy
context
- the portlet data contextjournalObj
- the journal object
true
if default guest permissions should be added to
the specified journalObj
Exception
- if an exception occurredpublic long getAuthorUserId(PortletDataContext context, Object journalObj) throws Exception
JournalCreationStrategy
getAuthorUserId
in interface JournalCreationStrategy
context
- the portlet data contextjournalObj
- the journal object
Exception
- if an exception occurredpublic String getTransformedContent(PortletDataContext context, JournalArticle newArticle) throws Exception
JournalCreationStrategy
null
is returned, the article content will be added
unchanged.
getTransformedContent
in interface JournalCreationStrategy
context
- the portlet data contextnewArticle
- the new journal article
Exception
- if an exception occurred
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |