Coverage Report - com.btmatthews.maven.plugins.ldap.mojos.LDIFDumperMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
LDIFDumperMojo
100%
4/4
N/A
1
 
 1  
 /*
 2  
  * Copyright 2008 Brian Thomas Matthews
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 
 17  
 package com.btmatthews.maven.plugins.ldap.mojos;
 18  
 
 19  
 import java.io.PrintWriter;
 20  
 
 21  
 import netscape.ldap.util.LDAPWriter;
 22  
 import netscape.ldap.util.LDIFWriter;
 23  
 
 24  
 /**
 25  
  * This Mojo implements the dsml-dump goal which dumps content from the LDAP
 26  
  * directory server in LDIF format.
 27  
  * 
 28  
  * @author <a href="mailto:brian.matthews@btmatthews.com">Brian Matthews</a>
 29  
  * @version 1.0
 30  
  * @goal ldif-dump
 31  
  */
 32  
 public final class LDIFDumperMojo
 33  
     extends AbstractLDAPDumperMojo
 34  
 {
 35  
     /**
 36  
      * The default constructor.
 37  
      */
 38  
     public LDIFDumperMojo()
 39  3
     {
 40  3
     }
 41  
 
 42  
     /**
 43  
      * Create the LDAP writer that will dump LDAP entries in LDIF format.
 44  
      * 
 45  
      * @param writer
 46  
      *            The writer for the target output stream.
 47  
      * @return The LDAP writer.
 48  
      */
 49  
     protected LDAPWriter openLDAPWriter(final PrintWriter writer)
 50  
     {
 51  1
         return new LDIFWriter(writer);
 52  
     }
 53  
 
 54  
     /**
 55  
      * Close the LDAP wrtier that was returned by openLDAPWriter.
 56  
      * 
 57  
      * @param writer
 58  
      *            The writer for the target output stream.
 59  
      * @param ldapWriter
 60  
      *            The LDAP writer.
 61  
      */
 62  
     protected void closeLDAPWriter(final PrintWriter writer,
 63  
         final LDAPWriter ldapWriter)
 64  
     {
 65  1
     }
 66  
 }