Search in sources :

Example 6 with Activity

use of org.apache.shindig.social.opensocial.model.Activity in project liferay-ide by liferay.

the class LiferayActivityService method getExternalActivity.

protected Activity getExternalActivity(SocialActivity socialActivity) throws Exception {
    Activity activity = new ActivityImpl(String.valueOf(socialActivity.getClassPK()), String.valueOf(socialActivity.getUserId()));
    JSONObject extraDataJSONObject = JSONFactoryUtil.createJSONObject(socialActivity.getExtraData());
    SerializerUtil.copyProperties(extraDataJSONObject, activity, _ACTIVITY_FIELDS);
    return activity;
}
Also used : ActivityImpl(org.apache.shindig.social.core.model.ActivityImpl) JSONObject(com.liferay.portal.kernel.json.JSONObject) SocialActivity(com.liferay.portlet.social.model.SocialActivity) Activity(org.apache.shindig.social.opensocial.model.Activity)

Aggregations

SocialActivity (com.liferay.portlet.social.model.SocialActivity)6 Activity (org.apache.shindig.social.opensocial.model.Activity)6 JSONObject (com.liferay.portal.kernel.json.JSONObject)2 ThemeDisplay (com.liferay.portal.theme.ThemeDisplay)2 ArrayList (java.util.ArrayList)2 RestfulCollection (org.apache.shindig.protocol.RestfulCollection)2 ActivityImpl (org.apache.shindig.social.core.model.ActivityImpl)2 ServiceContext (com.liferay.portal.service.ServiceContext)1 SocialActivityFeedEntry (com.liferay.portlet.social.model.SocialActivityFeedEntry)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1 UserId (org.apache.shindig.social.opensocial.spi.UserId)1