public CacheInfo GetCacheInfo(string scope, string app) { try { OutgoingWebResponseContext context = WebOperationContext.Current.OutgoingResponse; context.ContentType = "application/xml"; return(_adapterProvider.GetCacheInfo(scope, app)); } catch (Exception ex) { CustomErrorLog objCustomErrorLog = new CustomErrorLog(); _CustomError = objCustomErrorLog.customErrorLogger(ErrorMessages.errGetCacheInfo, ex, _logger); objCustomErrorLog.throwJsonResponse(_CustomError); return(null); } }
public PermissionGroups GetAllLDAPSecurityGroups() { try { OutgoingWebResponseContext context = WebOperationContext.Current.OutgoingResponse; context.ContentType = "application/xml"; return(_adapterProvider.GetAllSecurityGroups()); } catch (Exception ex) { CustomErrorLog objCustomErrorLog = new CustomErrorLog(); _CustomError = objCustomErrorLog.customErrorLogger(ErrorMessages.errSecurityGroups, ex, _logger); objCustomErrorLog.throwJsonResponse(_CustomError); return(null); } }
public NameValueList GetUISettings() { try { OutgoingWebResponseContext context = WebOperationContext.Current.OutgoingResponse; context.ContentType = "application/xml"; return(_adapterProvider.GetGlobalUISettings()); } catch (Exception ex) { CustomErrorLog objCustomErrorLog = new CustomErrorLog(); _CustomError = objCustomErrorLog.customErrorLogger(ErrorMessages.errGetUISettings, ex, _logger); objCustomErrorLog.throwJsonResponse(_CustomError); return(null); } }
public void GetDatalayers() { try { DataLayers dataLayers = _adapterProvider.GetDataLayers(); string xml = Utility.Serialize <DataLayers>(dataLayers, true); HttpContext.Current.Response.ContentType = "application/xml"; HttpContext.Current.Response.Write(xml); } catch (Exception e) { CustomErrorLog objCustomErrorLog = new CustomErrorLog(); _CustomError = objCustomErrorLog.customErrorLogger(ErrorMessages.errGetDataLayer, e, _logger); objCustomErrorLog.throwJsonResponse(_CustomError); } }
public void RefreshAll(string scope, string app) { try { if (IsAsync()) { string statusUrl = _adapterProvider.AsyncRefreshDictionary(scope, app); WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.Accepted; WebOperationContext.Current.OutgoingResponse.Headers["location"] = statusUrl; } else { Response response = _adapterProvider.RefreshAll(scope, app); _adapterProvider.FormatOutgoingMessage <Response>(response, "xml", true); } } catch (Exception ex) { CustomErrorLog objCustomErrorLog = new CustomErrorLog(); _CustomError = objCustomErrorLog.customErrorLogger(ErrorMessages.errRefreshAll, ex, _logger); objCustomErrorLog.throwJsonResponse(_CustomError); } }