Directory Studio
  1. Directory Studio
  2. DIRSTUDIO-147

Allow LDIF imports to overwrite existing entries

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major 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
        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
        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.
        Hide
        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 added a comment - I'd vote for option 1, it seems to imply fewer remote calls, but I'm no ldap expert...
        Hide
        Pierre-Arnaud Marcelot added a comment -

        Postponed.

        Show
        Pierre-Arnaud Marcelot added a comment - Postponed.
        Hide
        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
        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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development