directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Willeke (JIRA)" <>
Subject [jira] [Commented] (DIRSTUDIO-801) Allow sorting of LDIF files when Exporting and/or Importing
Date Wed, 25 Apr 2012 13:20:19 GMT


Jim Willeke commented on DIRSTUDIO-801:

The makes this operation easy:
    public static void sortedSearch(String baseDN, String filter, LDAPConnection connection,
String[] attributes) throws LDAPException
	SearchRequest searchRequest = new SearchRequest(baseDN, SearchScope.SUB, filter, attributes);
	SearchResult searchResult =;
	EntrySorter entrySorter = new EntrySorter();
	SortedSet<Entry> sortedEntries = entrySorter.sort(searchResult.getSearchEntries());
	for (Iterator<Entry> iterator = sortedEntries.iterator(); iterator.hasNext();)
	    Entry entry =;
> Allow sorting of LDIF files when Exporting and/or Importing
> -----------------------------------------------------------
>                 Key: DIRSTUDIO-801
>                 URL:
>             Project: Directory Studio
>          Issue Type: Improvement
>          Components: studio-ldapbrowser
>    Affects Versions: 2.0.0-M3
>            Reporter: Jim Willeke
>            Priority: Minor
> When exporting to LDIF the entries may or may not be in the proper order for importing.
> A nice feature would be to sort the entries in a "parent-first" fashion so when importing
the Parents would always be in the file before any of the children.
> This could be done on an export or perhaps an import also.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message