/*
* 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 2013 ForgeRock AS
*/
/**
* A utility class for the packaging process. It is used by the build.xml to
* perform the package construction.
*/
{
/** The source directory name */
/** Files contained in the package */
/** Files which should be excluded from the package */
/** Package documentation files */
/** The end-of-line character for this platform */
/**
* Returns the source directory name.
*
* @return The source directory name.
*/
{
return sourceDirName;
}
/**
* Sets the source directory name.
*
* @param sourceDirName
* The source directory name.
*/
{
this.sourceDirName = sourceDirName;
}
@Override()
public void execute()
{
try
{
// Process the filtering of the files contained in the given directory.
// Sorts the list.
// Returns the properties which can be used fill data.
}
catch (Exception e)
{
throw new BuildException(
"An error occurs during filtering package files", e);
}
}
/**
* Returns the installation files for the RPM package.
*
* @return A string containing the installation files for the RPM package.
*/
{
}
/**
* Formats the file list to be supported by RPM.
*
* @param fileList
* The list of files to be processed.
* @return A string containing the list of files which should be excluded in
* the RPM source.
*/
{
{
}
}
/**
* Formats the file list to be supported by RPM.
*
* @param fileList
* The list of files to be processed.
* @return A string containing the list of files which can be included in the
* RPM source.
*/
{
{
if (f.isDirectory())
{
}
else
{
}
}
}
/**
* Formats the document list to be supported by RPM.
*
* @param fileList
* The list of files to be processed.
* @return A string containing the formatted list doc.
*/
{
{
// FIXME The folder needs to be copied as well.
if (!f.isDirectory())
{
}
}
}
/**
* Sorts all the files contained in selected directory and fills the
* appropriate lists.
*
* @param dir
* The directory where to analyze the files.
* @throws Exception
* If an exception occurs during the process.
*/
{
// The spaces in path can generate errors. (see OPENDJ-1063)
{
if (f.isDirectory())
{
filterFiles(f);
}
// Completes the excluded files list.
{
excludedFiles.add(f);
}
else
{
}
// Completes the document file list.
{
}
}
}
/**
* Returns the relative path to given source directory name.
*
* @param f
* The file we want the relative path.
* @return A string representing the relative path to the given source
* directory name.
*/
{
}
/**
* A file filter which excludes all files that belong to other OS.
*/
{
/** {@inheritDoc} */
{
return (
}
}
/**
* A file filter which accepts only documentation files.
*/
{
/** {@inheritDoc} */
{
if (file.isDirectory())
{
}
return (
}
}
}