com.liferay.portlet.social.service.impl
Class SocialActivityInterpreterLocalServiceImpl
java.lang.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.
|
Method Summary |
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)
|
| Methods inherited from class com.liferay.portlet.social.service.base.SocialActivityInterpreterLocalServiceBaseImpl |
destroy, getCounterLocalService, getOSGiServiceIdentifier, getSocialActivityFinder, getSocialActivityInterpreterLocalService, getSocialActivityLocalService, getSocialActivityPersistence, getSocialActivitySetFinder, getSocialActivitySetLocalService, getSocialActivitySetPersistence, runSQL, setCounterLocalService, setSocialActivityFinder, setSocialActivityInterpreterLocalService, setSocialActivityLocalService, setSocialActivityPersistence, setSocialActivitySetFinder, setSocialActivitySetLocalService, setSocialActivitySetPersistence |
| Methods inherited from class com.liferay.portal.kernel.service.BaseLocalServiceImpl |
getClassLoader, getLocalizationMap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocialActivityInterpreterLocalServiceImpl
public SocialActivityInterpreterLocalServiceImpl()
addActivityInterpreter
public void addActivityInterpreter(com.liferay.social.kernel.model.SocialActivityInterpreter activityInterpreter)
- Adds the activity interpreter to the list of available interpreters.
- Parameters:
activityInterpreter - the activity interpreter
afterPropertiesSet
public void afterPropertiesSet()
- Overrides:
afterPropertiesSet in class SocialActivityInterpreterLocalServiceBaseImpl
deleteActivityInterpreter
public void deleteActivityInterpreter(com.liferay.social.kernel.model.SocialActivityInterpreter activityInterpreter)
- Removes the activity interpreter from the list of available interpreters.
- Parameters:
activityInterpreter - the activity interpreter
getActivityInterpreters
public Map<String,List<com.liferay.social.kernel.model.SocialActivityInterpreter>> getActivityInterpreters()
getActivityInterpreters
public List<com.liferay.social.kernel.model.SocialActivityInterpreter> getActivityInterpreters(String selector)
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