Uploaded image for project: 'Directory Studio'
  1. Directory Studio
  2. DIRSTUDIO-147

Allow LDIF imports to overwrite existing entries

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0
    • Component/s: studio-ldapbrowser
    • Labels:
      None

      Description

      Jarek Gawor's LDAP Browser/Editor has a valuable feature when doing LDIF imports: the ability to import in "add", "update", or "update/add" mode. This lets us create an LDIF file, import it, tweak it, and re-import it. A simple checkbox in the LDIF import dialog to "update existing entries" would do the trick nicely (along with the supporting code to actually do the work!!).

        Activity

        Hide
        seelmann Stefan Seelmann added a comment -

        Fixed. It is implemented using REPLACE operations for each attribute in the LDIF. Note that attributes of the existing entry that are not defined in the LDIF record remain without modification. For example if the entry has an attribute 'mail' but the LDIF doesn't contain such an attribute then the 'mail' attribute remains in the entry. There is no delete operation.

        Fixed with following commits:
        http://svn.apache.org/viewvc?rev=689285&view=rev
        http://svn.apache.org/viewvc?rev=689388&view=rev

        Show
        seelmann Stefan Seelmann added a comment - Fixed. It is implemented using REPLACE operations for each attribute in the LDIF. Note that attributes of the existing entry that are not defined in the LDIF record remain without modification. For example if the entry has an attribute 'mail' but the LDIF doesn't contain such an attribute then the 'mail' attribute remains in the entry. There is no delete operation. Fixed with following commits: http://svn.apache.org/viewvc?rev=689285&view=rev http://svn.apache.org/viewvc?rev=689388&view=rev
        Hide
        pamarcelot Pierre-Arnaud Marcelot added a comment -

        Postponed.

        Show
        pamarcelot Pierre-Arnaud Marcelot added a comment - Postponed.
        Hide
        paul_galbraith Paul Galbraith added a comment -

        I'd vote for option 1, it seems to imply fewer remote calls, but I'm no ldap expert...

        Show
        paul_galbraith Paul Galbraith added a comment - I'd vote for option 1, it seems to imply fewer remote calls, but I'm no ldap expert...
        Hide
        seelmann Stefan Seelmann added a comment -

        I wonder what would be the better strategy:

        1) Try to add the entry, if we get an error 68 (Entry Already Exists) we do the update.
        2) Check first via a search if the entry already exists, depending on the search result do an add or update.

        Show
        seelmann Stefan Seelmann added a comment - I wonder what would be the better strategy: 1) Try to add the entry, if we get an error 68 (Entry Already Exists) we do the update. 2) Check first via a search if the entry already exists, depending on the search result do an add or update.

          People

          • Assignee:
            seelmann Stefan Seelmann
            Reporter:
            paul_galbraith Paul Galbraith
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development