Activity Service - add check for private site & more system tests

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9201 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2008-05-21 13:35:34 +00:00
parent 6c5f524c11
commit 86027f41f1
6 changed files with 75 additions and 104 deletions

View File

@@ -27,7 +27,7 @@ package org.alfresco.repo.activities.feed;
import java.util.Date;
import org.json.JSONException;
import org.json.JSONStringer;
import org.json.JSONObject;
/**
* Activity Feed DAO
@@ -158,22 +158,16 @@ public class ActivityFeedDAO
public String getJSONString() throws JSONException
{
return new JSONStringer()
.object()
.key("postUserId")
.value(postUserId)
.key("postDate")
.value(postDate)
.key("feedUserId")
.value(feedUserId)
.key("siteNetwork")
.value(siteNetwork)
.key("activityType")
.value(activityType)
.key("activitySummary")
.value(activitySummary)
.key("activitySummaryFormat")
.value(activitySummaryFormat)
.endObject().toString();
JSONObject jo = new JSONObject();
jo.put("postUserId", postUserId);
jo.put("postDate", postDate);
if (feedUserId != null) { jo.put("feedUserId", feedUserId); } // eg. site feed
jo.put("siteNetwork", siteNetwork);
jo.put("activityType", activityType);
jo.put("activitySummary", activitySummary);
jo.put("activitySummaryFormat", activitySummaryFormat);
return jo.toString();
}
}