public class SocialActivityInterpreterLocalServiceImpl extends SocialActivityInterpreterLocalServiceBaseImpl
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.
counterLocalService, socialActivityInterpreterLocalService
Constructor and Description |
---|
SocialActivityInterpreterLocalServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
Map<String,List<com.liferay.social.kernel.model.SocialActivityInterpreter>> |
getActivityInterpreters() |
List<com.liferay.social.kernel.model.SocialActivityInterpreter> |
getActivityInterpreters(String selector) |
com.liferay.social.kernel.model.SocialActivityFeedEntry |
interpret(String selector,
com.liferay.social.kernel.model.SocialActivity activity,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Creates a human readable activity feed entry for the activity using an
available compatible activity interpreter.
|
com.liferay.social.kernel.model.SocialActivityFeedEntry |
interpret(String selector,
com.liferay.social.kernel.model.SocialActivitySet activitySet,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
void |
updateActivitySet(long activityId) |
destroy, getCounterLocalService, getOSGiServiceIdentifier, getSocialActivityInterpreterLocalService, runSQL, setCounterLocalService, setSocialActivityInterpreterLocalService
public SocialActivityInterpreterLocalServiceImpl()
public void afterPropertiesSet()
afterPropertiesSet
in class SocialActivityInterpreterLocalServiceBaseImpl
public Map<String,List<com.liferay.social.kernel.model.SocialActivityInterpreter>> getActivityInterpreters()
public List<com.liferay.social.kernel.model.SocialActivityInterpreter> getActivityInterpreters(String selector)
public com.liferay.social.kernel.model.SocialActivityFeedEntry interpret(String selector, com.liferay.social.kernel.model.SocialActivity activity, com.liferay.portal.kernel.service.ServiceContext serviceContext)
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.
selector
- the context in which the activity interpreter is usedactivity
- the activity to be translated to human readable formserviceContext
- the service context to be appliednull
if a compatible interpreter is not
foundpublic com.liferay.social.kernel.model.SocialActivityFeedEntry interpret(String selector, com.liferay.social.kernel.model.SocialActivitySet activitySet, com.liferay.portal.kernel.service.ServiceContext serviceContext)
public void updateActivitySet(long activityId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException