swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

ldap.create-attribute

 
 

Library: LDAP support (OMLDAP)
Import: omldap.xmd

Declaration

define external ldap.attribute function ldap.create-attribute
    named       value  string  attribute-name
    of-type     value  integer datatype        optional
    with-values read-only stream  values

or

define external ldap.attribute function ldap.create-attribute
    named       value  string  attribute-name
    of-type     value  integer datatype        optional
    with-value  remainder string  value
      and ...

Argument definitions

attribute-name
The name of the attribute.
datatype
The type of the attribute. The default is ldap.text-type; the other option is ldap.binary-type.
values
A shelf of values to assign to the attribute. This is an alternative to specifying each value individually.
value
A list of values to assign to the attribute (separated by the word "and" if there is more than one). This is an alternative to specifying the values in a shelf.


Purpose

This function assigns value(s) to an ldap.attribute of an entry that you will add later with the ldap.add-entry function.

This example creates two attributes. The attribute "cn" (common name) contains multiple text values. The attribute "photo" contains a single binary value (the contents of a JPEG file).

  import "omldap.xmd" prefixed by ldap.
  
  process
     local ldap.connection my-ldap
     local ldap.attribute  my-entry variable
  
     set my-ldap to ldap.open 'www.stilo.com'
  
     set new my-entry to ldap.create-attribute named "cn"
        with-value "Brown" and "V. Brown" and "Valerie Brown"
  
     set new my-entry to ldap.create-attribute named "photo"
        of-type    ldap.binary-type
        with-value file "vbrown.jpg"
  
     ldap.add-entry my-ldap
        named "cn=Brown,Department=HR,o=OmniMark.com"
        attributes my-entry

In the example above, the attribute is "cn" and its three values are "Brown", " V. Brown" and "Valerie Brown".

        Other Library Functions
   ldap.add-entry
   ldap.advance-entry
   ldap.attribute
   ldap.close
   ldap.connection
   ldap.create-attribute
   ldap.delete-entry
   ldap.entry-exists
   ldap.entry-name
   ldap.modify-entry
   ldap.name
   ldap.omldap-version
   ldap.open
   ldap.reader
   ldap.rename-entry
   ldap.retrieve-values
   ldap.search
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.