/// <summary> /// Updates notification groups /// </summary> /// <remarks> /// Note that this update is considered complete, e.g., the existing group /// settings will be deleted and replaced by the contents of the map. /// </remarks> /// <param name="groups">notification group names with set of notification address by notification group types</param> /// <exception cref="AdvanceIOException">if network connection failed</exception> /// <exception cref="AdvanceXMLException">On Xml parsing error</exception> /// <exception cref="AdvanceControlException">if username or password is incorrect</exception> public void UpdateNotificationGroups(Dictionary <AdvanceNotificationGroupType, Dictionary <string, ICollection <string> > > groups) { XmlDocument req = XmlReadWrite.CreateFunctionRequest("update-notification-groups"); AdvanceNotificationGroup.FillXmlElementFromDict(req.DocumentElement, groups); this.communicator.Send(req); }
/// <summary> /// Query notification group /// </summary> /// <param name="type">group type</param> /// <param name="name">group name</param> /// <returns>set of contact information</returns> /// <exception cref="AdvanceIOException">if network connection failed</exception> /// <exception cref="AdvanceXMLException">On Xml parsing error</exception> /// <exception cref="AdvanceControlException">if username or password is incorrect</exception> public List <string> QueryNotificationGroup(AdvanceNotificationGroupType type, string name) { Dictionary <string, object> attrs = new Dictionary <string, object>(); attrs.Add("type", type); attrs.Add("name", name); XmlNode resp = this.communicator.Query(XmlReadWrite.CreateFunctionRequest("query-notification-group", null, attrs)); AdvanceNotificationGroup ng = XmlReadWrite.CreateFromXml <AdvanceNotificationGroup>(resp); return(ng.Contacts); }
/// <summary> /// Query all notification groups /// </summary> ///<returns>Notification addrasses by notification group names and by type</returns> /// <exception cref="AdvanceIOException">if network connection failed</exception> /// <exception cref="AdvanceXMLException">On Xml parsing error</exception> /// <exception cref="AdvanceControlException">if username or password is incorrect</exception> public Dictionary <AdvanceNotificationGroupType, Dictionary <string, List <string> > > QueryNotificationGroups() { XmlNode resp = this.communicator.Query(XmlReadWrite.CreateFunctionRequest("query-notification-groups")); return(AdvanceNotificationGroup.LoadDictFomXml(resp)); }