Package com.liferay.social.kernel.model
Class BaseSocialActivityInterpreter
Object
com.liferay.social.kernel.model.BaseSocialActivityInterpreter
- All Implemented Interfaces:
SocialActivityInterpreter
public abstract class BaseSocialActivityInterpreter
extends Object
implements SocialActivityInterpreter
- Author:
- Brian Wing Shun Chan, Ryan Park
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ResourceBundleLoader
protected String
addNoSuchEntryRedirect
(String url, String className, long classPK, ServiceContext serviceContext) protected String
protected SocialActivityFeedEntry
doInterpret
(SocialActivity activity, ServiceContext serviceContext) protected SocialActivityFeedEntry
doInterpret
(SocialActivitySet activitySet, ServiceContext serviceContext) protected long
getActivitySetId
(long activityId) protected String
getBody
(SocialActivity activity, ServiceContext serviceContext) protected String
getEntryTitle
(SocialActivity activity, ServiceContext serviceContext) protected String
getGroupName
(long groupId, ServiceContext serviceContext) protected String
getJSONValue
(String json, String key) protected String
getJSONValue
(String json, String key, String defaultValue) protected String
getLink
(SocialActivity activity, ServiceContext serviceContext) protected String
getPath
(SocialActivity activity, ServiceContext serviceContext) protected String
getTitle
(SocialActivity activity, ServiceContext serviceContext) protected Object[]
getTitleArguments
(String groupName, SocialActivity activity, String link, String title, ServiceContext serviceContext) protected String
getTitlePattern
(String groupName, SocialActivity activity) protected String
getUserName
(long userId, ServiceContext serviceContext) protected String
getViewEntryInTrashURL
(String className, long classPK, ServiceContext serviceContext) protected String
getViewEntryURL
(String className, long classPK, ServiceContext serviceContext) boolean
hasPermission
(PermissionChecker permissionChecker, SocialActivity activity, String actionId, ServiceContext serviceContext) protected boolean
hasPermissions
(PermissionChecker permissionChecker, SocialActivity activity, String actionId, ServiceContext serviceContext) interpret
(SocialActivity activity, ServiceContext serviceContext) interpret
(SocialActivitySet activitySet, ServiceContext serviceContext) void
updateActivitySet
(long activityId) protected String
protected String
wrapLink
(String link, String key, ServiceContext serviceContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.liferay.social.kernel.model.SocialActivityInterpreter
getClassNames
-
Constructor Details
-
BaseSocialActivityInterpreter
public BaseSocialActivityInterpreter()
-
-
Method Details
-
getSelector
- Specified by:
getSelector
in interfaceSocialActivityInterpreter
-
hasPermission
public boolean hasPermission(PermissionChecker permissionChecker, SocialActivity activity, String actionId, ServiceContext serviceContext) throws Exception - Specified by:
hasPermission
in interfaceSocialActivityInterpreter
- Throws:
Exception
-
interpret
- Specified by:
interpret
in interfaceSocialActivityInterpreter
-
interpret
public SocialActivityFeedEntry interpret(SocialActivitySet activitySet, ServiceContext serviceContext) - Specified by:
interpret
in interfaceSocialActivityInterpreter
-
updateActivitySet
- Specified by:
updateActivitySet
in interfaceSocialActivityInterpreter
- Throws:
PortalException
-
acquireResourceBundleLoader
-
addNoSuchEntryRedirect
protected String addNoSuchEntryRedirect(String url, String className, long classPK, ServiceContext serviceContext) throws Exception - Throws:
Exception
-
buildLink
-
doInterpret
protected SocialActivityFeedEntry doInterpret(SocialActivity activity, ServiceContext serviceContext) throws Exception - Throws:
Exception
-
doInterpret
protected SocialActivityFeedEntry doInterpret(SocialActivitySet activitySet, ServiceContext serviceContext) throws Exception - Throws:
Exception
-
getActivitySetId
protected long getActivitySetId(long activityId) -
getBody
- Throws:
Exception
-
getEntryTitle
protected String getEntryTitle(SocialActivity activity, ServiceContext serviceContext) throws Exception - Throws:
Exception
-
getGroupName
-
getJSONValue
-
getJSONValue
-
getLink
- Throws:
Exception
-
getPath
- Throws:
Exception
-
getTitle
- Throws:
Exception
-
getTitleArguments
protected Object[] getTitleArguments(String groupName, SocialActivity activity, String link, String title, ServiceContext serviceContext) throws Exception - Throws:
Exception
-
getTitlePattern
- Throws:
Exception
-
getUserName
-
getViewEntryInTrashURL
protected String getViewEntryInTrashURL(String className, long classPK, ServiceContext serviceContext) throws Exception - Throws:
Exception
-
getViewEntryURL
protected String getViewEntryURL(String className, long classPK, ServiceContext serviceContext) throws Exception - Throws:
Exception
-
hasPermissions
protected boolean hasPermissions(PermissionChecker permissionChecker, SocialActivity activity, String actionId, ServiceContext serviceContext) throws Exception - Throws:
Exception
-
wrapLink
-
wrapLink
-