public GadgetSandbox(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces) { sm = new Profiles.Framework.Utilities.SessionManagement(); sandboxPassword = ORNGSettings.getSettings().SandboxPassword; if (sandboxPassword != null && sandboxPassword.Length > 0) { LoadAssets(); } }
protected void Page_Load(object sender, EventArgs e) { string subject = Request["subject"]; string predicate = Request["predicate"]; string obj = Request["object"]; string person = Request["person"]; string expand = Request["expand"]; string showDetails = Request["showdetails"]; string callback = Request["callback"]; Int64 nodeid = -1; if (subject != null && subject.Trim().Length > 0) { nodeid = Convert.ToInt64(subject); } else if (person != null && person.Trim().Length > 0) { nodeid = new DataIO().GetNodeId(Convert.ToInt32(person)); } else { Response.Redirect(Profiles.Framework.Utilities.Root.Domain + "/ORNG/JSONLD/Test.htm"); } Response.Clear(); Response.Charset = "charset=UTF-8"; Response.StatusCode = Convert.ToInt16("200"); string URL = Profiles.Framework.Utilities.Root.Domain + "/Profile/Profile.aspx?Subject=" + nodeid; if (predicate != null) { URL += "&Predicate=" + predicate; } if (obj != null) { URL += "&Object=" + obj; } if (expand != null) { URL += "&Expand=" + expand; } if (showDetails != null) { URL += "&ShowDetails=" + showDetails; } URL = ORNGSettings.getSettings().ShindigURL + "/rest/jsonld?userId=" + HttpUtility.UrlEncode(URL); HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(URL); myReq.Accept = "application/json"; // "application/ld+json"; String jsonProfiles = new StreamReader(myReq.GetResponse().GetResponseStream()).ReadToEnd(); //WebClient client = new WebClient(); //String jsonProfiles = client.DownloadString(URL); if (callback != null && callback.Length > 0) { Response.ContentType = "application/javascript"; Response.Write(callback + "(" + jsonProfiles + ");"); } else { Response.ContentType = "application/json"; Response.Write(jsonProfiles); } }
static ORNGSearchRPCService() { // should make this able to take a Dictionary of things searchLimit = ORNGSettings.getSettings().SearchLimit; }