/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2006-2009 Sun Microsystems, Inc.
* Portions Copyright 2014-2015 ForgeRock AS
*/
/**
* This class makes test LDIF files using the makeldif package.
*/
{
/**
* The LDIF writer used to write the entries to the file.
*/
/**
* Construct an LdifFileWriter from an LDIF Writer.
* @param ldifWriter The LDIF writer that should be used to write the entries.
*/
{
this.ldifWriter = ldifWriter;
}
/**
* Make an LDIF file containing test data. It uses a fixed value for the
* random seed.
* @param ldifPath The path to the LDIF file to be written.
* @param resourcePath The path to the makeldif resource directory.
* @param templatePath The path to the makeldif template file.
* @throws IOException If there is an exception parsing the template or
* generating the LDIF.
* @throws InitializationException If there is an exception parsing the
* template.
* @throws MakeLDIFException If there is an exception parsing the template or
* generating the LDIF.
*/
{
}
/**
* Make an LDIF file containing test data. It uses a fixed value for the
* random seed.
* @param ldifPath The path to the LDIF file to be written.
* @param resourcePath The path to the makeldif resource directory.
* @param templateLines The lines making up the template.
* @throws IOException If there is an exception parsing the template or
* generating the LDIF.
* @throws InitializationException If there is an exception parsing the
* template.
* @throws MakeLDIFException If there is an exception parsing the template or
* generating the LDIF.
*/
{
}
/**
* Make an LDIF file containing test data.
* @param ldifPath The path to the LDIF file to be written.
* @param template The makeldif template.
* @throws IOException If there is an exception parsing the template or
* generating the LDIF.
* @throws MakeLDIFException If there is an exception parsing the template or
* generating the LDIF.
*/
throws IOException, MakeLDIFException
{
}
/** {@inheritDoc} */
throws IOException, MakeLDIFException
{
try
{
} catch (LDIFException e)
{
e.printStackTrace();
return false;
}
}
/** {@inheritDoc} */
public void closeEntryWriter()
{
try
{
ldifWriter.close();
} catch (IOException e)
{
e.printStackTrace();
}
}
}