Class SocialActivityInterpreterLocalServiceImpl
Object
com.liferay.portal.kernel.service.BaseLocalServiceImpl
com.liferay.portlet.social.service.base.SocialActivityInterpreterLocalServiceBaseImpl
com.liferay.portlet.social.service.impl.SocialActivityInterpreterLocalServiceImpl
- All Implemented Interfaces:
com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService
,com.liferay.portal.kernel.service.BaseLocalService
,com.liferay.social.kernel.service.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.
- Author:
- Brian Wing Shun Chan
-
Field Summary
Fields inherited from class com.liferay.portlet.social.service.base.SocialActivityInterpreterLocalServiceBaseImpl
counterLocalService, socialActivityInterpreterLocalService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
destroy()
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) Methods inherited from class com.liferay.portlet.social.service.base.SocialActivityInterpreterLocalServiceBaseImpl
getCounterLocalService, getOSGiServiceIdentifier, getSocialActivityInterpreterLocalService, runSQL, setCounterLocalService, setSocialActivityInterpreterLocalService
Methods inherited from class com.liferay.portal.kernel.service.BaseLocalServiceImpl
getClassLoader, getLocalizationMap
-
Constructor Details
-
SocialActivityInterpreterLocalServiceImpl
public SocialActivityInterpreterLocalServiceImpl()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Overrides:
afterPropertiesSet
in classSocialActivityInterpreterLocalServiceBaseImpl
-
destroy
public void destroy()- Overrides:
destroy
in classSocialActivityInterpreterLocalServiceBaseImpl
-
getActivityInterpreters
-
getActivityInterpreters
-
interpret
public 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.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:
selector
- the context in which the activity interpreter is usedactivity
- the activity to be translated to human readable formserviceContext
- the service context to be applied- Returns:
- the activity feed that is a human readable form of the activity
record or
null
if a compatible interpreter is not found
-
interpret
public com.liferay.social.kernel.model.SocialActivityFeedEntry interpret(String selector, com.liferay.social.kernel.model.SocialActivitySet activitySet, com.liferay.portal.kernel.service.ServiceContext serviceContext) -
updateActivitySet
public void updateActivitySet(long activityId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-