Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="apply"></param>
        public FunctionExecution(pol.ApplyBaseReadWrite apply)
        {
            _apply = apply;

            //TODO: find the function data type.
            this.Text = "[" + "dataType" + "] " + apply.FunctionId;

            foreach (inf.IExpression arg in apply.Arguments)
            {
                if (arg is pol.ApplyBaseReadWrite)
                {
                    this.Nodes.Add(new FunctionExecution((pol.ApplyBaseReadWrite)arg));
                }
                else if (arg is pol.FunctionElementReadWrite)
                {
                    this.Nodes.Add(new FunctionParameter((pol.FunctionElementReadWrite)arg));
                }
                else if (arg is pol.AttributeValueElementReadWrite)
                {
                    this.Nodes.Add(new AttributeValue((pol.AttributeValueElementReadWrite)arg));
                }
                else if (arg is pol.AttributeDesignatorBase)
                {
                    this.Nodes.Add(new AttributeDesignator((pol.AttributeDesignatorBase)arg));
                }
                else if (arg is pol.AttributeSelectorElement)
                {
                    this.Nodes.Add(new AttributeSelector((pol.AttributeSelectorElement)arg));
                }
            }
        }
		/// <summary>
		/// 
		/// </summary>
		/// <param name="apply"></param>
		public FunctionExecution( pol.ApplyBaseReadWrite apply )
		{
			_apply = apply;

			//TODO: find the function data type.
			this.Text = "[" + "dataType" + "] " + apply.FunctionId; 
			
			foreach( inf.IExpression arg in apply.Arguments )
			{
				if( arg is pol.ApplyBaseReadWrite )
				{
					this.Nodes.Add( new FunctionExecution( (pol.ApplyBaseReadWrite)arg ) );
				}
				else if( arg is pol.FunctionElementReadWrite )
				{
					this.Nodes.Add( new FunctionParameter( (pol.FunctionElementReadWrite)arg ) );
				}
				else if( arg is pol.AttributeValueElementReadWrite )
				{
					this.Nodes.Add( new AttributeValue( (pol.AttributeValueElementReadWrite)arg ) );
				}
				else if( arg is pol.AttributeDesignatorBase )
				{
					this.Nodes.Add( new AttributeDesignator( (pol.AttributeDesignatorBase)arg ) );
				}
				else if( arg is pol.AttributeSelectorElement )
				{
					this.Nodes.Add( new AttributeSelector( (pol.AttributeSelectorElement)arg ) );
				}
			}
		}
Exemple #3
0
        private void CreateAttributeSelectorFromFunction(object sender, EventArgs args)
        {
            FunctionExecution func = (FunctionExecution)tvwCondition.SelectedNode;

            pol.ApplyBaseReadWrite parentApply = func.ApplyBaseDefinition;

            pol.AttributeSelectorElement attr = new pol.AttributeSelectorElement(string.Empty, false, "TODO: Add XPath", XacmlVersion.Version11);
            AttributeSelector            node = new AttributeSelector(attr);

            func.Nodes.Add(node);
            parentApply.Arguments.Add(attr);
        }
Exemple #4
0
        private void CreateAttributeValueFromFunction(object sender, EventArgs args)
        {
            FunctionExecution func = (FunctionExecution)tvwCondition.SelectedNode;

            pol.ApplyBaseReadWrite parentApply = func.ApplyBaseDefinition;

            pol.AttributeValueElementReadWrite attr = new pol.AttributeValueElementReadWrite(InternalDataTypes.XsdString, "TODO: Add content", XacmlVersion.Version11);
            AttributeValue node = new AttributeValue(attr);

            func.Nodes.Add(node);
            parentApply.Arguments.Add(attr);
        }
Exemple #5
0
        private void CreateFunctionParameterFromFunction(object sender, EventArgs args)
        {
            FunctionExecution func = (FunctionExecution)tvwCondition.SelectedNode;

            pol.ApplyBaseReadWrite parentApply = func.ApplyBaseDefinition;

            pol.FunctionElementReadWrite function = new pol.FunctionElementReadWrite("urn:new_function_param", XacmlVersion.Version11);
            FunctionParameter            node     = new FunctionParameter(function);

            func.Nodes.Add(node);
            parentApply.Arguments.Add(function);
        }
Exemple #6
0
        private void CreateFunctionExecutionFromFunction(object sender, EventArgs args)
        {
            FunctionExecution func = (FunctionExecution)tvwCondition.SelectedNode;

            pol.ApplyBaseReadWrite parentApply = func.ApplyBaseDefinition;

            pol.ApplyElement  apply = new pol.ApplyElement("urn:new_function", new pol.IExpressionReadWriteCollection(), XacmlVersion.Version11);
            FunctionExecution node  = new FunctionExecution(apply);

            func.Nodes.Add(node);
            parentApply.Arguments.Add(apply);
        }
Exemple #7
0
		/// <summary>
		/// Creates a new ApplyBase using the ApplyBase form the policy document.
		/// </summary>
		/// <param name="apply"></param>
		protected ApplyBase( pol.ApplyBaseReadWrite apply )
		{
			_applyBase = apply;
		}
Exemple #8
0
 /// <summary>
 /// Creates a new ApplyBase using the ApplyBase form the policy document.
 /// </summary>
 /// <param name="apply"></param>
 protected ApplyBase(pol.ApplyBaseReadWrite apply)
 {
     _applyBase = apply;
 }