Represents an Ldap Attribute List.
 AttributeList ::= SEQUENCE OF SEQUENCE { type    AttributeDescription, vals    SET OF AttributeValue } 
Inheritance: Novell.Directory.Ldap.Asn1.Asn1SequenceOf
 //*************************************************************************
 // Constructors for AddRequest
 //*************************************************************************
 /// <summary> Constructs an RFCAddRequest
 /// 
 /// </summary>
 /// <param name="entry">the entry
 /// 
 /// </param>
 /// <param name="attributes">the Attributes making up the Entry
 /// </param>
 public RfcAddRequest(RfcLdapDN entry, RfcAttributeList attributes)
     : base(2)
 {
     add(entry);
     add(attributes);
     return ;
 }
Exemple #2
0
        //*************************************************************************
        // Constructors for AddRequest
        //*************************************************************************

        /// <summary> Constructs an RFCAddRequest
        ///
        /// </summary>
        /// <param name="entry">the entry
        ///
        /// </param>
        /// <param name="attributes">the Attributes making up the Entry
        /// </param>
        public RfcAddRequest(RfcLdapDN entry, RfcAttributeList attributes) : base(2)
        {
            add(entry);
            add(attributes);
            return;
        }
Exemple #3
0
		/// <summary> Build the attribuite list from an LdapEntry.
		/// 
		/// </summary>
		/// <param name="entry">The LdapEntry associated with this add request.
		/// </param>
		private static RfcAttributeList makeRfcAttrList(LdapEntry entry)
		{
			// convert Java-API LdapEntry to RFC2251 AttributeList
			LdapAttributeSet attrSet = entry.getAttributeSet();
			RfcAttributeList attrList = new RfcAttributeList(attrSet.Count);
			System.Collections.IEnumerator itr = attrSet.GetEnumerator();
			while (itr.MoveNext())
			{
				LdapAttribute attr = (LdapAttribute) itr.Current;
				Asn1SetOf vals = new Asn1SetOf(attr.size());
				System.Collections.IEnumerator attrEnum = attr.ByteValues;
				while (attrEnum.MoveNext())
				{
					vals.add(new RfcAttributeValue((sbyte[]) attrEnum.Current));
				}
				attrList.add(new RfcAttributeTypeAndValues(new RfcAttributeDescription(attr.Name), vals));
			}
			return attrList;
		}
        // *************************************************************************
        // Constructors for AddRequest
        // *************************************************************************

        /// <summary>
        ///     Constructs an RFCAddRequest.
        /// </summary>
        /// <param name="entry">
        ///     the entry.
        /// </param>
        /// <param name="attributes">
        ///     the Attributes making up the Entry.
        /// </param>
        public RfcAddRequest(RfcLdapDn entry, RfcAttributeList attributes)
            : base(2)
        {
            Add(entry);
            Add(attributes);
        }