Liferay 6.1.2-ce-ga3

com.liferay.portlet.social.service.impl
Class SocialActivityInterpreterLocalServiceImpl

java.lang.Object
  extended by com.liferay.portal.service.BaseLocalServiceImpl
      extended by com.liferay.portlet.social.service.base.SocialActivityInterpreterLocalServiceBaseImpl
          extended by com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl
All Implemented Interfaces:
IdentifiableBean, BaseLocalService, SocialActivityInterpreterLocalService

public class SocialActivityInterpreterLocalServiceImpl
extends SocialActivityInterpreterLocalServiceBaseImpl

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
 
Fields inherited from class com.liferay.portlet.social.service.base.SocialActivityInterpreterLocalServiceBaseImpl
counterLocalService, resourceFinder, resourceLocalService, resourcePersistence, resourceService, socialActivityAchievementLocalService, socialActivityAchievementPersistence, socialActivityCounterFinder, socialActivityCounterLocalService, socialActivityCounterPersistence, socialActivityFinder, socialActivityInterpreterLocalService, socialActivityLimitLocalService, socialActivityLimitPersistence, socialActivityLocalService, socialActivityPersistence, socialActivitySettingLocalService, socialActivitySettingPersistence, socialActivitySettingService, socialRelationLocalService, socialRelationPersistence, socialRequestInterpreterLocalService, socialRequestLocalService, socialRequestPersistence, userFinder, userLocalService, userPersistence, userService
 
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.portlet.social.service.base.SocialActivityInterpreterLocalServiceBaseImpl
afterPropertiesSet, destroy, getBeanIdentifier, getCounterLocalService, getResourceFinder, getResourceLocalService, getResourcePersistence, getResourceService, getSocialActivityAchievementLocalService, getSocialActivityAchievementPersistence, getSocialActivityCounterFinder, getSocialActivityCounterLocalService, getSocialActivityCounterPersistence, getSocialActivityFinder, getSocialActivityInterpreterLocalService, getSocialActivityLimitLocalService, getSocialActivityLimitPersistence, getSocialActivityLocalService, getSocialActivityPersistence, getSocialActivitySettingLocalService, getSocialActivitySettingPersistence, getSocialActivitySettingService, getSocialRelationLocalService, getSocialRelationPersistence, getSocialRequestInterpreterLocalService, getSocialRequestLocalService, getSocialRequestPersistence, getUserFinder, getUserLocalService, getUserPersistence, getUserService, runSQL, setBeanIdentifier, setCounterLocalService, setResourceFinder, setResourceLocalService, setResourcePersistence, setResourceService, setSocialActivityAchievementLocalService, setSocialActivityAchievementPersistence, setSocialActivityCounterFinder, setSocialActivityCounterLocalService, setSocialActivityCounterPersistence, setSocialActivityFinder, setSocialActivityInterpreterLocalService, setSocialActivityLimitLocalService, setSocialActivityLimitPersistence, setSocialActivityLocalService, setSocialActivityPersistence, setSocialActivitySettingLocalService, setSocialActivitySettingPersistence, setSocialActivitySettingService, setSocialRelationLocalService, setSocialRelationPersistence, setSocialRequestInterpreterLocalService, setSocialRequestLocalService, setSocialRequestPersistence, setUserFinder, setUserLocalService, setUserPersistence, setUserService
 
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

SocialActivityInterpreterLocalServiceImpl

public SocialActivityInterpreterLocalServiceImpl()
Method Detail

addActivityInterpreter

public void addActivityInterpreter(SocialActivityInterpreter activityInterpreter)
Adds the activity interpreter to the list of available interpreters.

Parameters:
activityInterpreter - the activity interpreter

deleteActivityInterpreter

public void deleteActivityInterpreter(SocialActivityInterpreter activityInterpreter)
Removes the activity interpreter from the list of available interpreters.

Parameters:
activityInterpreter - the activity interpreter

interpret

public SocialActivityFeedEntry interpret(SocialActivity activity,
                                         ThemeDisplay themeDisplay)
Creates a human readable activity feed entry for the activity using an available compatible activity interpreter.

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.

Parameters:
activity - the activity to be translated to human readable form
themeDisplay - the theme display needed by interpreters to create links and get localized text fragments
Returns:
the activity feed that is a human readable form of the activity record or null if a compatible interpreter is not found

Liferay 6.1.2-ce-ga3