Пример #1
0
        /// <summary>
        /// Update a flow in a the given realm.
        /// </summary>
        /// <param name="realm">target realm</param>
        /// <param name="block">Flow content to upload</param>
        /// <param name="byUser">user who modifies the realm</param>
        /// <exception cref="AdvanceIOException">if network connection failed</exception>
        /// <exception cref="AdvanceControlException">if user is not allowed to update a flow.</exception>
        public void UpdateFlow(string realm, AdvanceCompositeBlock block, string byUser)
        {
            Dictionary <string, object> attrs = new Dictionary <string, object>();

            attrs.Add("realm", realm);
            attrs.Add("by-user", byUser);
            List <XmlReadWrite> pars = new List <XmlReadWrite>();

            pars.Add(new AdvanceFlow(block));
            XmlDocument req = XmlReadWrite.CreateFunctionRequest("update-flow", pars, attrs);

            this.communicator.Send(req);
        }
Пример #2
0
        /// <summary>
        /// Verify the given flow.
        /// </summary>
        /// <param name="block">flow content to verify</param>
        /// <returns>results of the compilation in terms of errors and computed types of wires</returns>
        /// <exception cref="AdvanceIOException">if network connection failed</exception>
        /// <exception cref="AdvanceXMLException">On Xml parsing error</exception>
        /// <exception cref="AdvanceControlException">if user is not allowed to update a flow.</exception>
        public AdvanceCompilationResult VerifyFlow(AdvanceCompositeBlock block)
        {
            XmlNode resp = this.communicator.Query(XmlReadWrite.CreateFunctionRequest("verify-flow", new AdvanceFlow(block)));

            return(XmlReadWrite.CreateFromXml <AdvanceCompilationResult>(resp));
        }
Пример #3
0
        /// <summary>
        /// Fills object's xml
        /// </summary>
        /// <param name="node">Empty node for the object with name "tagname"</param>
        protected override void FillXmlElement(XmlElement node)
        {
            XmlNode root = GetChildNode(node, "composite-block");

            this.Content = (root == null) ? new AdvanceCompositeBlock() : CreateFromXml <AdvanceCompositeBlock>(root);
        }
Пример #4
0
 public AdvanceFlow(AdvanceCompositeBlock content) : this()
 {
     this.Content = content;
 }