com.liferay.portlet.social.model
Class BaseSocialActivityInterpreter

java.lang.Object
  extended by com.liferay.portlet.social.model.BaseSocialActivityInterpreter
All Implemented Interfaces:
SocialActivityInterpreter

public abstract class BaseSocialActivityInterpreter
extends java.lang.Object
implements SocialActivityInterpreter

Author:
Brian Wing Shun Chan, Ryan Park

Constructor Summary
BaseSocialActivityInterpreter()
           
 
Method Summary
protected  java.lang.String addNoSuchEntryRedirect(java.lang.String url, java.lang.String className, long classPK, ServiceContext serviceContext)
           
protected  java.lang.String buildLink(java.lang.String link, java.lang.String text)
           
protected  java.lang.String cleanContent(java.lang.String content)
          Deprecated. As of 6.2.0
protected  SocialActivityFeedEntry doInterpret(SocialActivity activity, ServiceContext serviceContext)
           
protected  SocialActivityFeedEntry doInterpret(SocialActivitySet activitySet, ServiceContext serviceContext)
           
protected  SocialActivityFeedEntry doInterpret(SocialActivity activity, ThemeDisplay themeDisplay)
          Deprecated. As of 6.2.0
protected  long getActivitySetId(long activityId)
           
protected  java.lang.String getBody(SocialActivity activity, ServiceContext serviceContext)
           
protected  java.lang.String getEntryTitle(SocialActivity activity, ServiceContext serviceContext)
           
protected  java.lang.String getGroupName(long groupId, ServiceContext serviceContext)
           
protected  java.lang.String getGroupName(long groupId, ThemeDisplay themeDisplay)
          Deprecated. As of 6.2.0, replaced by getGroupName(long, ServiceContext)
protected  java.lang.String getJSONValue(java.lang.String json, java.lang.String key)
           
protected  java.lang.String getJSONValue(java.lang.String json, java.lang.String key, java.lang.String defaultValue)
           
protected  java.lang.String getLink(SocialActivity activity, ServiceContext serviceContext)
           
protected  java.lang.String getPath(SocialActivity activity, ServiceContext serviceContext)
           
 java.lang.String getSelector()
           
protected  java.lang.String getTitle(SocialActivity activity, ServiceContext serviceContext)
           
protected  java.lang.Object[] getTitleArguments(java.lang.String groupName, SocialActivity activity, java.lang.String link, java.lang.String title, ServiceContext serviceContext)
           
protected  java.lang.String getTitlePattern(java.lang.String groupName, SocialActivity activity)
           
protected  java.lang.String getUserName(long userId, ServiceContext serviceContext)
           
protected  java.lang.String getUserName(long userId, ThemeDisplay themeDisplay)
          Deprecated. As of 6.2.0, replaced by getUserName(long, ServiceContext)
protected  java.lang.String getValue(java.lang.String json, java.lang.String key, java.lang.String defaultValue)
          Deprecated. As of 6.2.0, replaced by getJSONValue(String, String, String)
protected  javax.portlet.PortletURL getViewEntryPortletURL(java.lang.String className, long classPK, ServiceContext serviceContext)
           
 boolean hasPermission(PermissionChecker permissionChecker, SocialActivity activity, java.lang.String actionId, ServiceContext serviceContext)
           
protected  boolean hasPermissions(PermissionChecker permissionChecker, SocialActivity activity, java.lang.String actionId, ServiceContext serviceContext)
           
 SocialActivityFeedEntry interpret(SocialActivity activity, ServiceContext serviceContext)
           
 SocialActivityFeedEntry interpret(SocialActivitySet activitySet, ServiceContext serviceContext)
           
 void updateActivitySet(long activityId)
           
protected  java.lang.String wrapLink(java.lang.String link, java.lang.String title)
           
protected  java.lang.String wrapLink(java.lang.String link, java.lang.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.portlet.social.model.SocialActivityInterpreter
getClassNames
 

Constructor Detail

BaseSocialActivityInterpreter

public BaseSocialActivityInterpreter()
Method Detail

getSelector

public java.lang.String getSelector()
Specified by:
getSelector in interface SocialActivityInterpreter

hasPermission

public boolean hasPermission(PermissionChecker permissionChecker,
                             SocialActivity activity,
                             java.lang.String actionId,
                             ServiceContext serviceContext)
                      throws java.lang.Exception
Specified by:
hasPermission in interface SocialActivityInterpreter
Throws:
java.lang.Exception

interpret

public SocialActivityFeedEntry interpret(SocialActivity activity,
                                         ServiceContext serviceContext)
Specified by:
interpret in interface SocialActivityInterpreter

interpret

public SocialActivityFeedEntry interpret(SocialActivitySet activitySet,
                                         ServiceContext serviceContext)
Specified by:
interpret in interface SocialActivityInterpreter

updateActivitySet

public void updateActivitySet(long activityId)
                       throws PortalException,
                              SystemException
Specified by:
updateActivitySet in interface SocialActivityInterpreter
Throws:
PortalException
SystemException

addNoSuchEntryRedirect

protected java.lang.String addNoSuchEntryRedirect(java.lang.String url,
                                                  java.lang.String className,
                                                  long classPK,
                                                  ServiceContext serviceContext)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

buildLink

protected java.lang.String buildLink(java.lang.String link,
                                     java.lang.String text)

cleanContent

protected java.lang.String cleanContent(java.lang.String content)
Deprecated. As of 6.2.0


doInterpret

protected SocialActivityFeedEntry doInterpret(SocialActivity activity,
                                              ServiceContext serviceContext)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

doInterpret

protected SocialActivityFeedEntry doInterpret(SocialActivity activity,
                                              ThemeDisplay themeDisplay)
                                       throws java.lang.Exception
Deprecated. As of 6.2.0

Throws:
java.lang.Exception

doInterpret

protected SocialActivityFeedEntry doInterpret(SocialActivitySet activitySet,
                                              ServiceContext serviceContext)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

getActivitySetId

protected long getActivitySetId(long activityId)

getBody

protected java.lang.String getBody(SocialActivity activity,
                                   ServiceContext serviceContext)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getEntryTitle

protected java.lang.String getEntryTitle(SocialActivity activity,
                                         ServiceContext serviceContext)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

getGroupName

protected java.lang.String getGroupName(long groupId,
                                        ServiceContext serviceContext)

getGroupName

protected java.lang.String getGroupName(long groupId,
                                        ThemeDisplay themeDisplay)
Deprecated. As of 6.2.0, replaced by getGroupName(long, ServiceContext)


getJSONValue

protected java.lang.String getJSONValue(java.lang.String json,
                                        java.lang.String key)

getJSONValue

protected java.lang.String getJSONValue(java.lang.String json,
                                        java.lang.String key,
                                        java.lang.String defaultValue)

getLink

protected java.lang.String getLink(SocialActivity activity,
                                   ServiceContext serviceContext)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getPath

protected java.lang.String getPath(SocialActivity activity,
                                   ServiceContext serviceContext)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getTitle

protected java.lang.String getTitle(SocialActivity activity,
                                    ServiceContext serviceContext)
                             throws java.lang.Exception
Throws:
java.lang.Exception

getTitleArguments

protected java.lang.Object[] getTitleArguments(java.lang.String groupName,
                                               SocialActivity activity,
                                               java.lang.String link,
                                               java.lang.String title,
                                               ServiceContext serviceContext)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

getTitlePattern

protected java.lang.String getTitlePattern(java.lang.String groupName,
                                           SocialActivity activity)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

getUserName

protected java.lang.String getUserName(long userId,
                                       ServiceContext serviceContext)

getUserName

protected java.lang.String getUserName(long userId,
                                       ThemeDisplay themeDisplay)
Deprecated. As of 6.2.0, replaced by getUserName(long, ServiceContext)


getValue

protected java.lang.String getValue(java.lang.String json,
                                    java.lang.String key,
                                    java.lang.String defaultValue)
Deprecated. As of 6.2.0, replaced by getJSONValue(String, String, String)


getViewEntryPortletURL

protected javax.portlet.PortletURL getViewEntryPortletURL(java.lang.String className,
                                                          long classPK,
                                                          ServiceContext serviceContext)
                                                   throws java.lang.Exception
Throws:
java.lang.Exception

hasPermissions

protected boolean hasPermissions(PermissionChecker permissionChecker,
                                 SocialActivity activity,
                                 java.lang.String actionId,
                                 ServiceContext serviceContext)
                          throws java.lang.Exception
Throws:
java.lang.Exception

wrapLink

protected java.lang.String wrapLink(java.lang.String link,
                                    java.lang.String title)

wrapLink

protected java.lang.String wrapLink(java.lang.String link,
                                    java.lang.String key,
                                    ServiceContext serviceContext)