/// <summary> Sets a property of the constraints object. /// /// No property names have been defined at this time, but the /// mechanism is in place in order to support revisional as well as /// dynamic and proprietary extensions to operation modifiers. /// /// </summary> /// <param name="name"> Name of the property to set. /// /// </param> /// <param name="value"> Value to assign to the property. /// property is not supported. /// /// @throws NullPointerException if name or value are null /// /// </param> /// <seealso cref="LdapConnection.getProperty"> /// </seealso> public virtual void setProperty(string name, object value_Renamed) { if (properties == null) { properties = new Hashtable(); } SupportClass.PutElement(properties, name, value_Renamed); }
/// <summary> Sets a property of the constraints object. /// /// No property names have been defined at this time, but the /// mechanism is in place in order to support revisional as well as /// dynamic and proprietary extensions to operation modifiers. /// /// </summary> /// <param name="name"> Name of the property to set. /// /// </param> /// <param name="value"> Value to assign to the property. /// property is not supported. /// /// @throws NullPointerException if name or value are null /// /// </param> /// <seealso cref="LdapConnection.getProperty"> /// </seealso> public virtual void setProperty(System.String name, System.Object value_Renamed) { if (properties == null) { properties = new System.Collections.Hashtable(); } SupportClass.PutElement(properties, name, value_Renamed); return; }
/// <summary> Adds the schema definition to the idList and nameList HashMaps. /// This method is used by the methods fetchSchema and add. /// /// Note that the nameTable has all keys cast to Upper-case. This is so we /// can have a case-insensitive HashMap. The getXXX (string key) methods /// will also cast to uppercase. /// /// </summary> /// <param name="schemaType"> Type of schema definition, use one of the final /// integers defined at the top of this class: /// ATTRIBUTE, OBJECT_CLASS, SYNTAX, NAME_FORM, /// DITCONTENT, DITSTRUCTURE, MATCHING, MATCHING_USE /// /// </param> /// <param name="element"> Schema element definition. /// </param> private void addElement(int schemaType, LdapSchemaElement element) { SupportClass.PutElement(idTable[schemaType], element.ID, element); string[] names = element.Names; for (int i = 0; i < names.Length; i++) { SupportClass.PutElement(nameTable[schemaType], names[i].ToUpper(), element); } }
/// <summary> /// Adds the schema definition to the idList and nameList HashMaps. /// This method is used by the methods fetchSchema and add. /// Note that the nameTable has all keys cast to Upper-case. This is so we /// can have a case-insensitive HashMap. The getXXX (String key) methods /// will also cast to uppercase. /// </summary> /// <param name="schemaType"> /// Type of schema definition, use one of the final /// integers defined at the top of this class: /// ATTRIBUTE, OBJECT_CLASS, SYNTAX, NAME_FORM, /// DITCONTENT, DITSTRUCTURE, MATCHING, MATCHING_USE. /// </param> /// <param name="element"> /// Schema element definition. /// </param> private void AddElement(int schemaType, LdapSchemaElement element) { SupportClass.PutElement(_idTable[schemaType], element.Id, element); var names = element.Names; for (var i = 0; i < names.Length; i++) { SupportClass.PutElement(_nameTable[schemaType], names[i].ToUpper(), element); } }
/// <summary> Sets the values of a specified optional or non-standard qualifier of /// the element. /// /// The setQualifier method is used to set the values of vendor- /// specific qualifiers (which begin with "X-"). /// /// </summary> /// <param name="name"> The name of the qualifier, case-sensitive. /// /// </param> /// <param name="values"> The values to set for the qualifier. /// </param> public virtual void setQualifier(string name, string[] values) { AttributeQualifier attrQualifier = new AttributeQualifier(name, values); SupportClass.PutElement(hashQualifier, name, attrQualifier); /* * This is the only method that modifies the schema element. * We need to reset the attribute value since it has changed. */ Value = formatString(); }
/// <summary> /// Adds the specified attribute to this set if it is not already present. /// If an attribute with the same name already exists in the set then the /// specified attribute will not be added. /// </summary> /// <param name="attr"> /// Object of type <code>LdapAttribute</code> /// </param> /// <returns> /// true if the attribute was added. /// @throws ClassCastException occurs the specified Object /// is not of type <code>LdapAttribute</code>. /// </returns> public override bool Add(object attr) { //We must enforce that attr is an LdapAttribute var attribute = (LdapAttribute)attr; var name = attribute.Name.ToUpper(); if (map.ContainsKey(name)) { return(false); } SupportClass.PutElement(map, name, attribute); return(true); }
/// <summary> /// Adds the specified attribute to this set if it is not already present. /// If an attribute with the same name already exists in the set then the /// specified attribute will not be added. /// </summary> /// <param name="attr"> /// Object of type. <code>LdapAttribute</code> /// </param> /// <returns> /// true if the attribute was added. /// @throws ClassCastException occurs the specified Object /// is not of type. <code>LdapAttribute</code>. /// </returns> public override bool Add(object attr) { // We must enforce that attr is an LdapAttribute var attribute = (LdapAttribute)attr; var name = attribute.Name.ToUpper(); // TODO: Make _map a Dictionary with a IgnoreCase comparer if (_map.ContainsKey(name)) { return(false); } SupportClass.PutElement(_map, name, attribute); return(true); }
/// <summary> Adds the specified attribute to this set if it is not already present. /// If an attribute with the same name already exists in the set then the /// specified attribute will not be added. /// /// </summary> /// <param name="attr"> Object of type <code>LdapAttribute</code> /// /// </param> /// <returns> true if the attribute was added. /// /// @throws ClassCastException occurs the specified Object /// is not of type <code>LdapAttribute</code>. /// </returns> public override bool Add(object attr) { //We must enforce that attr is an LdapAttribute LdapAttribute attribute = (LdapAttribute)attr; System.String name = attribute.Name.ToUpper(); if (this.map.ContainsKey(name)) { return(false); } else { SupportClass.PutElement(this.map, name, attribute); return(true); } }