|
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.portal.service.BaseLocalServiceImpl com.liferay.portlet.social.service.base.SocialActivityInterpreterLocalServiceBaseImpl com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl
public class SocialActivityInterpreterLocalServiceImpl
The social activity interpreter local service. Activity interpreters are classes responsible for translating activity records into human readable form. This service holds a list of interpreters and provides methods to add or remove items from this list.
Activity interpreters use the language files to get text fragments based on the activity's type and the type of asset on which the activity was done. Interpreters are created for specific asset types and are only capable of translating activities done on assets of those types. As an example, there is an interpreter BlogsActivityInterpreter that can only translate activity records for blog entries.
Field Summary |
---|
Constructor Summary | |
---|---|
SocialActivityInterpreterLocalServiceImpl()
|
Method Summary | |
---|---|
void |
addActivityInterpreter(SocialActivityInterpreter activityInterpreter)
Adds the activity interpreter to the list of available interpreters. |
void |
deleteActivityInterpreter(SocialActivityInterpreter activityInterpreter)
Removes the activity interpreter from the list of available interpreters. |
SocialActivityFeedEntry |
interpret(SocialActivity activity,
ThemeDisplay themeDisplay)
Creates a human readable activity feed entry for the activity using an available compatible activity interpreter. |
Methods inherited from class com.liferay.portal.service.BaseLocalServiceImpl |
---|
getClassLoader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SocialActivityInterpreterLocalServiceImpl()
Method Detail |
---|
public void addActivityInterpreter(SocialActivityInterpreter activityInterpreter)
activityInterpreter
- the activity interpreterpublic void deleteActivityInterpreter(SocialActivityInterpreter activityInterpreter)
activityInterpreter
- the activity interpreterpublic SocialActivityFeedEntry interpret(SocialActivity activity, ThemeDisplay themeDisplay)
This method finds the appropriate interpreter for the activity by going through the available interpreters and asking them if they can handle the asset type of the activity.
activity
- the activity to be translated to human readable formthemeDisplay
- the theme display needed by interpreters to create
links and get localized text fragments
null
if a compatible interpreter is not
found
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |