org.ldaptive.io
Class LdifWriter

java.lang.Object
  extended by org.ldaptive.io.LdifWriter
All Implemented Interfaces:
SearchResultWriter

public class LdifWriter
extends Object
implements SearchResultWriter

Writes a SearchResult as LDIF to a Writer.

Version:
$Revision: 3002 $ $Date: 2014-06-17 11:52:51 -0400 (Tue, 17 Jun 2014) $
Author:
Middleware Services

Constructor Summary
LdifWriter(Writer writer)
          Creates a new ldif writer.
 
Method Summary
protected  String createLdif(SearchResult result)
          Creates an LDIF using the supplied search result.
protected  String createLdifEntry(LdapEntry entry)
          Creates an LDIF using the supplied ldap entry.
protected  String createSearchReference(SearchReference ref)
          Creates an LDIF using the supplied search reference.
 void write(SearchResult result)
          Writes the supplied search result to the writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdifWriter

public LdifWriter(Writer writer)
Creates a new ldif writer.

Parameters:
writer - to write LDIF to
Method Detail

write

public void write(SearchResult result)
           throws IOException
Writes the supplied search result to the writer.

Specified by:
write in interface SearchResultWriter
Parameters:
result - search result to write
Throws:
IOException - if an error occurs using the writer

createLdif

protected String createLdif(SearchResult result)
Creates an LDIF using the supplied search result.

Parameters:
result - search result
Returns:
LDIF

createLdifEntry

protected String createLdifEntry(LdapEntry entry)
Creates an LDIF using the supplied ldap entry.

Parameters:
entry - ldap entry
Returns:
LDIF

createSearchReference

protected String createSearchReference(SearchReference ref)
Creates an LDIF using the supplied search reference.

Parameters:
ref - search reference
Returns:
LDIF


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.