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, socialActivityFinder, socialActivityInterpreterLocalService, socialActivityLocalService, socialActivityPersistence, socialActivitySetFinder, socialActivitySetLocalService, socialActivitySetPersistence| Constructor and Description |
|---|
SocialActivityInterpreterLocalServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addActivityInterpreter(com.liferay.social.kernel.model.SocialActivityInterpreter activityInterpreter)
Adds the activity interpreter to the list of available interpreters.
|
void |
afterPropertiesSet() |
void |
deleteActivityInterpreter(com.liferay.social.kernel.model.SocialActivityInterpreter activityInterpreter)
Removes the activity interpreter from the list of available interpreters.
|
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, getSocialActivityFinder, getSocialActivityInterpreterLocalService, getSocialActivityLocalService, getSocialActivityPersistence, getSocialActivitySetFinder, getSocialActivitySetLocalService, getSocialActivitySetPersistence, runSQL, setCounterLocalService, setSocialActivityFinder, setSocialActivityInterpreterLocalService, setSocialActivityLocalService, setSocialActivityPersistence, setSocialActivitySetFinder, setSocialActivitySetLocalService, setSocialActivitySetPersistencepublic SocialActivityInterpreterLocalServiceImpl()
public void addActivityInterpreter(com.liferay.social.kernel.model.SocialActivityInterpreter activityInterpreter)
activityInterpreter - the activity interpreterpublic void afterPropertiesSet()
afterPropertiesSet in class SocialActivityInterpreterLocalServiceBaseImplpublic void deleteActivityInterpreter(com.liferay.social.kernel.model.SocialActivityInterpreter activityInterpreter)
activityInterpreter - the activity interpreterpublic 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